• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server Server Port Config

Yoshiro

Senior Community Manager
Staff member
  • Oct 10, 2005
    14,522
    1
    4,501
    East Coast
    7707 UDP/IP (Game Port)
    7708 UDP/IP (Query Port)
    7717 UDP/IP (GameSpy Query Port)
    28852 TCP/IP and UDP (Allows your Server to Connect to the Master Server Browser)
    8075 TCP/IP (Port set via ListenPort that your WebAdmin will run on)
    20560 UDP/IP (Steam Port)



    Since the game is running with the Steam backend, if you are running more than 1 server per IP, you will need to make sure that you have some additional ports open beyond the default KF ports. If you change the default Game Port from 7707, this change will be reflected in the Master Server Port (28852) and the Steam Port (20560) as well. For instance, if you change your game port to 7717 (10 more than the default), then your Master Server Port will be 28862 (10 more than default) and your Steam port will be 20570 (10 more than default).

    Handy internet tools I've been pointed too (thanks Sarkie) to test if your ports are open - GRC Shields Up https://www.grc.com/x/ne.dll?bh0bkyd2
     
    yes, thats what im doing as most people seem to be incrementing by 100, i was just curious if incrementing by 10 was possible, espcially as it was given as an example :)

    just seems to make more sense to use 7709 as gamespy query port (i'm probably missing something about why the ports arent adjacent)
    e.g.
    7707 UDP/IP (Game Port)
    7708 UDP/IP (Query Port)
    7709 UDP/IP (GameSpy Query Port)
     
    Upvote 0
    While the ports listed above are correct and indeed the only ports needed some firewalls require a bit of extra tinkering to get the servers listed in the master server list. Also worth noting is that normal NAT routers usually do not allow "loopback" calls. For example if you run a server within your network and try to connect to the server using the external IP when you yourself are within the network it won’t work, this is why most people can’t see their own server in the master serverlist even if others can!

    While most routers and firewalls work by the NAT principle some more advanced firewalls and even a few consumer routers use a technique called PAT. They are essentially the same in that they let many LAN computers share 1 Internet IP but with a difference under the hood that will cause problems for PAT firewalls when trying to host KF games.

    I expect that only quite advanced/paranoid users would be running a PAT firewall so excuse me if the following is a bit technical. The most prevalent example of a PAT firewall would be the PF networking on some Linux/Unix/BSD distributions and firewall distributions based of these. For exempel OpenBSD, FreeBSD, m0n0wall or pfSense.

    PAT firewalls modifies outgoing traffic and replaces the Source IP with the firewalls external IP and also randomizes the Source Port. They do this to anonymize the internal network from the outside world, giving the illusion that all traffic is sent randomly from truly 1 IP. Because this is a behavior of PAT it is not something Tripwire can patch, most games have this issue with PAT firewalls honestly. Normal NAT do not do this. (More info: http://en.wikipedia.org/wiki/Port_address_translation)

    A KF server behind a PAT firewall will work as soon as the appropriate rules/ports are opened BUT it won’t show up in the serverlist. The reason for this is that the masterserver is waiting for traffic from port 28852 and with a correct IP to respond to. PAT obviously makes that impossible. To get this working you must set a Static Port rule for outgoing traffic. This forces the PAT firewall to send the masterserver traffic FROM port 28852 and with the correct Source IP.

    I realize not everyone knows how to do this and in some cases with consumer routers using PAT it might not even be possible. I cannot give any 100% foolproof guide of HOW to configure all the different PAT firewalls out there but I can show you how MY pfSense box is configured in the pictures below (slightly edited for my own privacy). For more specific information about your firewall I would suggest looking at their forums or in their documentation.

    Key things to note:
    1: When creating the Inbound NAT Forwarding’s corresponding rules will automatically be created for inbound.
    2: When changing from Automatic to Manual in the Outbound picture a rule will automatically be created for Outbound so things will keep working.
    3: The new outbound rule for Master Servers MUST be ABOVE the automatically generated rule to gain priority.
    4: In the OutboundRule picture you need to check the Static Port box.
    5: Once all this is done you need to reload you state table. Go to Diagnostics/States to do this.
    6: If you run multiple servers you need to add more static ports for the other servers Master Server ports.

    After that you can start the server and it should show up in the serverlist for OTHER people, you yourself will most likely not see it but ask a friend to confirm that it’s there.
     

    Attachments

    • Inbound.png
      Inbound.png
      42.7 KB · Views: 3
    • Outbound.png
      Outbound.png
      44.9 KB · Views: 3
    • OutboundRule.png
      OutboundRule.png
      54.6 KB · Views: 3
    Last edited:
    Upvote 0
    If you want to run two dedicated servers on the same machine but get an error you need to disable port swap as suggested http://forums.tripwireinteractive.com/showthread.php?p=448935

    Try turning off Port Swap in the .ini and increase the port difference for each Server.

    Might want to add this, I followed your guide to running two dedicated servers on the same machine and it gave me exactly the same error as the first link mentioned until I changed the portswap to false.
     
    Upvote 0
    Yep, sure. Easy done.

    Go here

    Select your model of your modem/router, then goto one of the UT guides and apply the same guide but reaplace the port numbers with the ones given here. (As their is currently not a guide for Forwarding on KF the UT guides will help you login and forward a port, this is the same technique.)

    EDIT:
    If however you are not aware of what modem/router you have contact you ISP as they probably set it up and provided it for you.

    Or

    If you have no acess to the modem/router as you are on a student campus or something similar where everyone gets provided with the connection you have to talk to your network administrators, they'd probably say no, but they are the only ones that can do it unless you know someone with a login....
     
    Last edited:
    Upvote 0
    Ok here is my issue, I have friends I want to game with on here. I have opened all the ports on my router/firewall, so has one of my friends, but we are still not able to join a game I have made or one he has made. Can someone please explain to me what process is next after opening the ports. I am running Windows Vista, along with everyone else that I want to game with. I don't wanna sound like a total noob, but I have not spent a lot of time on computer gaming, so if someone could please "dumb this up" for me a bit it would be greatly appreciated... Thanks
     
    Upvote 0
    While the ports listed above are correct and indeed the only ports needed some firewalls require a bit of extra tinkering to get the servers listed in the master server list. Also worth noting is that normal NAT routers usually do not allow "loopback" calls. For example if you run a server within your network and try to connect to the server using the external IP when you yourself are within the network it won
     
    Upvote 0
    hey guys i wrote some similar thread in this section but no admin has accomplished it yet, so i gonna give it a try here....

    i got some different stat ads on using gametracker or game-monitor
    gamemonitor show me the right amount of players using my server
    gt doesnt.

    some admin on gt told me is used a modded server
    so it doesnt seem to use normal query ports and so on
    but it doesnt
    i used your normal tutorial here for installing and settign up my server
    and all is finde only this weird stats thing..
    i use such stat ads for telling ppl if my server are full or not and they can join...

    so here the different ads
    b_560x95.png
    gametracker uses normal query port 7708
    and gamemonitor uses 28852
    blue2.png


    is there any bug or config issue what i must fix ?
     
    Upvote 0
    Upvote 0
    My router is the Linksys WRT120N. I've got the proper ports opened, but the port test says they aren't open. Anyone with Linksys experience know what's up? Here's a pic of what my port forwarding settings and test results look like:

    [url]http://i50.tinypic.com/157kbif.jpg[/URL]

    I'd start with checking that you have the latest firmware which is version 1.0.04 (Build 02). You can also try using the port forward range tab instead of port forward is the firmware update doesn't work. Beyond that I don't know what else to tell you beyond trying to contact their support. And it doesn't look like you have the option to use a custom firmware like DD-WRT.

    DLink, Netgear, and Linksys have firmware issues with their routers and it's hit or miss on finding a good router. Linksys has probably got to be one of the worst in this area though. Their hardware is good, it's just the firmwares are crap. And they either don't fix it or slow to fix problems. I haven't tried any of the routers from Asus, but they look to have some very nice ones with a lot of power. Which is why it's nice to be able to load custom firmware. One of my co-workers was having problems with his recently purchased DLink 825. Luckily there was a custom version of DD-WRT for his router and it's been working fine ever since. Just crappy firmware.
     
    Upvote 0