Created
March 4, 2020 23:10
-
-
Save edgeboyo/23bde62c4181fd5b33a05bd1832a44fb to your computer and use it in GitHub Desktop.
Script for OpenVPN port forwarding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -ne 2 ] | |
then | |
echo "Usage: $(0) <port> <ip>" | |
fi | |
iptables -t nat -A PREROUTING -p tcp --dport $1 -j DNAT --to-destination $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment