Discussion:
[Dnsmasq-discuss] IP filtering
FredB
2016-02-25 14:24:57 UTC
Permalink
Hello,

I'm wondering if can meet some of my requirements

What I can do

1 ) Clients are using DNSMAQ for DNS requests
2 ) dnsmask forwards to another dns (like google but no matter)
3 ) IP returned is changed by dnsmask by another, I know I can do that without problem for domains but for a specific IP ?

My goal is very "simple" I want replace some IP addresses by another in DNS request, but these addresses can be related with many unknowns domains.
Eg: I don't want any resolution with 212.27.48.10, no matter the domain (in this case free.fr but should be google.com or another)

I can do that with dnsmasq and which tools if not ?

Regards
Lorin Weilenmann
2016-02-25 14:56:18 UTC
Permalink
Check out the --alias option:

-V, --alias=[<old-ip>]|[<start-ip>-<end-ip>],<new-ip>[,<mask>]
Modify IPv4 addresses returned from upstream nameservers; old-ip is
replaced by new-ip. If the optional mask is given then any address which
matches the masked old-ip will be re-written. So, for instance
--alias=1.2.3.0,6.7.8.0,255.255.255.0 will map 1.2.3.56 to 6.7.8.56 and
1.2.3.67 to 6.7.8.67. This is what Cisco PIX routers call "DNS doctoring".
If the old IP is given as range, then only addresses in the range, rather
than a whole subnet, are re-written. So
--alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 maps
192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40

Cheers!
Post by FredB
Hello,
I'm wondering if can meet some of my requirements
What I can do
1 ) Clients are using DNSMAQ for DNS requests
2 ) dnsmask forwards to another dns (like google but no matter)
3 ) IP returned is changed by dnsmask by another, I know I can do that
without problem for domains but for a specific IP ?
My goal is very "simple" I want replace some IP addresses by another in
DNS request, but these addresses can be related with many unknowns domains.
Eg: I don't want any resolution with 212.27.48.10, no matter the domain
(in this case free.fr but should be google.com or another)
I can do that with dnsmasq and which tools if not ?
Regards
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Continue reading on narkive:
Loading...