router - Cannot reach domain hosted within same private network

07
2014-07
  • paislee

    I have a website hosted on a home server, accessible from the outside by a domain name I purchased and mapped to my router's IP with help from a dynamic DNS service.

    The problem is that I cannot access the site using the public web address from within my home network, i.e. no device on my home WiFi can connect; the requests all time out. For it to work I have to add a host mapping to the internal IP of the server in question, on each individual device.

    Why is this happening and what is the right solution?

    I am using an ASUS RT-AC68R router. It has port forwarding from port 80 to the internal IP of the server in question.

  • Answers
  • Spiff

    Your router isn't doing Hairpin NAT correctly.

    Possible Solutions:

    • Switch it on via the admin UI if you can.
    • Make sure you're running the latest firmware from the manufacturer in case they fixed this in a later release.
    • See if your router has shell access and set it up yourself via Linux commands.
    • Upgrade to a third party aftermarket firmware distro (such as DD-WRT) that supports this, if you can find a distro that supports your router.
    • Upgrade to a different router make/model that supports this. I know Apple's AirPort (including Time Capsule) line have always been great at supporting this, but I can't vouch for anyone else. Apple's 2013 802.11ac tower models are excellent performers and very reliable in my experience.

  • Related Question

    router - Host name resolution on a home network
  • Questioner

    I have several machines (both virtual and physical) in my internal network at home. Currently I have to connect via 1P addresses. The one main machine I connect with to all the other machines is running Windows Vista. Is there a way I can have some sort of DNS capability inside my network as well so I can refer to these machines with a name? I think this would be a common problem in most households (running a few computers) and I think there might be some simple solutions out there. This would be something most routers should support out of the box - but why don't they? Can anyone recommend some of these or an easy way to accomplish this?


  • Related Answers
  • Gomibushi

    WINS/NetBIOS is the traditional distributed "workgroup DNS" for small private networks. It's why you can see other computers in the "Network" on Windows.

    If you have static IPs and don't change around your VMs or computers, then just making a quick hosts file and distributing that is a quick, easy and once over fix. "Visiting laptops" won't resolve to that of course.

    http://en.wikipedia.org/wiki/Hosts_file

    Afterthought: If these are Windows computers, then simply enabling Network browsing, and file and printer sharing should do the trick.

  • Redder

    DD-WRT might be the solution for this problem, from their About page:

    DD-WRT is a third party developed firmware released under the terms of the GPL for many ieee802.11a/b/g/h/n wireless routers

    It has a large set of features, including a small DNS server Dnsmask, which is bescribed as:

    It is designed to provide DNS and, optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file.

    Here is the tutorial from their website on how to do that: DNSMasq As DHCP Server

  • Chris Lercher

    Many routers do support this. Try to use telnet (or maybe ssh, if it supports that) to connect to your router, and look for a dns menu.

  • Spiff

    Microsoft's LLMNR in Vista and Windows 7 is supposed to do this. Is it not working?

    IETF Zeroconf (which is implemented by Apple as "Bonjour", and implemented by the Linux/FOSS community as "Avahi") also does this, via multicast DNS (mDNS). Installing Bonjour for Windows on all the relevant machines might give this to you.