[Dnsmasq-discuss] Configure to return external IP instead of internal one

Pyry Kontio pyry.kontio at drasa.eu
Sun Aug 3 03:10:59 BST 2014


Hi, I recently got a router running dd-wrt firmware, which includes dnsmasq
as its DHCP and DNS server.

I have my router as a NAT, and it has an external IP, let's say
111.111.111.111 and an internal IP, 192.168.1.1. I have also a domain name
registered (3rd party DNS server, naturally outside of my LAN) that points
to 111.111.111.111.

I'm running a web server behind the NAT, and I have set the port
forwardings accordingly. It works, when I'll access it from outside of my
LAN.

However, when I try to access it from inside of the LAN using the domain
name, it doesn't work. The problem is that when trying to resolve the
domain name, dnsmasq apparently knows that 111.111.111.111 and 192.168.1.1
point to the same piece of hardware, meddles with the query and returns the
192.168.1.1 IP address instead of 111.111.111.111. This is troublesome,
since I want it to resolve to 111.111.111.111 as 192.168.1.1 points just to
the router's web configuration interface. The port forwarding works only
when accessed using the IP address 111.111.111.111. (I can verify that the
address 111.111.111.111 itself works as expected even from inside of the
LAN – it's just the domain name resolution that works differently than I'd
like it to work.)

How could I configure dnsmasq not to meddle with the resolution of FQDNs?
(I don't want to disable it completely, because the LAN hostname resolution
to private IPs is such a nice feature.) I already googled and read the man
page, but didn't find any relevant setting.

Best regards,

Pyry Kontio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140803/01d20c9b/attachment.html>


More information about the Dnsmasq-discuss mailing list