• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Need some help from soembody who knows about NAT

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

ps2cho

Member
Joined
Oct 13, 2004
Ok my problem is that, i specify port 27015 for my HLDS server, yet when the server starts, it is given a port between 60001-69999...now i understand this is a NAT problem because its re-mapping port 27015 to one of the 6k ports.
Does anybody know how i can fix this ?

I know for a fact that this problem is huge down at the steam forums because loads of people are having this same problem, maybe somebody could finally solve it ?
thanks, ps2cho
 
The Halflife server itself is unaffected by your nat config. If the Halflife process on your machine is picking the wrong port, thats a Halflife problem.
 
I have in the target field -port 27015
yet when it starts up (and everytime i restart) it ranges between 6000-69999
Also, if i restart the computer, the port changes again.
 
what do u mean the "startup text?"
There is nothing wierd at the beggining of the servers startup
the target line is :
Z:\ServerDoc\serverdoc.exe Z:\hlserver\hlds.exe +maxplayers 16 -game czero -console +port 27015 +map de_dust2_cz
 
You can't paste the output from hlds.exe?

What happens if you tell another box on your lan to connect to it on port 27015?
 
No over my LAN it displays as 27015 eg.
from my gamin pc ill type:

connect 192.168.0.103:27015
and it will connect but the port that the people over the WAN see
myiphere:62754 or whatever 60000 number is randomly chosen...grr...
 
Ok.

What happens when you ask someone on the internet to connect to 27015?

This is starting to sound like a problem with your router, except you say it shows up in hlds which it should not.
 
When anybody adds myiphere:27015
it doesnt come up, not responding.
they have to search the game list and then add from there.
Here, check it yourself. the current IP is :
68.109.66.38:60138
Yet i look on Lan it says 192.168.0.103:27015

ehh....i know loads of people are having trouble with it, yet nobody has ascertained a solution.
 
As I understand it...
This is most likely an issue with the router and the website that you are being listed on. You can NAT ports IN on the linksys, netgear etc., but that does nothing for outgoing data or ports. The hlds sends traffic to the router on port 27015 and the router NATs it because it has not been told not to NAT traffic on that port outgoing. Then the website sees the NAT'd traffic and lists that port.

Possable solution:
I have a more advanced router (Netopia R910 (3386 replaces r910)) that will allow me to do static or dynamic NAT and PAT for incoming and OUTGOING. I can also add NAT and PAT ranges and MAPs. Essentially it gives me WAY more control over how data is leaving my network. It is also a little more difficult to setup. (all command line or text menu driven)
The R910 cost me about $200 USD 1.5 years ago, I believe the 3386 can be had for around $160 USD.

Good Luck!
 
I figured that buying a better router would solve the problem...but im 16 and $$$ :-/
Now what i find confusing is how i used to hardwire it to the back of the router and it used port 27015!! So why now that iv added an 8port switch into the equation, it refuses to use port 27015 ? I understand that a switch is a layer 2 device and cant possibly be the problem because it's in a simple explanation, a hub /w mac address tables.
So something wierd is going on, im just thinking about it and im going to try maybe updating the firmware on the router to a previous one...
:-/
Could it possibly be an ISP related problem? just throwing ideas up...
 
The switches and router shouldn't matter. Either the port gets forwarded or not. In either case hlds.exe on your computer doesn't know that the router exists or that it is forwarding ports, so hlds should behave the same way in any condition.
 
oh yea and i just tried 2 other computers and they all host it fine, but the ports are all in the 60000 region, so it isnt the computer..
 
Someone here should point halflife to 68.109.66.38:60138 and see if they can connect or not.

Can you give us a screenshot of your router admin page where you are setting up port forwarding?
 
The steam Windows on the left, that is you checking out your own game from your house I presume?

Can you phone a friend (or maybe someone here can do it) and check out your game from completely outside of your network? Most routers won't port forward for you if you are inside the network.
 
No people can join! People play on my server everyday, i pretty much play with my friends on it ! Anybody can join it. Its just the port that i wanna fix!
 
engjohn said:
As I understand it...
This is most likely an issue with the router and the website that you are being listed on. You can NAT ports IN on the linksys, netgear etc., but that does nothing for outgoing data or ports. The hlds sends traffic to the router on port 27015 and the router NATs it because it has not been told not to NAT traffic on that port outgoing. Then the website sees the NAT'd traffic and lists that port.

Possable solution:
I have a more advanced router (Netopia R910 (3386 replaces r910)) that will allow me to do static or dynamic NAT and PAT for incoming and OUTGOING. I can also add NAT and PAT ranges and MAPs. Essentially it gives me WAY more control over how data is leaving my network. It is also a little more difficult to setup. (all command line or text menu driven)
The R910 cost me about $200 USD 1.5 years ago, I believe the 3386 can be had for around $160 USD.

Good Luck!
engjohn is correct here... When you register your server with the listing server, the communication happens as so:

Game server, port 27015 makes an outgoing connection to the router, which NATs it, and opens a random port in the 60,000 range (btw, the highest port is 65535).
The Listing server receives the connection from the NAT box, port 6xxxx, and says, hmm.. that server must be running on port 6xxxx. So it lists it as 6xxxx.

The only way to properly do this 27015<>27015 external is to get a more advanced router that allows static mapping or a linux box as a router, or to put the game server in front of the NAT, if you have multiple IPs, and aren't worried about security.
 
what do u mean by in FRONT of the NAT? I tried a DMZ and that didnt work either.
 
Back