포트포워딩

vi /etc/sysctl.conf
net.ipv4.ip_forward = 1 //<< 1로 변경

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -i eth0 -d [$serverip] –dport [$serverport] -j DNAT –to [목적지$ip:$port]

아주잘됨~

Leave your Comment

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