给同事们在外面应急时连AWS外区用

Standard
vim /etc/sysctl.conf
net.ipv4.ip_forward=1
 
echo 1 > /proc/sys/net/ipv4/ip_forward
 
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 60022 -j DNAT --to-destination F.GFW.I.P:22
iptables -t nat -A POSTROUTING -j MASQUERADE

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.