[Dnsmasq-discuss] Forwarding to a different DNS server by originating IP

Simon Kelley simon at thekelleys.org.uk
Tue Jun 18 10:16:52 BST 2013


On 17/06/13 11:21, Sebastian Sylwan wrote:
> Hi,
>
> please forgive the possibly newbie question, but I could not find an answer
> to this reading the man page, or in various places online.
>
> I have a dnsmasq server which correctly forwards DNS requests to different
> servers according to the domain requested. This is great and thank you for
> the good work with dnsmasq.
>
> I now want to discriminate which DNS server the request is sent to
> depending on the IP address the request originated from. i.e. if the
> request for google.com (or any domain for that matter) came from a machine
> on my internal network with IP 192.168.1.10 i want to forward to 8.8.8.8,
> if the request instead came from IP 192.168.1.20 I want it to be sent to my
> ISP's DNS server.
>
> I *think* I could accomplish something similar configuring the DHCP server
> to provide different DNSs to different hosts on their DHCP request, but
> some of the hosts are not DHCP clients.
>

There's not facility to do that in dnsmasq. Your differential 
configuration of DNS in hosts is what I'd suggest. For the host which 
don't do DHCP, presumably they're manually configured, and could have 
different addresses configured depending on class?

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list