Skip to content

Instantly share code, notes, and snippets.


Nicolai von Neudeck vonneudeck

  • Berlin
View GitHub Profile

I have a service running on a LAN that are also exposed over the WAN, say Service A is reachable under and it’s running on Host A in the LAN. The way this is implemented is port forwarding in the WAN gateway in the LAN:

public_ip:80 -> host_a_ip:80

Now I have a laptop that is often in the LAN, but not always. When that laptop is in the LAN, it can’t reach, because the gateway port forwarding doesn’t work for internal requests (and their is no option to add/enable this). I also can’t replace the gateway router. So when that laptop wants to access while in the LAN, it has to use the internal LAN ip of Host A.

Rest assured this is annoying. How can I make it, so the laptop can reach regardless of whether it is in the LAN or not?