Hi Guys,
I hope someone can help me
I need someone to look at the code (I have removed part of the external IP for security purposes) and see if this is how it should be done:
I need:
name Port Protocol
iax2 4569 UDP
tftp 69 UDP
ssh 3131 TCP
and then forward those to 192.168.1.21 or 192.168.10.20
Here is what I have come up with so far
/sbin/iptables-A INPUT -p udp -ieth1 -s189.212.XXX.XXX/4569 -dport 4569 -j ACCEPT
/sbin/iptables-A INPUT -p udp -ieth1 -s189.212.XXX.XXX/69 -dport 69 -j ACCEPT
/sbin/iptables-A INPUT -p tcp -ieth1 -s189.212.XXX.XXX/3131 -dport 3131 -j
ACCEPT
iptables -tnat -A POSTROUTING -o eth0 -s 192.168.X.21/4569 -j MASQUERADE
iptables -tnat -A POSTROUTING -o eth0 -s 192.168.1.21/69 -j MASQUERADE
iptables -tnat -A POSTROUTING -o eth0 -s 192.168.1.21/3131 -j MASQUERADE
echo 1 >/proc/sys/net/ipv4/ip_forward

Reply With Quote
