[Dnsmasq-discuss] DNSMASQ as DNS Filter
Simon Kelley
simon at thekelleys.org.uk
Mon May 30 11:47:24 BST 2011
On 30/05/11 00:56, Daniel Antonio wrote:
>
> I have this questions about of "dnsmasq.conf" in this "section":
>
> # Add domains which you want to force to an IP address here.
> # The example below send any host in doubleclick.net
> <http://doubleclick.net> to a local
> # webserver.
> address=/*porn*/127.0.0.1 <http://127.0.0.1>
> address=/*ads*/127.0.0.1 <http://127.0.0.1>
>
> In this case I try to apply wildcards, this don't work, is possible
> apply wildcards for this?, my intention is use DNSMAQS like a local
> dnsfilter (I can't use OpenDNS).
> And if this is possible, I can make a list of exceptions?, for example:
>
> address=/*ads*/127.0.0.1 <http://127.0.0.1>
> exception=downloads.sourceforge.net <http://downloads.sourceforge.net>
>
> The thing is I am using in this moment Simple DNS (Windows) for this
> task, your help will be much appreciated.
>
> Thanks.
>
The domains are not regular expressions, precisely because they are not
suitable for use in the case. Some time down the line, you will wonder
why you can't get web pages about the Airbus because *ads* matches
eads.com and stops you from accessing the airbus domain.
What you can do is
address/adserver.com/172.0.0.1
which matches any thing in the adserver.com domain, ie *.adserver.com
It's also possible to dowload collections of adserver names and use them
as a hosts file, to block specific domains.
HTH
Simon.
More information about the Dnsmasq-discuss
mailing list