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!

Using external WAN domain to access internal LAN services when internet is offline

Johnnytk36

New Around Here
I switched to a Asus router and Asuswrt-Merlin after I found out DDWRT wasn't allowing me to use the full 150Mbs I get from my ISP now. I love the software, it has every feature I need from DD-WRT, but none of the ones I didn't use.


My setup: A RT-AC66R router running Asuwrt-Merlin 3.0.0.4.374.34

Using my personal domain and DDNS I have a domain, home.myexampledomain.com , that always points to my home router. This allows me of course to access services I have running within my LAN using port forwards from the WAN. If I am within my local lan accessing services via the WAN domain name and port number, the services still work.(thanks to loopback)

There is only one thing I miss from DD-WRT and that is, if my internet went down, accessing any of my local LAN services via the WAN home.myexampledomain.com:port still worked, so I wouldn't have to enter the local IP of my router to check why my internet went down. I could still use the external home.myexampledomain.com:port link I always use. With Asuswrt-Merlin this does not work.

Last night I spent way more hours than I should have researching this and trying different solutions I thought of. I probably spent more time than I will ever spend manually entering the local IP in the rare instances my internet is down. It is far from the biggest issue in the my world, but I am stuck on it for some reason (my personality).

I originally thought the issue was that LAN loopback wasn't enabled, but I quickly realized while that is related it doesn't do what I thought it did and that it was already enabled. I have gone through all the options in DD-Wrt to see if there is any setting related to this that I don't have in Asuswrt-Merlin. I could not find anything that worked.

I think I have to add some iptables commands or a option for dsnmasq, but I am at a loss to what that is.

Can someone please point me in the right direction as I am going in circles now.

Thank you
Jonathan
 
Last edited:
See this thread for more information. Try the solution posted by Asusnet near the end.
 
Since the ASUS router doesn’t have DNS static entries available you could use any local DNS server you are running locally. Enter your internet DNS name with your local LAN IP address instead of the internet IP address. Then point all your workstations to your local DNS and forward your local DNS to your outside DNS.
 
Adding static entries

You can add static DNS entries ;

Ensure you have the jffs partition enabled and then create the file /jffs/configs/dnsmasq.conf.add containing the following;

addn-hosts=/jffs/dns-hosts

Then create the following file with a pointer from your external DNS entry to the relevent LAN IP;

192.168.x.x www.yourdomain.com. (note the trailing dot on the hostname !)

reboot the router and you should find that looking up the relevant hostname from a client connected to your router (assuming they are using DNS form the router) will resolve to the local IP of your choice.
 
See this thread for more information. Try the solution posted by Asusnet near the end.

Form reading that thread It seems that suppresses the errors messages, which I haven't been getting for some reason.

He was also using a local bind server to make it work. I was hoping to get the Asuswrt-Merlin to do all the work.

I could run a DNS server on my synology box, but I was hoping that was a way to get the modem to just know that home.myexampledomain.com is the external domain of my network and route it correctly using the port fowards even if the WAN internet is down.

Since the ASUS router doesn’t have DNS static entries available you could use any local DNS server you are running locally. Enter your internet DNS name with your local LAN IP address instead of the internet IP address. Then point all your workstations to your local DNS and forward your local DNS to your outside DNS.

I thought of that and it might be my final solution, but I was trying to get the router to do it all.
 
You can add static DNS entries ;

Ensure you have the jffs partition enabled and then create the file /jffs/configs/dnsmasq.conf.add containing the following;

addn-hosts=/jffs/dns-hosts

Then create the following file with a pointer from your external DNS entry to the relevent LAN IP;

192.168.x.x www.yourdomain.com. (note the trailing dot on the hostname !)

reboot the router and you should find that looking up the relevant hostname from a client connected to your router (assuming they are using DNS form the router) will resolve to the local IP of your choice.

I tried something similar using the host file, but maybe I didn't do it right, I will try it your way and see if it works.

Off hand it seems doing that way would only resolve home.myexampledomain.com to a single local IP. It seems I would need to add a entry with the ports attached and pretty much copy my WAN port forwards.

I will give it a try though, maybe I am not understanding how that works. I only know enough about most things to get myself in trouble. :)

Thanks!
 

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