Somehow I only can start the server on localhost, but I would like to make the server available for everyone.
When I run the server.sh, console tells me:
PHP Code:
Opening IP socket: localhost:28960
I tried to set dedicate to 2, so that the server is for everyone available.
Now the console this
PHP Code:
dedicated is read only.
I am not sure if it's an error or warning, but it's still running on localhost.
This is my server.sh (which is inside my CoD2 folder):
PHP Code:
#!/bin/bash
cod="/home/CoD2/cod2_lnxded_1_3"
$cod +set dedicated 2 +set fs_game "loveboy" +set com_hunkMegs "256" +set sv_maxclients "16" +exec server.cfg +set g_gametype hq +map_rotate
I also tried to set the net_ip with my real IPv4 address
PHP Code:
$cod +set dedicated 2 +set fs_game "loveboy" +set com_hunkMegs "256" +set sv_maxclients "16" +set net_ip "12.34.56.78" +exec server.cfg +set g_gametype hq +map_rotate
but the server crashes.
The error:
PHP Code:
Opening IP socket: 12.34.56.78:28960
ERROR: UPD_OpenSocket: bind: Cannot assign requested
Opening IP socket: 12.34.56.78:28961
ERROR: UPD_OpenSocket: bind: Cannot assign requested
Opening IP socket: 12.34.56.78:28962
ERROR: UPD_OpenSocket: bind: Cannot assign requested
... till :28969
Sys_Error: Error during initialization:
Couldn't allocate IP port
I also tried to open port in my firewall
PHP Code:
iptables -A INPUT -p udp -d 12.34.56.78 --dport 28960 -m state --state NEW -j ACCEPT
and tried to check it with
and found my new entry (successful), but still same errors.
My opened port disappears when I restart ubuntu.
Does anyone maybe know what to do?