I have a server on my network. Accessing it from devices outside the network by domain name works perfectly. Some devices though, like my phone, connect to the network by wifi, and when they do, they fail to lookup that the domain name should point to a specific internal IP address. (This is because my ISP provided router lacks the ability to do hairpinning).
I cannot edit /etc/hosts on the devices connecting by wifi, although I can on the server.
To try and work around this, I'm trying to replace my router's default DNS server with DNSmasq on my server.
I want DNSmasq to forward all requests for my domains to itself, and any other domains to a public dns lookup service like openDNS.
Essentially, I'd like devices like phones that connect to my WiFi to still be able to connect to my domains, despite no hairpinning on my router, and no ability to edit the phones /etc/hosts files.
Currently, the only thing's I've changed are that:
- The router's DNS server IP's point to my server's static, internal IP.
- The server has my domains pointing to it's own static internal IP in /etc/hosts
- I've opened ports 52-54 and pointed them to my server (although it's also currently DMZ'd, so that shouldn't matter)
- /etc/host, /etc/resolv.conf and /etc/dnsmasq.conf are all still default.
Currently all requests for any of my domains timeout, by any device on the network, where I haven't modified the /etc/hosts file.
For the record I'm running Debian 8 with Nginx on a Bell Smartstream 2000 modem.