What's new

Strange DNS issue on 380.68.4. Cannot go out and back to router.

  • 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!

walttheboss

Occasional Visitor
I am hosting 5 websites at my location. All on one box on the LAN. 192.168.2.13. If I am in the building and try to go to a website it never works. If I put the website in my hosts file it is fine. That bypasses the router. If I am outside the building I can hit any website fine.

I have studied the logs in the router, and using mtr and ping and traceroute.

ISSUE: Traceroute to website from same LAN. It goes out of the building and then never comes back in. Same with any device on any part of the LAN. (ios, android, Windows, Linux etc). Traceroute from home or outside lan goes fine. Right into the LAN and onto the server.

Basically I cannot make a U-Turn. I cannot hit a site that is on my LAN unless it is in my hosts file. THIS is NEW to a newer build. It used to be fine.
 
SOLVED: I am not sure how this happened. I think that the latest Firmware came with this setting disabled. Or I did it by accident. If you are on a LAN with the website you are looking for and do not have that defined in hosts then you need to have NAT loopback enabled. I have no idea why as I am not that smart!
 

Attachments

  • Selection_018.jpeg
    Selection_018.jpeg
    46.4 KB · Views: 808
Tip: Your router with Asuswrt-Merlin comes with a very handy feature: Custom config files.
Instead of adding your locally hosted domains into the hosts file of your devices you can do this on the router.
Then, all devices within your LAN will resolve these domains directly to your server.

For it to work, do this:
- In Administration/System set "Enable JFFS custom scripts and configs" to Yes
- Create the file dnsmasq.conf.add in /jffs/configs/ via Telnet or SSH client
(see https://www.ab-solution.info/use/development-tools.html for clients)

Add this to the file:
Code:
address=/some-domain.com/192.168.2.13
address=/other-domain.com/192.168.2.13
- Restart Dnsmasq to apply the changes over Telnet / SSH:
Code:
service restart_dnsmasq
Now, if you enter some-domain.com it will be forwarded to the IP given, without the need to alter hosts files on any of your devices.
 
Tip: Your router with Asuswrt-Merlin comes with a very handy feature: Custom config files.
Instead of adding your locally hosted domains into the hosts file of your devices you can do this on the router.
Then, all devices within your LAN will resolve these domains directly to your server.

For it to work, do this:
- In Administration/System set "Enable JFFS custom scripts and configs" to Yes
- Create the file dnsmasq.conf.add in /jffs/configs/ via Telnet or SSH client
(see https://www.ab-solution.info/use/development-tools.html for clients)

Add this to the file:
Code:
address=/some-domain.com/192.168.2.13
address=/other-domain.com/192.168.2.13
- Restart Dnsmasq to apply the changes over Telnet / SSH:
Code:
service restart_dnsmasq
Now, if you enter some-domain.com it will be forwarded to the IP given, without the need to alter hosts files on any of your devices.

Thanks a bunch for your reply. That is helpful to know.
 

Similar 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!
Top