Jump to content

Ipnat + Local Cs1.6 An Quake3


Recommended Posts

ipnat.rules:

map nfe0 10.10.0.0/16 -> 0.0.0.0/32
rdr nfe0 xxx.xxx.xxx.xxx/32 port 110 -> 10.10.10.11 port 110 tcp  # work
rdr nfe0 xxx.xxx.xxx.xxx/32 port 143 -> 10.10.10.11 port 143 tcp #work
rdr nfe0 xxx.xxx.xxx.xxx/32 port 25 -> 10.10.10.11 port 25 tcp #work
rdr nfe0 xxx.xxx.xxx.xxx/32 port 27015 -> 10.10.10.14 port 27015 udp #dont work(((
rdr nfe0 xxx.xxx.xxx.xxx/32 port 27960 -> 10.10.10.14 port 27960 #dont work(((

 

Разрешил все в ipfw:

00007	   21		7708 allow ip from any to 10.10.10.14
00008	   21		1887 allow ip from 10.10.10.14 to any

 

cs1.6:

./hlds_run +sv_lan 1 -game cstrike -nomaster +log on +map de_dust2 +port 27015   -maxplayers 32 +localinfo mm_gamedll 'dlls/cs_i386.so.bots'  +exec server.cfg -debug

 

На почту все редиректится, а кс и квака нет.

Что не так?

Link to post
Share on other sites

Если редиректить на другой порт

rdr nfe0 xxx.xxx.xxx.xxx/32 port 27015 -> 10.10.10.14 port 80

все работает

 

В локале игра работает на порту 27015

Link to post
Share on other sites

Попробуй форвардить еще 27015 и для tcp, а не только для udp.

На примере iptables у меня так :

#iptables for CS 1/6
#TCP
iptables -t nat -A PREROUTING -i $inet_iface -d $inet_ip -p tcp --dport 27015 -j DNAT --to $local_ip
iptables -t nat -A POSTROUTING -o $local_iface -s $local_ip -p tcp --sport 27015 -j SNAT --to $inet_ip
#UDP
iptables -t nat -A PREROUTING -i $inet_iface -d $inet_ip -p udp --dport 27015 -j DNAT --to $local_ip
iptables -t nat -A POSTROUTING -o $local_iface -s $local_ip -p udp --sport 27015 -j SNAT --to $inet_ip

 

т.е. в твоем случае :

rdr nfe0 xxx.xxx.xxx.xxx/32 port 27015 -> 10.10.10.14 port 27015 tcp 
rdr nfe0 xxx.xxx.xxx.xxx/32 port 27960 -> 10.10.10.14 port 27960 tcp

rdr nfe0 xxx.xxx.xxx.xxx/32 port 27015 -> 10.10.10.14 port 27015 udp 
rdr nfe0 xxx.xxx.xxx.xxx/32 port 27960 -> 10.10.10.14 port 27960 udp

Link to post
Share on other sites

А как мне зароутить на ipfw. А то я вообще сервак повесил) Пришлось в серверную бежать)

 

 

 

~

заработало само по себе, правил ipfw не писал, магия :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...