참고
iptables -t nat -F iptables -t nat -X iptables -t nat -Z iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 2222 -j DNAT --to x.x.x.x:22
eth0 : 주 네트워크 인터페이스
x.x.x.x : 외부 서버
반응형
iptables -t nat -F iptables -t nat -X iptables -t nat -Z iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 2222 -j DNAT --to x.x.x.x:22