Go Back   Steam Users' Forums > Dedicated Server Discussions > Source DS (Windows)

Reply
 
Thread Tools Display Modes
Old 12-12-2010, 06:38 PM   #1
sphacelus
 
Guest
Posts: n/a
[TF2 DEDICATED SERVER] Couldn't allocate any server ip port

HELP

So i know this has been discussed before, but theres never been an answer for it that I have seen.

I am running a tf2 dedicated server (or trying to), everything is set up correctly, updated and all that.

Port forwarding is set up on my router for both tcp and udp ports 27015. I can VERIFY that port forwarding is set up correctly by checking on a port forwarding checker site such as : http://www.yougetsignal.com/tools/open-ports/

when i put in my ip address and to check port 27015 it informs me the port is open.

If the port is open why can't tf2 dedicated server connect to it??? ( i am running the +exec server.cfg command from the srcds shortcut i created, in the server.cfg file the IP address is set to my WAN address that people should be connecting to)

sv_lan is set to 0, heartbeat is ON, region is set to world.
-hostport 27015 is also set from the srcds shortcut

if i bypass using server.cfg in the shortcut the server will connect at my local LAN address (192.168.11.8) and the server will start up, but the game will be LAN ONLY despite sv_lan being set to 0 and so on.


I've been trying to get this to work for SO LONG, it is definately my router because i can disconnect from the router and just plug straight into the cable modem and start the server and it will connect on a WAN address and people can get in.... but that cuts off any internet from any computers besides my own.


any help on the subject? This is extremely frustrating.
 
Reply With Quote
Old 12-12-2010, 09:34 PM   #2
TheMG
 
TheMG's Avatar
 
Volunteer Moderator
Join Date: Mar 2007
Reputation: 1899
Posts: 10,284
Quote:
Originally Posted by sphacelus View Post
in the server.cfg file the IP address is set to my WAN address that people should be connecting to
That is the problem. The "ip" cvar needs to be set to an IP address that exists on the machine itself. Since the machine is behind a NAT, the IP should be set to the machine's local IP address.

Easier yet: you can remove the IP command altogether. It is only necessary when the machine hosting the game server has multiple IP addresses (this is often the case for servers in data centers).
TheMG is offline   Reply With Quote
Old 12-13-2010, 10:34 PM   #3
sphacelus
 
Guest
Posts: n/a
Quote:
Originally Posted by TheMG View Post
That is the problem. The "ip" cvar needs to be set to an IP address that exists on the machine itself. Since the machine is behind a NAT, the IP should be set to the machine's local IP address.

Easier yet: you can remove the IP command altogether. It is only necessary when the machine hosting the game server has multiple IP addresses (this is often the case for servers in data centers).
so i've tried both of those options mang and nobody is still able to join my game except those computers on a LAN.

if i remove the ip address, the server starts, and connects at : 192.168.11.8, which is a local address..... and therefore nobody at all besides someone on my lan can join the game... i've been fighting with this problem for at least 2 months now without being able to resolve it... I have tried ABSOLUTELY EVERYTHING... and my ports are most definately forwarded, 27015 is open every time i check to see if it is so.
  Reply With Quote
Old 12-13-2010, 10:40 PM   #4
sphacelus
 
Guest
Posts: n/a
crappy router???? it's a buffalo air station

again the only time anyone has been able to connect to my server via the internet is when i disconnect the router and plug the cable modem out straight to my computer..... which is nice but there are 8 devices in my house that are connected to the router and need the internet :/


even if i look up my WAN ip address, and go on a different machine and look for a server at 148.xxx.xx.xxx:27015 (x's representing actual numbers of course) tf2 cannot find any games at the specified address...

Last edited by sphacelus: 12-13-2010 at 10:43 PM.
  Reply With Quote
Old 12-14-2010, 03:47 AM   #5
sphacelus
 
Guest
Posts: n/a
my windows firewall also is turned completely off, so there's no firewall blocking anything.
  Reply With Quote
Old 12-14-2010, 06:47 PM   #6
TheMG
 
TheMG's Avatar
 
Volunteer Moderator
Join Date: Mar 2007
Reputation: 1899
Posts: 10,284
Quote:
Originally Posted by sphacelus View Post
if i remove the ip address, the server starts, and connects at : 192.168.11.8, which is a local address..... and therefore nobody at all besides someone on my lan can join the game... i've been fighting with this problem for at least 2 months now without being able to resolve it...
People need to connect manually using your WAN IP address (http://www.whatismyip.com), not using "join game".

Unfortunately, since your computer is on the same LAN as the server, the Steam Friends/Community feature will report the wrong address when people use the "join game" feature. It is possible to avoid this by using the WAN IP address when you connect so that the correct IP is sent to your friends. However, this may or may not work, since not all routers do NAT loopback (if you are unable to connect to your own server using your WAN IP, then your router doesn't do NAT loopback, and this trick will not work).

The only real way around the problem altogether is to not have the server behind a NAT.
TheMG is offline   Reply With Quote
Old 12-15-2010, 01:45 PM   #7
M33CROB
 
Join Date: Jul 2010
Reputation: 213
Posts: 1,096
Quote:
Originally Posted by sphacelus View Post
so i've tried both of those options mang and nobody is still able to join my game except those computers on a LAN.

if i remove the ip address, the server starts, and connects at : 192.168.11.8, which is a local address..... and therefore nobody at all besides someone on my lan can join the game... i've been fighting with this problem for at least 2 months now without being able to resolve it... I have tried ABSOLUTELY EVERYTHING... and my ports are most definately forwarded, 27015 is open every time i check to see if it is so.
IMO you clearly do not understand networking. Networking is the single most important function of running a server and since you don't understand it, perhaps you shouldn't host a server.

That aside...

Since you are behind a router, you do not want to include the startup command "-ip" unless you are using a linux machine (required to open the port). If you do want to use the argument, you will need to add your 192.168.xxx router IP address and NOT your wan address. If you use your wan address, no one at all will be able to connect because you are telling your server to listen on xxx.xxx.xxx.xxx ip address when the server (the physical machine itself) does not have this address bound to any of its' ethernet adapters. For the sake of the computer, in the example, this address that you are giving it, does not exist. Another way of looking at this is that on your router, when you set up port forwarding, you have to give it your lan ip addresses to forward to. How can you expect this to work if when the data reaches your router, the router sends it to 192.168.x.x but the machine at that address is listening for traffic on an address that is not 192.168.x.x.

TL;DR

Open UDP 27015 on your router. TCP 27015 is only required if using rcon such as sourcebans. Your router must also be able to pass outbound traffic on UDP 27005. Do not use "-ip" in your start up command line.
M33CROB is offline   Reply With Quote
Old 06-26-2012, 10:50 AM   #8
Maxxgold
 
Join Date: May 2011
Reputation: 35
Posts: 183
This is an old thread but just in case someone is having this issue, here is the fix. Set up your ports in you router like this. Don't put -ip on your command line. For some reason if you specify a range of ports it doesn't work correctly. I specify no IP and when the ports are correct your external or Public IP shows up in the GUI box. Laughing at some of the early responses to this problem.


UDP 27000 to 27015 (Gameport)
UDP 27020
TCP 27030 to 27039
TCP 27015 (SRCDS Rcon port)
Maxxgold is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Dedicated Server Discussions > Source DS (Windows)


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 12:24 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.