Running a local server HowTo
This a recipe
- how to run a local server
- and allow others to connect to it
- while connecting locally as well
- even if your router doesn't allow you to connect to your external IP.
This is an issue several people have had in the past. It comes up, when you are setting up a local server and enter your external IP in the ClusterConfig.xml which guarantees others can connect to it from the outside (assuming you have poked the right holes into you firewall, usually TCP port 3000) and suddenly you cannot connect to your local shard anymore. Some prerequisites:
- <ServerAddress> ..... </ServerAddress>
- This entry in your ClusterConfig.xml MUST match the way you are connecting.
- If you are using <ServerAddress>127.0.0.1</ServerAddress> you MUST enter 127.0.0.1 in the "Address: " field for manual connections on the page with the server list. If you do that noone will be able to connect to your server from the outside.
- If you are using your external IP like <ServerAddress>123.123.123.123</ServerAddress> people from the outside can connect to your server under the assumption you have configured the correct port forwarding in your firewall(s) (Yes - some people use the routers FW + their Windows Firewall...). But - depending on your router you might or might not be successful connecting to your server using that external IP. If you use 127.0.0.1 instead, you will get autherntication errors.
- In the case above the following fix should work:
- Configure a dynamic DNS service, which gives your local server a DNS name.
- Enter the FQDNS name, e.g. myshard.dyndns.org, or whatever you got into your ClusterConfig.xml fields, like: <ServerAddress>myshard.dyndns.org</ServerAddress>
- Also add that name to your windows hosts file. It should be at %windows%\System32\drivers\etc\hosts. You will need admin rights to edit it, so start your editor in admin mode. Being on an admin enabled user account is not enough. The entry should look like:
127.0.0.1 myshard.dyndns.org