Adam Frisby

OpenSim on OSGrid – A HOWTO

with 6 comments

Connecting a region to OSGrid is a rewarding experience – many users however run into the difficulty of instructions being out of date; and while this set too will eventually go stale – they should at least be current for the next few months. Before getting started – you need to decide on a few things; information about your region (what to call it, where to put it on the map), where you will host it (at home, or on a dedicated server)

OSGrid is a free OpenSimulator network – connecting a region and using the central services is done free without charge (however donations to keep the infrastructure running are appreciated.)

First – this guide assumes Windows, and also assumes you are hosting from home. Users running in more professional setups will need to adapt accordingly. You may be able to skip a large portion of this setup procedure, by using the automated ‘OSGrid Region Launcher’ utility, you can download a copy of this experimental tool from the OSGrid Website; however this has not been confirmed to work with all users (nonetheless, I recommend it as a first step).

Preparing your region

Before we undergo the region setup process, you need to know your internet facing IP address, have setup appropriate port forwards. OpenSimulator by default will use Port 9000 on TCP and UDP; if you are behind a router you need to forward these ports to the machine that will be running the simulator instance. If you don’t know how to do this – see experimental tool listed above; or consult instructions for your router. You will also need to configure your router to enable ‘NAT Loopback’ – some support this by default, some don’t. If yours doesn’t, you may be out of luck and will need to host somewhere else (see my article on that topic).

You will need to gather two bits of information about your hosting environment, first is your internet-facing IP address – if you do not know it, visit this page. The second is some spare coordinates on the OSGrid World Map. If you don’t know them (or dont care to work some out), you can use this page here. Record both of these bits of information, because you will need them in a moment.

Download a copy of the OSGrid Package. It’s usually about 40mb, and can be currently found at this address: http://www.osgrid.org/elgg/pg/utilities/software

Unzip this package; and look for ‘OpenSim.32BitLaunch.exe’ – ignore the other files within the directory (regardless of whether you have a 64bit or 32bit system) – right click on it, and hit ‘Run As Administrator’; text will scroll by for a little while, then you will be asked a series of questions, in the format “Question Name [default]: _” – the following is how to answer these questions.

Questions

  • New Region Name []:
    This is the name of the region that you want, it should be less than 64 characters long – and cannot conflict with any existing registered region.
  • Region UUID[random]:
    You can ignore this, just hit enter.
  • Region Location [1000,1000]:
    Enter here the region coordinates you wrote down above – exactly as printed in the ‘autocoord’ web page – that is, two numbers with a comma between them and no spaces. (The first number is the X coordinate, second the Y)
  • Internal IP address [0.0.0.0]:
    Hit enter here – 0.0.0.0 means use ‘any availible IP’; this should be your choice unless you know better.
  • Internal Port [9000]:
    This should be 9000, hit enter to use the default.
  • Allow alternate ports [False]:
    If you are using port forwarding, leave this setting as ‘False’ and just hit enter.
  • External Host Name [SYSTEMIP]:
    For this setting you need to put in your internet-facing IP address (or DNS address); you can use the exact output of the page listed above.
  • Master Avatar UUID
    Skip this setting – just press enter.
  • Master Avatar First Name
    Enter the first name of your avatar name here – my Avatar Name is “Adam Frisby”, so here I would enter “Adam” (no quotes)
  • Master Avatar Last Name
    Enter the lastname of your avatar – eg; “Frisby” (again, without quotes)

With a bit of luck, your region should have registered with the grid and is now accessible. Login to the grid, and try teleport to your region via the world map. If it connected successfully; then that is all you need to do – your region is now online.

Chances are however, something went wrong.

Troubleshooting

The following are the common sources of problems when hosting a region from home

  • “Remote Destination Timed Out”, or “Remote Destination is not responding”
    This error means that your port forwarding was not done correctly; and that the grid services were not able to connect to your region on the TCP port. Double check your port forwarding, and that your external hostname is correct.
  • Could not connect to region“, or “(done)“, or “Despite our best efforts, something has gone wrong“.
    This is a more insidious error, it means the grid was able to contact your region server on the TCP port, however the client was unable to contact your region server – double check your port forwarding and check that you have NAT Loopback enabled. If it still gives you problems; your router is incompatible with OpenSim – you may want to read this article on the opensim wiki for additional pointers.
6 Vote

Feedback

