Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssh -p 2222 192.168.2.100
- user@192.168.2.100's password:
- sudo iptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to-destination 192.168.2.100:2222
- >sudo iptables -t raw -L
- Chain PREROUTING (policy ACCEPT)
- target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- >sudo iptables -t nat -L
- Chain PREROUTING (policy ACCEPT)
- target prot opt source destination
- DNAT tcp -- anywhere anywhere tcp dpt:2221 to:192.168.2.100:2222
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- Chain POSTROUTING (policy ACCEPT)
- target prot opt source destination
- >sudo iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- >ssh -p 2221 127.0.0.1
- ssh: connect to host 127.0.0.1 port 2221: Connection refused
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement