( search forums )
Linux NAT, firewall and LAN server - solution!
Soldat Forums - Soldat Talk - Server Help
placik
April 14, 2003, 11:44 am
hello members!
i've finally figured out how to configure iptables to make soldat server working on local machine (with NAT and firewall enabled on linux router-server).
first thing you have to do is to open ports 23073 and 23083:
iptables -t nat -A PREROUTING -p udp -d AAA.AAA.AAA.AAA --dport 23073 -j DNAT --to-destination BBB.BBB.BBB.BBB
iptables -t nat -A PREROUTING -p udp -d AAA.AAA.AAA.AAA --dport 23083 -j DNAT --to-destination BBB.BBB.BBB.BBB
where AAA.AAA.AAA.AAA is the IP address that you obtained from your internet service provider (ie. 210.23.233.12) and BBB.BBB.BBB.BBB is the IP address of the machine running soldat server (ie. 192.168.1.4).
next thing is to forward all incoming traffic to BBB.BBB.BBB.BBB machine:
iptables -A FORWARD -p udp -d BBB.BBB.BBB.BBB --dport 23073 -j ACCEPT
iptables -A FORWARD -p udp -d BBB.BBB.BBB.BBB --dport 23083 -j ACCEPT

that's it! [:D]. the above configuration works fine on my RedHat 8.1 linux, i guess the configuration should be quite similar on other compilations of linux - Debian, BeOS or alike.

of course, each linux system is configured differently - so it's quite possible this configuration won't fit. try to search the internet for documentation and examples. and don't ask me how to do this and that: i've had enough!. it's just your turn now [8D].

good luck!
peter