If you found this post useful and want me to write more on this topic, please use the vote button to the left or leave me a comment below.

Written by Adam Frisby

August 10th, 2009 at 9:46 am

6 Responses to 'OpenSim on OSGrid – A HOWTO'

Subscribe to comments with RSS or TrackBack to 'OpenSim on OSGrid – A HOWTO'.

  1. Please Note for anyone installing OpenSim.

    Windows .NET users:
    You MUST have .NET Framework 3.51 which is (3.5 SP-1)
    http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7&displaylang=en
    You are better off downloading the FULL PACKAGE of 231 meg. Bootstrapper has some issues depending on version of Windows.

    Linux Users:
    MONO Version 2.4.x is required. 2.4.2 is stable and used most often, yu will have to use teh appropriate distro for the flavour of Linux you are using.
    http://www.mono-project.com/Main_Page will assist you but there are numerous other sources and versions.

    WhiteStar Magic

    10 Aug 09 at 3:20 pm

  2. On the subject of NAT loopback, the following is a solution that has worked for several people without loopback routers. I have not tested it personally as my routers support loopback.

    On the system running the viewer, modify the hosts file to add an entry for the external host name of your region server, listing the internal address. For example, if your external host name is “yadayada.dyndns.org” and the internal address of your region server is 192.168.0.10, you host file line will read “192.168.0.10 yadayada.dyndns.org”.

    On a Linux box the file is /etc/hosts. On windows it is typically C:\windows\system32\drivers\etc\hosts.

    This will override the DNS address for yadayada.dyndns.org on your viewer’s machine, so that when the viewer tries to connect to that host, it will reach its local address.

    I any case, it will almost always be cheaper to replace the router with one that does loopback than to go to an external hosting provider, although there are many other advantages to a hosted solution.

    Jim "Omar" Siler

    19 Aug 09 at 12:19 pm

  3. On the subject of NAT loopback, the following is a solution that has worked for several people without loopback routers. I have not tested it personally as my routers support loopback.

    (see http://opensimulator.org/wiki/Network_Settings)

    On the system running the viewer, modify the hosts file to add an entry for the external host name of your region server, listing the internal address. For example, if your external host name is “yadayada.dyndns.org” and the internal address of your region server is 192.168.0.10, you host file line will read “192.168.0.10 yadayada.dyndns.org”.

    On a Linux box the file is /etc/hosts. On windows it is typically C:\windows\system32\drivers\etc\hosts.

    This will override the DNS address for yadayada.dyndns.org on your viewer’s machine, so that when the viewer tries to connect to that host, it will reach its local address.

    I any case, it will almost always be cheaper to replace the router with one that does loopback than to go to an external hosting provider, although there are many other advantages to a hosted solution.

    Jim "Omar" Siler

    19 Aug 09 at 12:29 pm

  4. On the subject of NAT loopback.

    It is possible to trick a router into supporting NAT loopback if it’s not supported by the router.

    A good knowledge of Linux iptables is required, and the router MUST be running an embedded Linux such as BusyBox.

    First access the router via telnet, then at the routers console, use the commands written below.

    NOTE.
    replace $INET with your internet IP address or hostname without http://
    replace $LANIP with your home servers LAN IP address
    replace $GATEWAY with your routers IP address.
    replace $OPENSIMPORT(S) with the port or port range your regions are using, ei, 9000 for single port or 9000:9050 for a 50 port range

    iptables -t nat -I PREROUTING –dst $INET -p tcp –dport $OPENSIMPORT(S) -j DNAT –to-destination $LANIP

    repeat above line and replace tcp with udp

    iptables -t nat -A POSTROUTING –dst $LANIP -p tcp –dport $OPENSIMPORT(S) -j SNAT –to-source $GATEWAY

    repeat and replace tcp with udp

    This works on my router, and should work on almost all routers that use embedded Linux, but,,,,depending on the router, the lines may stay when power to the router is interrupted, or you may have to re-write the iptables rules everytime power to the router is interrupted.

    Dr B the Master

    25 Aug 09 at 7:40 am

  5. Addendum to my last post.

    If running a grid on a home network, using a router that doesn’t support NAT loopback.

    Add two other iptables rules, and use ports 8001:8006 and port 80 if using wiredux

    Dr B the Master

    26 Aug 09 at 3:06 pm

  6. We need more posts like this!

    Quincie

    27 Sep 09 at 1:04 am

Leave a Reply

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up