<div dir="ltr">Hi, I recently got a router running dd-wrt firmware, which includes dnsmasq as its DHCP and DNS server.<div><br></div><div>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.<br>
</div><div><br></div><div>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.</div><div><br></div><div>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.)</div>
<div><br></div><div>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.</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Pyry Kontio</div></div>