Topic: [TUTORIAL/SOLUTION] How to find more servers! Windows
Hello community,
(this tutorial is available in german here)
some users are complaining that they are only able to find just a little part of the servers.
This issue may be caused by some router's firewall, which blocks some of the incoming packets of the server information.
To fix this blocking we need to create a port-forwarding.
(Maybe the packets are blocked by the internal firewall of Windows, you need to let teeworlds communicate through it then)
The biggest problem that we got is, that teeworlds used to bind on a dynamic port. So this makes it hard to open a specific port if teeworlds uses another one each time.
Bind Teeworlds to a specific port
But Teeworlds already has got a built in config-variable: bindaddr
If this one is set, Teeworlds tries to bind to this address (including the port):
bindaddr "localhost:PORT"
for examle:
bindaddr "localhost:54321"
As this variable is not saved, you should insert it in your autoexec.cfg, use a linkage or create a .bat file in your teeworlds-folder with the following content (you have to change the PORT to your port of course):
@echo off
start "" "teeworlds.exe" "bindaddr "localhost:PORT""
exit
Which Port should I use?
The port is defined by 2 bytes (16 bits). Therefore it has 2^16 possibilities and a range from 0 to 65535.
But you should choose a port, which does NOT appear in this list as this port may be in use already: List of used ports
Test, if the binding was successfull
We can simply use the Windows-TaskManage and a windows console to test the successfull binding:
First open your Task-Manager and activate the process-id:
Go to View->Select Columns
If you know the process-id of teeworlds we can do the next step:
Open your console and execute "netstat -a -n -o", which gives us an overview of the used sockets.
Search on the right side for the known process-id:
You should now see that teeworls bound to your specific port.
"65535" in this example is exactly the port I defined.
If your port does not match, it is probably in use, so you need to try another one
Create the port forwarding
I own a Fritz!Box, but the basic steps will be identical on other routers:
Just go to your port-settings and create an UDP based port forwarding.
The port on your router and the one to your computer should be the same, e.g. :
(You need to change the "65535" to your port-number).
And that's it. I hope this worked for you !
Sincerely,
Pata