SRCDS Steam group


Lan & Wan Server Solution !
#1
Toungue 
Hi Toungue !

I'm behind a proxy (squid) and a firewall (iptables) but it's impossible to me launch a wan server sucessfully,otherwise i can play on lan with the server (srcds) .

These are my iptables rules:

$IPTABLES -A PREROUTING -t nat -p udp -i $INET_IFACE --dport $HL2_PORT -j DNAT --to $HL2_SERVER:$HL2_PORT
$IPTABLES -A FORWARD -i $INET_IFACE --out-interface $LAN_IFACE -d $HL2_SERVER -p udp --dport $HL2_PORT -j tcp_allowed
$IPTABLES -A PREROUTING -t nat -p udp -i $INET_IFACE --dport 27020 -j DNAT --to $HL2_SERVER:27020
$IPTABLES -A FORWARD -i $INET_IFACE --out-interface $LAN_IFACE -d $HL2_SERVER -p udp --dport 27020 -j tcp_allowed
$IPTABLES -A PREROUTING -t nat -p tcp -i $INET_IFACE --dport $HL2_PORT -j DNAT --to $HL2_SERVER:$HL2_PORT
$IPTABLES -A FORWARD -i $INET_IFACE --out-interface $LAN_IFACE -d $HL2_SERVER -p tcp --dport $HL2_PORT -j tcp_allowed

Where HL2_SERVER is the internal ip 192.168.x.x and HL2_PORT is 27015,the default port.

I launch the server with the next params:

./srcds_run -console -game cstrike +ip 192.68.x.x -p 27015 +map de_aztec +maxplayers 16 -debug

It seems the problem comes from proxy,but not sure xD

The operative system is Debian sarge

Thx very much Wink


---- Update 12/12/04 -----

I've resolved the problem Toungue

The complete iptables rules are:

HL2_SERVER="192.68.x.x"
HL2_PORT="27015"
GAMESPORTS="27000:27030"
INET_IFACE="EXTERNAL IP"
LAN_IFACE="INTERNAL IP"

$IPTABLES -A INPUT -i $INET_IFACE -p tcp -d $HL2_SERVER --dport $HL2_PORT -s $ANYWHERE --sport $GAMESPORTS -j ACCEPT
$IPTABLES -A INPUT -i $INET_IFACE -p tcp -d $HL2_SERVER --dport $HL2_PORT -s $ANYWHERE --sport $GAMESPORTS -j ACCEPT
$IPTABLES -A FORWARD -i $INET_IFACE -p udp -d $LAN_IP_RANGE --dport $HL2_PORT -s $ANYWHERE --sport $GAMESPORTS -j ACCEPT
$IPTABLES -A PREROUTING -t nat -p udp -i $INET_IFACE --dport $HL2_PORT -j DNAT --to $HL2_SERVER:$HL2_PORT
$IPTABLES -A FORWARD -i $INET_IFACE -o $LAN_IFACE -d $HL2_SERVER -p udp --dport $HL2_PORT -j tcp_allowed


I hope this help someone too Toungue


See u
Reply
#2
Hello mate, im having the same problem but with xp pro dedicated server. Is there an ip table thingy in windows. where is it?
Any how you ve given me a kick in the right direction me thinks.

back to google!
Reply
#3
lol there is no 'ip tables thingy' for windows. give us some info on what version of windows you are using
Reply
#4
yeah i relise that now, thanks anyway. iptables are part of linux firewall configs. I think ive cracked the problem now. I didnt realise before that u carnt see a dedicated server on ur own network with the server browser in cs (on a different pc in the network), you have to manually enter your ip address into favorites to be able to see it. For anyone else reading this dont bother putting the "+ip ***.***.***.***" business in your srdc.exe shortcut if your running the server on a network behind a nat router. If youve forwarded the ports correctly srcds seems to detect the local ip address.
note: im new to this so i could be very very wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)