NAT Loopback
From OpenSimulator
You read this because you have run into a problem where outside users can connect to your region, but you cannot get in from within your local network. This is defined as a "NAT Loopback issue. Read more here Below are some workarounds and guides. We cannot promise any of these with work in your particular network, but people have reported successes with workarounds in the guides below.
Before you start making changes, make 100% sure the issue IS an actual NAT loopback problem. This tool will help you test your configuration: simulatortoolhelper. Veryfiy that all is correctly set prior to continueing. Installing NAT loopback when you don't need it, can cause connectivity issues.
Installing the KMS NAT Loopback Adapter (Windows 10)
- 1: In the search bar, right next to the Windows icon, type “Device Manager”. From the displayed results, tap on the “Device Manager”.
- 2: From the device manager window, click on action, and then from the drop down box, click on “Add legacy hardware”.
- 3: From the “Add Hardware” window, click on “Install the hardware that I manually select from a list (Advanced)” and after that click Next.
- 4: Now choose “Network adapters” and click Next.
- 5: Navigate “Microsoft” from the left pane under the manufacturer section. Next choose Microsoft KM-TEST Loopback adapter, and click Next until it’s finished.
- 6: Congratulations! You have now successfully enabled the loopback adapter.
Now configure the adapter with your public IP address : Visit http://www.whatismyip.com and note your public IPv4 address.
- 1.On the host operating system, open Network Connections, right-click the local area connection for Microsoft Loopback Adapter, and then select Properties.
- 2.Click Internet Protocol (TCP/IP), and then click Properties.
- 3.On the General tab, click Use the following IP address, and then type the IP address without subnet mask / gateway / DNS (so just the IP, like 64.31.16.122 ). When you hit ok, it gives an error about missing subnet, and fills one by itself. close the error with x and hit ok to apply the settings.
- 4. Even if you run a static LAN IP (preferred), with this setup it is required to configure region.ini with a local IP of 0.0.0.0 else it might still fail.
From a commandline it would look something like :
- netsh interface ipv4 set address name=Interface_Name source=static addr=Public_IP mask=255.255.255.0
In which your Interface name is the name of the connection (Microsoft KM-TEST Loopback Adapter atm probably, mind you can rename it by right clicking it) and your Public_Ip is the address you got from whatismyip.com. If your public IP changes, you need to set it here again.
Some notes to consider:
This whole page is full of WORKAROUNDS. They make things work, but it are not FIXXES. (you get around the issue, but some things will just fail, and keep failing in this scenario). Above should enable you to connect a viewer that resides on the same pc as the simulator. Incoming traffic from the internet should work as well. What does not work in this scenario, is traffic from your local network towards this machine. The loopback only works for the machine it is installed on. All other machines in the LAN have no other means than connecting to the simulator through your router. (which doesn’t support the NAT loopback, remember…). Possibly you can get around that as well, by making an entry in that systems (Hidden) LMhosts file, pointing your public IP tot he local LAN IP of the simulator.
Do i need Hosts or LMhosts ? The "HOSTS" file contains entries that simulate "A" records in DNS (and PTR records, too). Only DNS-legal names are allowed in this file. The "LMHOSTS" file contains entries that simulate NetBIOS name resolution responses. Only NetBIOS-legal names are allowed in this file. So depending on if you run a DNS name or IP-address, you will need to configure and enable LMhost or Netbios lookups on your network adapter.
Again, mind all of the above are workarounds, not Fixes ! Also they make your network function different than normal, which can lead to unexpected results in certain scenario’s. (and troubleshooting these are not for the faint at heart).
Best practice :
Use static IP adresses! If you are running DHCP (dynamic IP addresses) you don't know if the port forwarding is failing, or the public IP has changed. So each time the region doesn´t connect, you would manually need to verify this before starting it. Servers run Statics !
If you can / are allowed to by ISP, buy a different modem/router that DOES support NAT loopback out of the box. Really. Many of the ISP modems can be switched to “bridge mode” (this is without NAT, so they just act as modem), and just forward all traffic tot he device behind it. A list of compatible devices is here : http://opensimulator.org/wiki/NAT_Loopback_Routers
3rd party links :