[Dnsmasq-discuss] IP filtering

Lorin Weilenmann lorin.weilenmann at gmail.com
Thu Feb 25 14:56:18 GMT 2016


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!

On Thu, 25 Feb 2016 at 15:46 FredB <numsys at free.fr> wrote:

> 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
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160225/99a26a79/attachment.html>


More information about the Dnsmasq-discuss mailing list