SRCDS Steam group


a simple question about ip/ports
#1
Ok, so I'm having problems assigning an IP to my server. For example, to start the server, I type:
./srcds_run -game cstrike -ip 64.254.68.84 +maxplayers 6 +map de_aztec

I have the server running on a linux computer on my LAN, and I can start the server on my LAN when I assign it my private IP of 192.168.0.104. However, when I type in the IP of my modem, 64.254.68.84, i get this error:
Auto detecting CPU
Using default binary.
Auto-restarting the server on crash

Console initialized.
WARNING: NNET_OpenSocket: bind: Cannot assign requested address
Couldn't allocate dedicated server UDP port
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Wed Feb 9 20:23:03 PST 2005: Server restart in 10 seconds

So this makes me think that I need to open up some ports. I opened these ports, and forwarded them to private ip 192.168.0.104 on my router:
1200 (UDP)
6003 (TCP)
7002 (TCP)
27005 (UDP)
27010 (UDP)
28011 (UDP)
27015 (UDP)
27040 (TCP & UDP)

So shouldn't it work? What might I be doing wrong?
Thanks for your help
Reply
#2
You can only bind srcds to an ip that's active on you server, so you must start srcds with the LAN-ip.
Just opening ports won't work, you have to forward the ports on you modem to the LAN-ipadres of you server.
Note for our MickeySoft users:
A reboot a day, keeps Dr.Watson away Big Grin
Reply
#3
Ok, so I can start srcds fine with my LAN-ip, using 192.168.0.104, but I want to host more than just a LAN server. How are people supposed to be able to connect to my server using my public IP, 67.137.156.126?
I'm sooooooo anxious to get this running!
Thanks for the reply Smile
Reply
#4
I am assuming your running your server from home and have a basic router.

go into your router settings and enable DMZ for the address that the server is on, then start the server with the LAN ip, and all those on LAN will see it with its LAN ip, all those outside of your LAN on the internet will see it with your external IP.
United Strike Marine Corps
USMC-CO| θ (theta)
Reply
#5
Ok, so I added my server's assigned LAN-ip, 192.168.0.104 to the DMZ..
However, I still have the same problem..

I can start srcds fine when I type:
./srcds_run -game cstrike +ip 192.168.0.104 +port 27015 +maxplayers 6 + map de_aztec
However, this only shows up in my LAN, which I can connect to fine.. But all my friends who want to connect to the server from the public ip, 67.137.156.126, cannot.

when i start srcds using my public ip, i get this error message:

./srcds_run -game cstrike +ip 67.137.156.126 +port 27015 +maxplayers 6 +map de_aztec


Console initialized.
Warning: NNET_OpenSocket: bind: Cannot assign requested address
Couldn't allocate dedicated server UDP port Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Reply
#6
As I said before the seconds command won't work because the IP is not active on your server.

Take a look at the manual of your firewall/router and look for "Portforwarding" or "PAT". There you can tell your router it must forward the traffic on port 27015 to ip 192.168.0.104 so it can reach your server.
Maybe isn't port 27015 enough and are there more ports you have to forward on your router
Note for our MickeySoft users:
A reboot a day, keeps Dr.Watson away Big Grin
Reply
#7
ok, so when I use the second command that you suggested:
Quote:./srcds_run -game cstrike +ip 192.168.0.104 -port 27015 +maxplayers 6 +map de_aztec
Then the server starts right up and I get this:
Quote:Auto detecting CPU
Using default binary.
Auto-restarting the server on crash

Console initialized.
Network: IP 192.168.0.104, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Attempted to create unknown entity type event_queue_saveload_proxy!
Game .dll loaded for "Counter-Strike: Source"
maxplayers set to 6
Executing dedicated server config file
Unknown command "stname"
Unknown command "stname"
Adding master server 207.173.177.12:27011
Adding master server 69.28.151.178:27011

Now.. Since I have all of the right ports open, shouldn't people be able to see and connect to my server from my public ip, 67.137.156.126:27015? If you read my very first post, I mention all of the ports that I opened up.. I opened more than just 27015. Thanks for the replies
Reply
#8
have you enabled DMZ for the LAN ip that your server is on?
United Strike Marine Corps
USMC-CO| θ (theta)
Reply
#9
Yep, DMZ is enabled for the LAN-ip address of my server
Reply
#10
ok start without the ip option in your command line. use the port option only if you are running multiple servers on your box with same ip and different ports. If you are only running one server off your box, then just forget the port option.

i.e.
./srcds_run -game cstrike +maxplayers 6 +map de_aztec

after that, you will se it in lan, everyone outside will see it on the internet list
United Strike Marine Corps
USMC-CO| θ (theta)
Reply
#11
In steam, it shows up on my LAN list, but I can't see it in my favorites when I add it using my Public IP.. Everyone outside of my LAN should be able to connect to it from my public IP 67.137.156.126:27015, right??
Reply
#12


The basics of this problem are that 192.168.0.104 or any address on your LAN will not be routable accross the internet as they are not resgistered, so therefor no one can see those machines.

The other address however, is registered and routable. As this address is not assigned to your server but your router/modem you will need to basically trick the outside world and you can use one of these methods to do so:

Port Forwarding
Port Address Translation
Network Address Translation

Port forwarding is the easiest, but all of the above options depend on your router/modem config.

Hope this helps.
Reply
#13
c0d3ster Wrote:In steam, it shows up on my LAN list, but I can't see it in my favorites when I add it using my Public IP.. Everyone outside of my LAN should be able to connect to it from my public IP 67.137.156.126:27015, right??

If you want to add it to your favorites when you are on your LAN, you use your LAN ip (192.168.xxx.xxx).

For many home routers, you do not need to worry about port forwarding, etc., as the DMZ will take care of that. Just make sure your linux firewall is enabled.
United Strike Marine Corps
USMC-CO| θ (theta)
Reply
#14
c0d3ster Wrote:In steam, it shows up on my LAN list, but I can't see it in my favorites when I add it using my Public IP..
That's normal, most routers doesn't support making a connection from the outside back inside.

c0d3ster Wrote:Everyone outside of my LAN should be able to connect to it from my public IP 67.137.156.126:27015, right??
Yes, that shoud be
Note for our MickeySoft users:
A reboot a day, keeps Dr.Watson away Big Grin
Reply
#15
If you have configured the port-forwarding correctly like explained by several members in this topic, then you should be fine on that area.

Did you have to reset your router after you configured the port forwarding? If you have a dynamic IP you should check if 67.137.156.126 is still your WAN IP, it changes when you reset your router (again, *if* you have a dynamic IP).

It is normal that you can't connect through your WAN IP if you are behind that router. There is a solution though:

If you have a static IP (in this case 67.137.156.126) you can add it to your 'hosts' file. In Windows you can find it under 'C:\WINDOWS\system32\drivers\etc' where you should find a file named 'hosts'. There should be a piece of text which is commented; it tells you how to add IP's to the file.

You just need to do this: under the commented lines you begin a new line where you enter your local IP, being 192.168.0.104. Then you put at least one space after it (or a tab, or several of them - the amount makes no difference) and after that space you type the WAN IP; 67.137.156.126.

If you have a dynamic IP you can make an account on no-ip.org or dyndns.org (read the documentation on the websites) and add an URL from one of those websites (which you created with your account) and put that in the 'hosts' file instead of the global IP. You can do this too if you have a static IP, it could be a bit more secure.

I really hope that you can find something useful in this heap of text Wink.
May the Source be with you...

Want to know which ports to forward on your router for a Source DS? Click here!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)