Currently Online

Latest Posts

Changes in General Port Forwarding Recipe

Old Title

GeneralPortForwardingRecipe


Revision Differences of Revision 2

Basic rule to enable port forwarding is to answer question + check some thing: 1. Is your computer connected directly to the Internet? (Yes = Ethernet cable is from your Computer to outside of your apartment/ house/ block; No = The cable is from your computer to small box: modem / router; No = WIFI connection; Don't know = You are a student within the University network) ¶

Yes - Skip next step (for answer "No") ¶

Don't know - Also skip, but don't expect a lot ¶

No - do those steps: ¶

Find modem/router or user manual ¶
Find on router (/modem/ in user manual) informations like: "IP: 192.168.1.1 login: admin password: admin". Information can be different between router version and company (I have not IP, but common http addres: "http://tplinklogin.net"). The information should be underneath the router. ¶
Open your internet browser and type the IP address to address bar ¶
Simple login window should open: type admin login and password there ¶
Now you are browsing your router settings. You should remember what you are changing. ¶
To trigger port it is need to set static IP address to your computer. Some routers have settings for that within "DHCP" menu. There is a list of all connected computers/ devices with their IPs. You can copy-paste MAC address to second window (or tab), where you can set static IP address for any machine. That is what we need. ¶
After that we need to set port triggering. Menu "Triggering", "Forwarding" or something like that. It contains list of "From", "To", and "IP". "From" and "To" should be port number = 7396. "IP" is an IP of your computer (you set it just before). ¶
After all you probably have to reboot your router (some of them needs that). ¶

END OF SKIP from answer YES !!! ¶

Let's check the firewall (Especially Windows users!) ¶

If the problem is there, we can easily check it in few minutes: ¶

* Close all not important windows (especially Internet browsers) ¶
* When your system is steady (waiting for your commands, not "thinking"): ¶
* Disable firewall within control panel ¶
* Disable your antivirus program ¶
* Now your computer is very open to any virus/ bot/ ... attack, so we shouldn't stay in that for long ¶
* Open Widelands (really it is better to reopen the game) ¶
* Go to multiplayer lobby and begin the game ¶
* Wait for few seconds/ maybe a minute and check if no error was thrown ¶

IF YES (there was an error): ¶

* Your Internet Provider can prohibit setting up any servers ¶
* Don't know - I am not an expert user face-smile.png ¶

IF NO (there was no errors): ¶

* Have fun with setting up servers ;), but... ¶
* You should probably play with settings of your firewall + antivirus program: ¶
* You should find "White list" of programs or something similar, where you can type what programs are allowed to connect via Internet ¶
* Maybe your antivirus has "gaming mode" (Eset has), so the work will be done by the program itself ¶
* Total disabling firewalls and antiviruses is not a good solution. But you can make it shorter: after setting up a server, you can set up firewalls back. Widelands shouldn't throw any error, because the connection exists
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. Disable firewalls and antivirus porgrams* ¶
5. Check if Widelands is working ¶
6. Play with firewall & antivirus programs settings ¶

* - This step is unsafe. If you don't understand the danger, don't follow it. ¶


# 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: 192.168.1.1 login: admin password: admin ¶

or ¶

http://tplinklogin.net 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 | 192.168.0.101 | ¶
| 2 | Marys_PC | 00-14-22-01-23-45 | 192.168.0.102 | ¶

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: 192.168.0.101 ¶
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: 192.168.0.101 (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
.