2
2
I have Netgear R7000, and host a website behind it. The website works if accessing from outside the LAN. If accessing from inside LAN, the website is not accessible, unless:
1) For a mac, ubuntu, add entry in /etc/hosts, such as:
{ip of LAN of webserver} my.site.com
192.168.7.33 my.site.com
2) Then, that computer is able to access website from the LAN.
3) iPhone, iPad, do not work from LAN. iPhone works from WAN!
What is missing in the DNS setting of the router to make everything work?
I don't want to add anything to /etc/hosts.
Thank you for recommended docs. I tried Google, OpenDNS, and ISP DNS, none of them helped, unless add entry to hosts. Current R7000 firmware V1.0.9.60_10.2.60. I have to assume this version may not support NAT lookback. Or, my Synology NAS's DNS or Directory service (not really enabled even installed) have interference to router DNS setting? – user3792705 – 2019-05-20T21:48:30.120
"You'll need your own local DNS server(s) to get this solution working." < This is the root cause of your issue, OP. The website is behind the router, so it is using a NAT address (a private IP). That is why lookup works from the outside (WAN), but not inside (LAN) - there is no DNS A record living on the LAN for 192.168.7.33 (your website). Configure the DNS A record in your router (if possible), or you will need to setup a DNS server on your LAN. – SamAndrew81 – 2019-05-20T22:48:00.740
Google, OpenDNS, etc. these cannot work because they are public nameservers (WAN). You need a private nameserver to provide DNS for the NAT IP on your LAN. There is a hard line between the two, that being the firewall/router. – SamAndrew81 – 2019-05-20T22:49:56.647
I am using Netgear R7000 router. I could not find local DNS. Someone can help? – user3792705 – 2019-06-18T18:30:10.897
@user3792705 I am using a Netgear R7000 router. I could not find local DNS. -- There is no option to run a local DNS server on the R7000 with stock firmware, unfortunately (assuming that is what you mean). You must have a separate PC on the network that acts as your DNS server. This can be your web server or another computer, but it must remain on consistently to provide an internet connection. – Anaksunaman – 2019-06-19T00:16:45.117
@user3792705 You would then point the Netgear R7000 at that PC for local DNS as described in the answer above. – Anaksunaman – 2019-06-19T00:19:23.617
Thank you. I have Synology NAS server with DNS installed. I created "Master zone"... according to this https://www.laurivan.com/set-up-a-local-dns-with-synology-diskstation/. It's not clear to me: this process has no domain entries. I have 2 domain: hello1.ddns.net, hello2.ddns.net points to same computer name + IP (ubuntu_hello. 12.12.12.12). Where to enter the 2 entries. I did not enter any, except 'Forward 1' to be the R7000 router IP, which seems make it work (but, not sure)
– user3792705 – 2019-06-19T00:27:31.023yes. "point the Netgear R7000 at that PC for local DNS" worked for me without enter the 2 domains to DNS server. – user3792705 – 2019-06-19T00:36:27.953
I disabled the Synology DNS entry. It still work. I think there are something I don't understand Synology DNS software!!! – user3792705 – 2019-06-19T00:48:22.800
Report back. I am not sure "point the Netgear R7000 at that PC for local DNS" works. I saw some LAN computer work (may be cache), all of them not work, even it's enabled with just router IP in the settings. Questions: what to make R7000 local DNS work in this case. How to enter my 2 domains in the DNS (above testing is without these 2 domains)? – user3792705 – 2019-06-19T03:32:28.230