Currently Online

Latest Posts

Changes in General Port Forwarding Recipe

Old Title


Revision Differences of Revision 8

To create port forwarding within router/modem or other device you can follow this recipe. It is very general and it desn't contain all solutions! ¶

If you have direct Internet connection (Ethernet cable), you probably have to check firewalls and antivirus programs (like here). ¶

# Basic steps ¶

1. Login into router settings client ¶
2. Set your computer IP into static one ¶
3. Add port forwarding for port 7396 ¶
4. Ensure that your computer can receive data to port 7396* ¶
5. Check if Widelands
ican host a workingame
6. If not, retry different router, firewall & antivirus programs settings ¶

*-Many firewalls (your antivirus could also act as one) prevent unrecognized accesses. Firewalls are not widelands-aware, and tend to block Widelands from being a game server. You should add a firewall exception. Easy, unsafe and not recommended way is to disable firewalls and antivirus programs. Do not take that path. The correct way depends on the operating system and firewall software. ¶

# Login into router options settings ¶

To login you have to find IP or address of the device. It can be found on router itself (underneath the device), on the box or in the user manual. Most of the devices have their manual on the Internet too. You should find information like: ¶

IP: login: admin password: admin ¶

or ¶ login: admin password: ¶

Typing IP or address to the webbrowser should open a window, where you can use login/password information. Correct login will open settings window (in a webbrowser). Modern routers contain lots of options listed in menu. ¶

Warning: remember the changes you make. Some of them can harm your LAN settings or even disconnect from Internet. All settings can be fixed to previous state, but some of them are hard to remember, so maybe using a piece of paper and a pencil will help. ¶

# Set your computer IP into static one ¶

In a menu find list of devices connected to the router (clicking on menu will not harm anything). On some devices this is under DHCP settings. The list can be like this: ¶

| ID | Name| MAC | IP | ¶
|----|----------------|---------|---| ¶
| 1 | Johns_laptop | 00-40-34-05-A3-4B | | ¶
| 2 | Marys_PC | 00-14-22-01-23-45 | | ¶

For setting static IP we need only MAC address (which you can find also using console), but this table can be useful too: we will set MAC address for John's laptop as it is now (no real change for this device). ¶

So the next step is to find menu for "IP reservations" (or similar), where we can find very simple list with MAC addresses and IPs. Adding new record is like: ¶

MAC address: 00-40-34-05-A3-4B ¶
reserved IP: ¶
state: ON ¶

Save the record. ¶

Warning: after this step, the router can ask for reboot. ¶

# Add port forwarding ¶

In the menu find "Triggering", "Forwarding" or simillar. Adding new record will contain: ¶

Outside port: 7396 ¶
Inside port: 7396 ¶
IP address: (EXAMPLE HERE!) ¶
protocol: TCP ¶
state: ON ¶

# Disabling firewalls & antivirus programs ¶

Warning: This step is higly unsafe for your computer. If you have fragile data, don't do that. Also don't do that if you don't understand the danger. ¶

We will try to put away all firewalls and close antivirus programs. That will open the computer for any attack. So we should check it as fast as possible, and after that set up firewalls back. Before doing it, it is better to close all not important windows, especially Internet browsers (not necessary tabs). Also it is recommended to do the step when your computer stays "ready", not "thinking" (doing something else). ¶

* Firewall of your system can be closed using control panel (Windows) or System Preference (MacOS). ¶
* Some of the routers has firewall too- disable it using settings page ¶
* Disabling all antivirus programs is needed here (open the window of the program and look for general settings, then disable all activities) ¶

After that your system can show warnings that it is open for attacks. Also it is not recommended to stay with the state for a long time (after all you should set up all firewalls back and activate antivirus programs). ¶

# Check if Widelands is working ¶

Run Widelands (if you have it opened, reopen the game). Go to the mulitplayer lobby and begin new game ("Open a new game"). Wait few seconds. ¶

Wrong behaviour contains error message. Also you can't join the game from outside. ¶

Helpful can be running Widelands in a window mode. Then you can try running two windows at once (run Widelands twice). First one will open new game, second one will try to join. ¶

# Play with firewall & antivirus programs settings ¶

If you can host a game, it is good to activate firewalls back. Best way is to activate one program, then check Widelands (if it is still working), then activate second program. Recommended way is: ¶

* activating router firewalls ¶
* activating operating system firewalls ¶
* activating antivirus program ¶

In some cases you should probably define "white list" of programs/ ports that can use Internet without restrictions. ¶

If you have connection with other players and firewalls are not set up, you can try to activate them. That shoudn't harm the connection and the game. Firewalls usually prohibit new connections, and they don't destroy old ones. ¶

# Possible issues that can happened while hosting ¶

All issues refer to opened game, but not played yet. ¶

* Your game has "red circle" symbol ¶

Metaserver can't connect to your game, nobody can do that. Check all steps above. ¶

* Your game has "green circle" symbol, but nobody can't join (the connection is rejected after about a minute) ¶

Probably your antivirus program cause the problem- configure it by defining him a white list of programs with Widelands included (or something simillar). ¶

# For players using virtual machines ¶

Virtual machines are using LAN inside the host machine. That can create long chain of connection: ¶

Internet -> Modem/ Router -> Home Lan -> Your PC -> Virtual Lan -> Virtual machine ¶

It is better to make it shorten: ¶

Internet -> Modem/ Router -> Home Lan -> Virtual machine ¶

That can be done by chagning settings of virtual machine. You need to find Network Adapter settings and change it to "bridged" mode. After reconnecting to the Internet, your router should find one more device and give it IP. That is your virtual machine.