1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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!

    Dismiss Notice
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

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

Discussion in 'Asuswrt-Merlin' started by walttheboss, Nov 8, 2017.

Tags:
  1. walttheboss

    walttheboss Occasional Visitor

    Joined:
    Feb 9, 2017
    Messages:
    10
    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.
     
  2. walttheboss

    walttheboss Occasional Visitor

    Joined:
    Feb 9, 2017
    Messages:
    10
    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!
     

    Attached Files:

  3. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,363
    Location:
    Switzerland
    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.
     
  4. walttheboss

    walttheboss Occasional Visitor

    Joined:
    Feb 9, 2017
    Messages:
    10
    Thanks a bunch for your reply. That is helpful to know.