SRCDS Steam group

Re-use port with different IP
Hi guys

I followed the tutorial on

Managed to get CS Source to listen on a different IP address assigned by my dediacted server company, but the problem now: It doesn't want to use ports already used by a different IP address.

There is only 1 physical interface, and I am provided with 3 IPs

Does this mean that no matter what IP you use, each port can only be used once or is there something that I Can do?

Sempron 2800+
80GB Hard Disk
Debian Stable
2.4.27-2-386 (yes, I will get round to compiling a 2.6 kernel sometime with 1000MHz polling)

GNU libc 2.3.2
gcc 3.3.5

I tried running with ./srcds_run -ip -port 27015
but it always increments the ports by 1, client for 27006 and server 27016

Thanks in advance guys
first you have to assign the ips to the nic (if not already done so), then just use -ip -port 2071x in the start line.
fqdn Wrote:first you have to assign the ips to the nic (if not already done so), then just use -ip -port 2071x in the start line.

Hi fqdn,
Thanks for replying

I have already assigned the IPs to the interface with ifconfig eth0:1 and executed a second instance of CS Source with the new IP address.

Problem is, even though the 2nd instance uses the new IP address to itself, it increments the port anyway, even if I tell it to use 27015, it will use 27016.

Just not sure if this is a constraint to the interface
nope shouldn't be that way at all, do a netstat -l and see if anything/or what is listening on 27015 for all the ips.

you can also try editing the config files directly instead of using the ifconfig command though it should be all the same.
I think I found the problem:

I only set eth0:1 and not eth0:0

The original first instance of CS Source was listening on localhost, which automatically listened for the original ip address

I added in eth0:1 to listen to, and made the 2nd instance of CS Source listen on that IP address, but it wouldn't re-use the port.

I added eth0:0 to listen to and then quit all CS Source servers and started them up one by one. Server seems to run fine now.

netstat originally showed:
Quote:tcp 0 0 *:27015 *:* LISTEN
udp 0 0 *:27015 *:*

Now it shows more realistic data:

Quote:tcp 0 0 serverXXXXX.uk2ne:27015 *:* LISTEN
tcp 0 0 *:* LISTEN
... same for UDP

Just need to test them out now Toungue

The only thing now though, is when I use aptitude or nslookup or similar, it doesn't resolve the hostnames - such as

In order to install via the repositories or so on, I have to take out the eth0:X entries, do the aptituding and then add the eth0:Xs back in.

Possibly my firewall (firehol).

Thanks for helping me fqdn, netstat -l will also come in handy in the future.


hmm, don't seem to work properly yet - possibly the firewall.
The servers run, but server on doesn't respond - doesn't even connect to the Valve/Steam servers, therefore causing VAC to be disabled.

And I just realised I did not have to assign to eth0:0 . . . Hmm I think I'm messing things up now

Another thing to note:
eth0 uses mask Mask:
eth0:0 and eth0:1 use Mask:

Think that makes any difference also?

Forum Jump:

Users browsing this thread: 1 Guest(s)