Port forwarding problem
by cent4 from LinuxQuestions.org on (#5RJ2N)
In my network I have a device at the address 10.0.0.127, this device is supposed to support connecting to my company via VPN.
I need to forward 3 udp ports to this device: 500, 1701 and 4500.
I tried to do it but it doesn't work.
/rc.d/rc.firewall
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 500 -j ACCEPT
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 4500 -j ACCEPT
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 1701 -j ACCEPT
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 500 -j DNAT --to
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 4500 -j DNAT --to
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 1701 -j DNAT --to
I need to forward 3 udp ports to this device: 500, 1701 and 4500.
I tried to do it but it doesn't work.
/rc.d/rc.firewall
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 500 -j ACCEPT
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 4500 -j ACCEPT
iptables -A FORWARD -i eth0 -o 10.0.0.127 -p udp --dport 1701 -j ACCEPT
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 500 -j DNAT --to
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 4500 -j DNAT --to
iptables -t nat -A PREROUTING -d WAN_IP -p udp --dport 1701 -j DNAT --to