Tech Talk
The little router that could...
Finding a router that satisfies OpenSim’s requrement for NAT loopbacking the UDP protocol, or hairpinning, is really challenging and is one of the most asked technical questions in OpenSim related forums.
After a good search we landed on the Ubiquity Network’s EdgeRouter X which is both cheap and capable. It runs Ubiquity’s EdgeOS operating system and is the smalest of a series of routers that can satisfy up to very demanding routing requirments. Even as the most basic member of the family it can be managed by UNMS™ (Ubiquiti® Network Management System), a comprehensive controller also available on iOS and Android devices.
Setting it up for OpenSim after initial configuration basically means mapping ports to hosts in the Port Forwarding tab of the Firewall/NAT tab of the Edgerouter management screen. You also need to enable hairpin NAT in the same tab.
As mentioned above it will loopback UDP ports, while many routers only will loopback TCP. This is even true for otherwise sophisticated and expensive Cisco business routers.
To make everything work you may also have to do some DNS trickery if you run your own DNS behind the firewall of the router, but that is the topic for another discussion.
One hint here is for the InternalAddress of Regions.ini to use the internal numeric IP address of the server the region is running on, while the field ExternalHostName shall use the fully qualified domain name (and not the IP address) of the server as seen from outside the Router / NAT. Seen from the inside this fully qualified domain name must resolve to the official IP address of the Router. To make that work you can use a record in the hosts file or a record in DNS that points to the external IP address.
The default configuration of this router will support UDP NAT routing of about 280 Mbits/sec. By enabling hardware offloading for NAT in the router the performance increase to around 930 Mbit/sec. The drawback is that you lose the ability to set up QoS policies. Most small grids should not have a need for this anyway, but could be required for a larger installation with many active voice users. In that case one of the other models in the Edgerouter series would be a better choice.
You should be able to find the EdgeRouter X for around $60 or equivalent in a local store or on the net.