Advertisement
metalx1000

IPTABLES port forwarding

Jan 25th, 2018
2,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.16 KB | None | 0 0
  1. sudo iptables -t nat -I PREROUTING -p tcp --dport 2222 -j REDIRECT --to-ports 22
  2. sudo iptables -t nat -I OUTPUT -p tcp -o lo --dport 2222 -j REDIRECT --to-ports 22
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement