OpenSimulator · EN

Home router, NAT and loopback

Why remote visitors sometimes connect while local users fail.

Educational guide with fictional examples. Verify OpenSimulator versions, networking and security before running a production grid.

Definitions: NAT, port and forwarding

NAT (Network Address Translation) maps traffic between private and public addresses. A TCP or UDP port identifies a network service or flow; 9000 is a common example region port, not a universal requirement. Port forwarding establishes a rule such as incoming public IP:9000 → 192.168.1.50:9000 for the required protocols.

How port forwarding works

Example: a remote viewer reaches grid.example:9000. DNS resolves to the router's public IP; the router forwards packets to 192.168.1.50. If the PC firewall blocks them or OpenSim listens elsewhere, forwarding alone does not help. Router menus may call this NAT/PAT, port forwarding or virtual server.

Illustrative example: adapt to the actual installation.

Visiteur Internet -> DNS -> IP publique de la box
                   |
                   v
         Règle NAT TCP/UDP 9000
                   |
                   v
        PC 192.168.1.50:9000

What is NAT loopback?

NAT loopback (hairpin NAT) allows a device behind the router to reach another local device using the router's public IP or public DNS name. Without it, outside visitors may enter a region while its owner on the LAN cannot use the public address advertised by the simulator. Depending on the path, OpenSimulator region handshakes may fail.

How to diagnose loopback

Test separately: LAN to private server IP; outside network to public DNS; finally LAN to public DNS. If the first two work but the third fails, suspect hairpin NAT or local DNS handling. Check region and firewall logs too: TCP success does not prove UDP works.

Illustrative example: adapt to the actual installation.

# Exemples non destructifs : adapter l'adresse et le port.\nnslookup grid.example\n# Depuis Windows : Test-NetConnection grid.example -Port 9000\n# Depuis Linux : nc -vz grid.example 9000\n# Ces tests TCP ne remplacent pas un test UDP/viewer.

Possible solutions without guesswork

Enable NAT loopback if the router supports it. Otherwise consider split-horizon DNS (different internal and external answers) or a suitable network arrangement, checking actual addresses advertised to viewers and HTTP/UDP behavior. Editing a single hosts file does not solve every flow, and a ROBUST fix may not correct region UDP connectivity. Test both LAN and internet clients.

Double NAT and CGNAT

Two routers in series may need forwarding at both hops or a redesigned setup; compare the router WAN address to your observed public IP. ISP CGNAT is different: home forwarding cannot open upstream carrier ports. Do not enable blanket DMZ or UPnP as a default workaround.

Further reading