What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Web server internal resolve issue

Dylan McDonald

New Around Here
I'm currently unable to access sites hosted on my web server box (hosted on local network) while requesting them from inside my network. I'm currently using an ASUS RT-N66U with ASUSWRT-Merlin 378.55. I've tried all different NAT Loopback options along with disabling NAT acceleration, but without any luck. Ideally there would be a solution without me having to edit host files on every single machine on my local network.

Note: Sites are working just find outside of my local network.

Thanks,

Dylan McDonald
 
Any other features not at defaults?

Did you reboot the router and at least the client computer when you changed the loopback options?

Do you have custom host files on your machines now?
 
Any other features not at defaults?

Did you reboot the router and at least the client computer when you changed the loopback options?

Do you have custom host files on your machines now?

The only other options I changed were assigning static IPs to a couple machines. I did not reboot the client computer when I changed the loopback options. Is that required?

I do have a custom host file on my main machine which I use for site development. The entries are all .local domains.
 
Also, there are 3 NAT loopback options: Disabled, Asus, and Merlin. I'm assuming Merlin and turning off NAT acceleration would be my best bet?
 
If you are accessing by name then more than likely your DNS is breaking down. Your outside DNS is correct but you need an inside DNS entry. Try to access by local IP address. If it works then it is a DNS issue.
 
If you are accessing by name then more than like your DNS is breaking down. Your outside DNS is correct but you need an inside DNS entry. Try to access by local IP address. If it works then it is a DNS issue.

Accessing my server by local IP works. Accessing by WAN IP does not work.
 
If you are accessing by name then more than likely your DNS is breaking down. Your outside DNS is correct but you need an inside DNS entry. Try to access by local IP address. If it works then it is a DNS issue.

Any idea how I might go about resolving the internal DNS issue?
 
You need to add a static DNS entry for your local network IP address. Not sure with ASUS. Is there a place to add static DNS entries or maybe NAT hairpining? If not you need to modify the code.
 
You need to add a static DNS entry for your local network IP address. Not sure with ASUS. Is there a place to add static DNS entries or maybe NAT hairpining? If not you need to modify the code.

There's this page, but I wouldn't know what to enter:

JbXa46H.png
 
Static routing list is for adding a route for a second network. This is not what you want for DNS. What is under tools?
 
I just googled your answer. I got this link


http://www.snbforums.com/threads/rt-ac66u-dns-serving-static-ips.12233/


There does not seem to be an easy way to do this on an ASUS router. The routers I own can do this. This is one of the many features I look for in a router.

Do you run your own local DNS server? If so you can add the DNS entry there. You just need the DNS request to be resolved in your local network before the request goes to a public DNS server.
 
Last edited:
Ideally there would be a solution without me having to edit host files on every single machine on my local network.
This is how I do it: I have four local development servers. They all have a local tld.
In the file /jffs/configs/dnsmasq.conf.add I have these entries:
Code:
# internal Servers
    address=/test/192.168.2.150
    address=/dev/192.168.2.160
    address=/aus/192.168.2.170
    address=/red/192.168.2.165
Say if I have a domain named www.snbforums.dev on the *.dev server it resolves for all LAN devices to the IP 192.168.2.160.
If you add or change something in the dnsmasq.conf.add file just restart dnsmasq with
Code:
service restart_dnsmasq
 
Not meaning to hijack the thread, but this is almost the exact same issue I am having on a RT-AC87 running 378.56

Lonely:
This is how I do it: I have four local development servers. They all have a local tld.
In the file /jffs/configs/dnsmasq.conf.add I have these entries:
Code:
# internal Servers
    address=/test/192.168.2.150
    address=/dev/192.168.2.160
    address=/aus/192.168.2.170
    address=/red/192.168.2.165
Say if I have a domain named www.snbforums.dev on the *.dev server it resolves for all LAN devices to the IP 192.168.2.160.
If you add or change something in the dnsmasq.conf.add file just restart dnsmasq with
Code:
service restart_dnsmasq

This is almost exactly how I have my dnsmasq.conf.add set up and am not having any luck. Do you have any suggestions? I am using DDNS from freedns.afraid.org to access my computer from outside the network and that is working fine, when try going to the address using a computer internally, the page times out.

Code:
address=/serv.fixthepc.com/192.168.1.x
I should also note, there are three different sites I am accessing with different port numbers.
  • serv.fixtherpc.com:4000
  • serv.fixtherpc.com:4001
  • serv.fixtherpc.com:4002
I have double checked the easy stuff, UTF-8 encoding and restarted/rebooted the router. Other than DDNS, I don't have any major settings changed.

Can you give me any insight?
 
Last edited:
What are your dns server settings?

You need to use the router as your dns server for your lan and add static dhcp entries on the lan -> dhcp page for your internal ones (as opposed to assigning your isp'd dns to your clients). Once you do that, you should be able to use xxxx.local to resolve the local ip where xxxx is the entry on the dhcp page.

You should also make sure the domain of "local" is set in the router:

LAN -> DHCP
domain = local
dns server 1 = <router ip>
dns server 2 = blank
advertise = no
forward = no
...
enable manual assignment = yes
....
<add ip/Hosts>
 
What are your dns server settings?

You need to use the router as your dns server for your lan and add static dhcp entries on the lan -> dhcp page for your internal ones (as opposed to assigning your isp'd dns to your clients). Once you do that, you should be able to use xxxx.local to resolve the local ip where xxxx is the entry on the dhcp page.

You should also make sure the domain of "local" is set in the router:

LAN -> DHCP
domain = local
dns server 1 = <router ip>
dns server 2 = blank
advertise = no
forward = no
...
enable manual assignment = yes
....
<add ip/Hosts>
You my friend are a rockstar. I spent all day on this before posting.

I was using OpenDNS as the DNS server and didn't have anything entered for the routers domain name.

Now on to getting OpenDNS working some other way, I saw a post about that somewhere.
 
You my friend are a rockstar. I spent all day on this before posting.

I was using OpenDNS as the DNS server and didn't have anything entered for the routers domain name.

Now on to getting OpenDNS working some other way, I saw a post about that somewhere.
You can still use opendns. Just tell your router to use opendns on the wan page. It will forward requests up stream to it.
 
I appreciate the help again. I call this one a brain fart. I looked over the radio box to use connect to custom DNS.
 
What are your dns server settings?

You need to use the router as your dns server for your lan and add static dhcp entries on the lan -> dhcp page for your internal ones (as opposed to assigning your isp'd dns to your clients). Once you do that, you should be able to use xxxx.local to resolve the local ip where xxxx is the entry on the dhcp page.

You should also make sure the domain of "local" is set in the router:

LAN -> DHCP
domain = local
dns server 1 = <router ip>
dns server 2 = blank
advertise = no
forward = no
...
enable manual assignment = yes
....
<add ip/Hosts>

If someone is using a Windows server 2012 for DNS as myself this setup applies and helps
LAN -> DHCP
domain = blank
dns server 1 = <server ip>
dns server 2 = blank
advertise = no
forward = yes

Forward = yes - in cases server is down -> internet access is live
Dns server 2 = 8.8.8.8 -> google alternative


Sent from my iPad using Tapatalk
 
You guy should have a sticky for resolving local IP addresses using an ASUS router. It comes up all the time.

If you have a local Windows server DNS you can use it for local DNS. Just add an entry. If you want to still use the router and have a local Windows DNS server just chain the Windows DNS server to the router by doing a forward from the Windows DNS server to the router and let the router forward out to the internet DNS.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top