Advertisement
zildjiean

iptable NAT from port

Oct 19th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. sysctl net.ipv4.ip_forward=1
  2. iptables -t nat -A PREROUTING -p tcp --dport 9997 -j DNAT --to-destination 10.3.7.2:9997
  3. iptables -t nat -A POSTROUTING -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement