Advertisement
SH1NU11b1

linux PF

Oct 24th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. echo "1" > /proc/sys/net/ipv4/ip_forward
  2. iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 22 -j DNAT --to-destination 192.168.0.2:22
  3. iptables -A FORWARD -p tcp --dport 22 -d 192.168.0.2 -j ACCEPT
  4. iptables -A FORWARD -p tcp --sport 22 -s 192.168.0.2 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement