Bug 3741 - No master server listing when using NAT router
Status: RESOLVED WONTFIX
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2008-08-11 10:05 EDT by Erik
Modified: 2009-10-12 13:02:10 EDT
1 user (show)

See Also:



Description Erik 2008-08-11 10:05:27 EDT
The master server uses the source-port and source-ip of a heartbeat-packet for connecting to a game server. It only adds a game-server to its list if the game-server replies to the query on that IP/port combination. Many NAT routers however change the source-port for packets sent to the internet. So instead of 27960, the source-port for the heartbeat packet will be 45713 for example. This will cause the game-server not being added to the master server list. Over at Urban Terror forums, we're getting pretty much support requests for this. People whose server won't show up in the master list for this exact reason.

A solution would be to send the net_port in the heartbeat packet and to let the master server use this port instead of the heartbeat-packet-source-port. So this would require changing both dpmaster and ioq3. I wonder if it can be done in a way that won't break compatability with the 'old' IDSoftware master server.
Comment 1 Thilo Schulz 2009-10-12 13:02:10 EDT
I'm sorry, but we will not touch this. You shouldn't be running a server behind a NAT anyways.
And if you introduce your proposed change, it would require the server running locally on the same port as the outgoing port on the NAT machine so you have no guarantee there either.
For the case of player vs. player games you probably will enter an ip/port combination directly anyways, as searching through the master server list can be quite tedious.

I am certain, with clever iptables rules on a Linux box you can make sure outgoing UDP packets always use a certain port number. Why don't you write up a tutorial on how to achieve this?