What is your IP address and server name? What ports do you have forwarded in your router? What router are you using? Who is your ISP? When is the last time you ran hldsupdatetool?
Bingo!!!! Hlds.exe initiates the connection with Steam and the auth server, and will use a psuedo-random out going port for most traffic, especially the tcp traffic. Because hlds initiates the connection, it does not matter what the local port number is. The remote knows what port it came from, and will send data back to that port. If your router translates the port, it still doesn't matter because so long as hlds initiates the connection AND your router keeps the port open (most do), everything works fine.
There is one port that matters, and that is the port that clients use to connect to your server. They expect that port to be open, and will not be able to connect if it isn't. Hlds will tell the master server what this port is, actually I believe hlds will send a packet out on this port to the master server, and the master server will receive it and use it as your server port. If your router forwards this port (27015 is default), then the master server will list your server on that port (27015) and since the port is open, clients can connect to your server. If you do not forward any ports, then hlds sends traffic out on 27015, your router translates it to 12345 (or whatever), and the master server sees 12345 and lists your server on the master list on that port. Since your router opened the port when hlds sent the traffic out, the port stays open and clients are able to connect on port 12345.
Note that with most routers that will open outgoing ports, you do not actually need to forward any ports at all to get your server to work and to be listed on the master list. Also again note that with most traffic it does not matter what your local port is and in fact hlds will use psuedo random ports. The UDP traffic to/from your server and the client (players) will be on a fixed local port (default 27015). That port will not be random, but will always be the same unless you specify a different port.
It's when your router doesn't open the outgoing port, or does not keep it open, that things go wrong. Also, if a firewall blocks any of this traffic, things won't work. I had a Belkin router and I NEVER got my server on the master list. I suspected the Belkin was closing ports after a very short timeout. This would cause incoming requests to be rejected, and the master server thinks your server is dead and does not list it. I was not able to prove this, but it's my best theory at this time. My second theory is that the Belkin is just a crap router that randomly drops UDP packets, again causing the master server to think your server is dead.
These ports appear to be totally random and nowhere near the 27030-27039 range that we are told to forward. Correct me if I am wrong, but this seems to make it impossible for complete and proper data exchange to occur (as far as I can tell so far) because not only does my hlds send packets from those random ports, but the steam server then tries to *talk back* to my server on those ports, which of course does not work since I have no way of forwarding that port because it changes EVERY time I restart the server. Hence my guess that this is why it wont show up in the master list.
Steam knows what ports are open on your end, and will send data back to those ports. This has been this way for a long time and it works well assuming your router opens the port and keeps it open without changing it. If your router does not keep the port open, or if your router changes the port, then problems happen.
Does my rambling on make any sense?
----- Original Message ----- From: "CHiLLZ" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 30, 2004 7:00 PM Subject: [hlds] Port forwarding problem- random TCP port
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Ok, I have been trying to figure out why one of my servers is not showing up on the master server list, and I think I have the issue nailed down. I am running a Win2k Server box behind a basic NAT router. People can join my the game if I give them the IP, and I can see it on the LAN tab, but it never shows up in the master server list in steam. I have observed the packet traffic on the connection and found the following when starting the CS:S dedicated server...
Every time the server runs there is UDP traffic from the server box to the steam1 (207.173.177.11) and steam2 (207.173.177.12) master servers, both over UDP port 27015. The other traffic that happens every time the server runs, are TCP packets trying to reach port 27030 of steam1 (207.173.177.11). No surprise right? Well, if it were being SENT from TCP port 27030 on my server that would make sense, but here is where the problem occurs... every time I run the server, hlds.exe uses a different TCP port to *send* those TCP packets from that are destined for TCP port 27030 of steam1!!! So for instance- 3 TCP ports that were used by my server on 3 consecutive startups: 1212, 1306, 1411
These ports appear to be totally random and nowhere near the 27030-27039 range that we are told to forward. Correct me if I am wrong, but this seems to make it impossible for complete and proper data exchange to occur (as far as I can tell so far) because not only does my hlds send packets from those random ports, but the steam server then tries to *talk back* to my server on those ports, which of course does not work since I have no way of forwarding that port because it changes EVERY time I restart the server. Hence my guess that this is why it wont show up in the master list.
So the bummer about all this is now I am pretty sure what is wrong, but am no closer to solving the issue than when I started. I have already tried specifying the IP and port in my startup command line and that has not made any difference. There was a somewhat similar issue on Unreal Tournament 2003 dedicated servers when that game first came out and the developers wound up having to code in a check for the server "port swapping" the query port. This makes me sad to think there might be a similar issue here that is beyond my control. Which would also mean that we would have to wait for a fix... ugh.
Thoughts anyone?
- CHiLLZ --
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds

