aequitas Apprentice
Joined: 28 Aug 2002 Posts: 190 Location: Ooy bij arnhem
|
Posted: Tue Feb 15, 2005 4:52 pm Post subject: iptables local forwarding game server |
|
|
I got myself a openttd gameserver running at a spare powermac at home. My server routes it nicely to the internet so people can join. Only i can't join from the inside with the external ip adres. So i have to add the local ip adres manually every time.
I tried using the following iptables rule:
# forwaring openttd
iptables -A PREROUTING -t nat --protocol tcp -i eth0 --destination-port 3979 -j DNAT --to 192.168.0.5
iptables -A PREROUTING -t nat --protocol udp -i eth0 --destination-port 3979 -j DNAT --to 192.168.0.5
eth0 is the local networking interface. 192.168.0.5 is the game server.
The game uses port 3979 for connections and uses udp and tcp.
When i check the server logs my desktop from which i try to connect doesn't show up.
Am i doing something wrong here with the iptables? Or could it be that the game switches to a different port after connecting a client? _________________ I am not superstitious, that brings bad luck. |
|