iptables port forwarding


port 80 forwarding from 172.64.64.8 to 172.64.64.23

iptables -t nat -A PREROUTING -d 172.64.64.8 -p tcp --dport 80 -j DNAT --to 172.64.64.23:80
iptables -t nat -A POSTROUTING -d 172.64.64.23 -p tcp --dport 80 -j MASQUERADE

sip forwarding from 172.64.64.8 to 172.64.64.23

iptables -t nat -A PREROUTING -d 172.64.64.8 -p udp -m udp --dport 10000:30000 -j DNAT --to 172.64.64.23
iptables -t nat -A PREROUTING -d 172.64.64.8 -p udp -m udp --dport 5060 -j DNAT --to 172.64.64.23

Comments are closed.