iptables -t nat -A PREROUTING -p tcp -i eth0 --dport $PORT -j DNAT --to-destination $DEST_IP:$DEST_PORT
iptables -A FORWARD -p tcp -d $DEST_IP --dport $DEST_PORT -j ACCEPT
Created
August 11, 2016 07:59
-
-
Save jkullick/a7b1adae0a45caacc265bd9aeb608594 to your computer and use it in GitHub Desktop.
Port Forwarding with IPtables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment