Guide to running a D2 server behind a router:
1) Use a router capable of port range forwarding like the linksys.
2) Update the router to the latest firmware.
3) Disable UPnP if present.
4) Ensure the router will accept WAN requests (you should be able to ping it from the WAN side).
5) Configure your LAN statically (Disable the DHCP server on the router).
6) Disable the DMZ feature on the router.
7) Disable any firewall or virus scanner present on the router (logging is acceptable).
8) Set up port forwarding as follows:
15101-15300 TCP&UDP --> Server
27100-28900 TCP&UDP --> Server
IRC PORT* TCP&UDP --> Server
2300-3400 TCP&UDP --> Client
47624 TCP&UDP --> Client
(only this client PC will be able to play against others WAN side...)
*IRC PORT: Use the port chosen for your IRC server (usually 6667, community servers irc.sfcx.org and klingon.stasis.ca are on 6999 however, avoid the default of peerchat.gamespy.com as they have taken to banning D2 servers, I recommend running your own IRC server - see
http://www.unrealircd.com/ it is another discussion again to set it up for yourself, so I recommend irc.sfcx.org to get started.)
TCP and UDP are not necessarily both required for each range, I'm just lazy and use both to be sure and so that I don't have to remember. The forwarding table above is the config I use, but you can modify it as desired to minimise the number of open ports. These are just the ports for the D2 server, IRC server and SFC2 client. More ports are required for GSA, RW etc... This info is present on other threads but I can post it as well if requested.
As all non business grade ISP accounts are dynamically assigned IP addresses now (and don't usually allow servers... shhhh!) I highly reccomend the use of a dynamic DNS service such as
http://www.dydns.com or
http://www.dns2go.com - I use the latter, it has been quite reliable. That way, you do not have to change settings and reboot every time your Public IP address changes. But note that this is not required!
I'll skip instructions for running on SQL unless requested (not available in OP anyway... sigh).
OK, now that you have your LAN configured, your IRC server chosen/installed and your dynamic DNS client installed and running on your server, we can move on to configuring the D2 server and starting it.
Download the latest serverkit: 2.0.3.6 for EAW and 2.5.4.12 for OP. Unzip it and copy the subfolder to the location you want to run it from.
Leave the everything in the serverkit at the default to start (to keep things simple) and only change the following: (I edit server files using notepad with wordwrap off and do not add any hard returns or additional formatting.)
In your campaign file (For EAW = \Assets\Scripts\Campaigns\MyCampaign.mct and for OP = Campaign 1.mct) edit the Name="" line and the Descrtiption="" line (Note that using "http://" will truncate the description so reference webpages without it.)
In your ServersSetup.gf file (For EAW = \Assets\ServerProfiles\MyCampaign\ServersSetup.gf and for OP = \Assets\ServerProfiles\_CentralSwitchPlusAllServers\ServersSetup.gf) add the line:
CentralSwitchAddress = "XXX.XXX.XXX.XXX" where XXX.XXX.XXX.XXX is your current public IP address.
Note that the CentralSwitchPort can only be 27100 for EAW but OP will accept 28100 as well.
In your Chat.gf file (For both EAW and OP = \Assets\ServerProfiles\Chat.gf) replace "peerchat.gamespy.com" with "irc.sfcx.org" and change the port to 6999.
Now open a command prompt and cd to the folder where Serverplatform.exe is installed.
Type "Serverplatform.exe -install" and press enter, hopefully you will not get an error.
Press any key and close the command propmt.
Now edit your CentralSwitchAddress = "XXX.XXX.XXX.XXX" line and replace your public IP address with the domain name provided by your Dynamic DNS service. (Note that the Dynamic DNS service is not required but makes everyhing so much easier, especially if your ISP changes your IP address frequently).
Now start the server by double clicking ServerPatform.exe in the windows explorer (do not start from a command prompt), press 1 and hit enter.
If all went well you should now be able to login to your server from the client on your LAN and play! (note that OP will give a gf entry error on first startup every time - I usually just close it and start it again, the error disappears)
There are different approaches that can be taken, such as using the local IP address of the server in the CentralSwitchAddress line to limit logins to local users only, which does not require the use of a dynamic DNS service either...
This is the way I have done it. I prepared this rather late after many hours of play, hopefully it's not too confusing.
Any questions, additions or input is welcome!