Doodman
09-22-2004, 06:27 AM
The reason that this does not normally work, is that most routers will not forward packets to through the external address when coming from inside the router. To get around this you can do a DNS "trick".
First, you will need a DNS name for your external IP. Either use the one your ISP gives you or go register one at dyndns.org or somesuch place.
Let's use these numbers for this example:
External IP: 1.2.3.4
External DNS name: 1-2-3-4.myisp.com
Internal IP of EQEMu server host: 192.168.1.100
In you servers LoginServer.ini, use the external DNS name for your world address:
...
worldaddress=1-2-3-4.myisp.com
...
boot5zones.bat (or whatever)
zone.exe . 1-2-3-4.myisp.com 7001 192.168.1.100
That takes care of the server, nothing out of the ordinary there. Here comes the "trick" part:
On the machine you play eq from, put a hosts file (\windows\system32\drivers\etc\hosts) entry that points your external DNS name to the internal IP address of your server.
192.168.1.100 1-2-3-4.myisp.com
Then, when the loginserver and world tell your client to connect to 1-2-3-4.myisp.com, it will look up the address (first trying the hosts file and -then- using DNS) and will find the address of 192.168.1.100 instead of 1.2.3.4.
All should be fine from then.
NOTE: This does NOT work with the 5996 loginserver. It has some code in it that uses the IP as part of the hand off to world. And because one is behind your router and one is not, the loginserver and world will see you coming from different IP addresses and world will not let you log in. The fix? Use the 5994 loginserver.
First, you will need a DNS name for your external IP. Either use the one your ISP gives you or go register one at dyndns.org or somesuch place.
Let's use these numbers for this example:
External IP: 1.2.3.4
External DNS name: 1-2-3-4.myisp.com
Internal IP of EQEMu server host: 192.168.1.100
In you servers LoginServer.ini, use the external DNS name for your world address:
...
worldaddress=1-2-3-4.myisp.com
...
boot5zones.bat (or whatever)
zone.exe . 1-2-3-4.myisp.com 7001 192.168.1.100
That takes care of the server, nothing out of the ordinary there. Here comes the "trick" part:
On the machine you play eq from, put a hosts file (\windows\system32\drivers\etc\hosts) entry that points your external DNS name to the internal IP address of your server.
192.168.1.100 1-2-3-4.myisp.com
Then, when the loginserver and world tell your client to connect to 1-2-3-4.myisp.com, it will look up the address (first trying the hosts file and -then- using DNS) and will find the address of 192.168.1.100 instead of 1.2.3.4.
All should be fine from then.
NOTE: This does NOT work with the 5996 loginserver. It has some code in it that uses the IP as part of the hand off to world. And because one is behind your router and one is not, the loginserver and world will see you coming from different IP addresses and world will not let you log in. The fix? Use the 5994 loginserver.