Hosting Games (Portforwarding Guide)

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Hosting Games (Portforwarding Guide)

Post by m1ndgames »

Hosting Games
If you are connected to the internet throu a router, you have to set up NAT and forward Warzone's Port to the local Network Address of your Pc.

1. Getting the needed information
At 1st, we need the local IP address and the IP address of the router that connects your pc to the Internet

Linux & MacOS X:
Type 'ifconfig', the output should look something like this:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:0F:20:CF:8B:42
          inet addr:192.168.1.100  Bcast:192.168.0.255  Mask:255.255.255.0
          [...]
Where inet addr is your local ip address.

To get your routers ip you have to enter the command 'route -n':

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ra0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 ra0
So, your routers IP address is 192.168.1.1

Windows:
On Windows its a bit easier because the command 'cmd /k ipconfig /all' shows you both addresses in a single output. Look for the active network adapter and get the addresses from the 'IP Address' and 'Local Gateway' Lines.

2. Connecting to your Router
Most routers use a web interface for admninistration, some of them require a cable connection for that purpose.

Open a Browser and connect to http://the-router-ip:port

Because there are many different vendors, you maybe have to fiddle around which port is used for the web interface, in general.. its mostly the standart www port (80), after that you should try 8080 and if that doesent work, check your routers manual.

3. Configuring Port forwarding
When youre logged in to the routers Web Interface (User/Pass should be known, or at least in the manual), search for a option NAT, Port Forwarding or Port Re-direction.

There you can set Port-forwarding Options, for warzone the external and internal port must be '2100', the ip address you forward to is the local ip of your pc where you plan to host warzone games.

After you've set up and saved it, the router should be restarted, that can be done from the admin menu of your router.

4. Testing
Visit http://www.yougetsignal.com/tools/open-ports/ and type in the Warzone Port (2100). The Website connects to the external IP on the given Port and tells you if its either closed (bad!) open but filtered (good) or open (very good ,and most likely your hosting a game right now).

5. Firewalls
If you have set up NAT and still cant host games, a blocking firewall could be the problem.

Windows Firewall:
Click Start -> Control Panel -> Windows Security Center -> Windows Firewall
Image
Click on exceptions and add Warzones port. (2100)
(The pic is from WinXP and the Win7 firewall looks a bit different but basically its the same procedure)

Other Windows Firewalls:
Most firewalls ask for permission to allow or block a application after it tries to connect/get connected. If you dont find the exceptions dialog for your product, look into the manual or contact the support.

Linux:
Most linux distributions dont come with a 'personal firewall' because the linux system (mostly) doesent have open ports when freshly installed. To see if the warzone port on your machine is open, enter this command after opening the game:
sudo netstat -tulpen | grep -v '127.0.0.1'

If its blocked you should check for running firewalls and set rules accordingly.

6. DHCP
If you use DHCP to connect to the router be warned that your local IP might change when the lease expires. Then you have to change the Routers Options again. To fix that, you can set a ip manually and route the port to your machine.

7. Appendix
Hope that Guide helps some of you to set up own muliplayer games, if you have problems configuring your router try to search google with "router name +portforwarding guide". If you need more help, feel free to ask in this topic.
Last edited by m1ndgames on 26 Jun 2010, 09:39, edited 3 times in total.
User avatar
Verin
Trained
Trained
Posts: 313
Joined: 11 Jun 2010, 00:08
Location: Chicago suburbs USA
Contact:

Re: Hosting Games (Portforwarding Guide)

Post by Verin »

great guide! thumbs up.

Im glad i never had to mess with this.
My multiplayer name is Verin
Usually in ideas and suggestions.
I Am also an ASE certified technician.
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: Hosting Games (Portforwarding Guide)

Post by KukY »

It is a nice guie, but it only covers router-based problems.
The problems are more oftenly in your firewall or in your ISP.
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany
Contact:

Re: Hosting Games (Portforwarding Guide)

Post by m1ndgames »

ISP? Why is that? i dont think they filter port 2100?! With the Firewall.. Ill add a firewall section later, but which fw should i explain? The Windows Firewall of course.. and iptables? (i guess people who run a linux fw knoe how to set it up)

\edit: added fw section
Mastablasta
New user
Posts: 3
Joined: 04 Jun 2011, 11:10

Re: Hosting Games (Portforwarding Guide)

Post by Mastablasta »

Mindgames - thanks for making this guide, but I'm not there yet.
I'm on a Macbook OSX 10.6.7. I use an Apple Time Capsule for wireless connection (not sure if that's my router?)
Anyway, where do I type in 'ifconfig' and 'route-n'? I tried in Terminal, but it doesn't seem right.
Hope you can help, I really wanna host!
Thanks,
Playa / Mastablasta
Post Reply