stealing ad spaces

Does any one have an implementation of a way to filter out adverts like Google ads and replace them with your on on your network.
Thanks guyz.

RouterOS can’t do that.

This Advert stuff is very important.
If your technical crew can work out a way this can be possible in mikrotik it will be of great edge to other solution.

it would also be illegal in most countries..

I think it shouldn’t be illegal as long as you do it in your network {jurisdiction} I think several big isps in my country are doing it.

I will not recommend you to filter websites on Mikrotik, its simply not made for this purpose, Proxy server can work more smartly
for this kind of filtering. Blocking ads and redirecting it to local advertisement page can be done in many alternate ways.

Setup any proxy server like SQUID , then either in MT web proxy, use parent proxy option, and point it to your squid server
OR just redirect HTTP traffic to SQUID box :slight_smile:_

On SQUID box, you can setup following rules to block ads. I presume that you have working Squid in place.
just open /etc/squid/squid.conf and these lines before other ACL’s.

acl adsites dstdomain url_regex "/etc/squid/adslist.txt"
http_access deny adsites
deny_info http://192.168.0.1/myadvertisement.html adsites

[192.168.0.1 is local web server hosted on same machine]

This will tell squid to look in /etc/squid/adslist.txt and deny those website listed in adslist.txt,
then “deny_info” will redirect those websites to your local hosted web page, possibly advertisement page :wink:

Now create a file /etc/squid/adslist.txt and paste all these entries in this file. [just few examples]

.2mdn.net
.sapo.pt
.econtent.ebuddy.com/banners_new
.adbasket.net
.ak1.abmr.net
.edgesuite.net
.ad.yieldmanager.com/imp?
ad.yieldmanager.com/imp
.ad.yieldmanager.com/imp

The result can be seen in following screenshot. Default web site ad is replaced by My company Advertisement.
ads-blocking-by-squid-or-isa.png
Read the following articles for more information on how can you effectively block ads using SQUID.

http://aacable.wordpress.com/2011/06/01/squid-howto-block-ads/
http://aacable.wordpress.com/2011/06/06/squirm-another-way-to-block-ads-more-efficiently/

Great write up - thats one ill be saving for future use

+1 Clean solution. Thanks.

Thanks that’s a superb solution.

Glad to help :slight_smile:

How about giving karma to this post :wink:

Very nice, i wonder if this is illegal or not..
It might be a nice way to add some profits

The solution using squid is a good and simple one.
Howeve, it has its limitations.
Being an old German engineer, destined for perfection, I was developing for quite some time a far more flexible and efficient method, which now is ready for the market.
Have a look at the possibilities:

Shot 1 shows an example of a banner added.
Shot 2 shows a layer-Ad added.
Shot 3 shows 2 flash ads on the google search page (standard and a peel-off flash).




Comments welcome !
And possible coorperation with non-Europeans :slight_smile:

Post your mail so we can meet with the price :slight_smile:

You can mail me using my public adrs to avoid too much spam:
augustus_meyer@yahoo.de

screenshots were from a short demo video, which I prepared already sometime ago, when it was still a bit less than perfect :slight_smile:
Anyway: Link to video:https://rapidshare.com/files/1508464671/demo.avi