I can't reach my own static IP address in my home. I can reach it outside of my home

I purchased a static IP for a server I run at my home. I can access it outside the home, but I cannot reach my server with my static IP address when connected to the home network.

It just works with a local IP, and it is not possible to access directly with the domain.

I am using a TP-Link Archer VR1200 AC 1200 router on Debian 11 in Workstation Pro on Windows 10.

What could be the reason for this?


This is very common and it means your router does not do hairpinning SNAT, usually requiring a specific configuration on the router, depending on which router platform you have. Some router platforms do not support hairpinning (I think my own D-Link required a firmware upgrade, some time ago).

  • The "proper" solution (as @RonMaupin correctly points out) would be for the network to have its own DNS resolver so the domain, from the intranet, is resolved to its real intranet address; this setup isn't usually available in a SOHO/Home setup and is offloaded to the modem-router, where instead of doing DNS resolution, it routes the packets back after de/NATting them.
  • A somewhat kludgy "workaround" is to modify your static DNS resolver [/etc/hosts or %WinDir%\SYSTEM32\drivers\etc\hosts] and map the external resolved domain name [www.yoursite.com] to the internal IP address [e.g. 192.168.2.253]; you should then be able to access the site using www.yoursite.com, and if the site runs name-based virtual hosting, it will work and you'll be able to use the various developer tools that wouldn't work with the numeric IP address.
  • Some firmwares [OpenWRT, etc.] also have the option of doing DNS caching and resolving [overriding] some hosts internally, usually done to cut out some ad-sites by mapping them to 127.0.0.1, but if used, it can override that one domain name with the internal IP address.

The best you can reasonably hope for, unless you set up an internal DNS, is to reconfigure the router yourself, or speak to the ISP and have them set up hairpinning properly.