Created
July 24, 2023 02:30
-
-
Save ndunks/6498b36365999c45a6747abddfbf5800 to your computer and use it in GitHub Desktop.
This file contains 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
# filter | |
iptables -A FORWARD -d 10.19.49.19/32 -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport 8443 -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport 8880 -j ACCEPT | |
# nat | |
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 8443 -j DNAT --to-destination 10.19.49.19:1234 | |
iptables -t nat -A POSTROUTING -d 10.19.49.19/32 -o wg0 -p tcp -m tcp --dport 1234 -j SNAT --to-source 10.19.49.1 | |
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 8880 -j DNAT --to-destination 10.19.49.19:8880 | |
iptables -t nat -A POSTROUTING -d 10.19.49.19/32 -o wg0 -p tcp -m tcp --dport 8880 -j SNAT --to-source 10.19.49.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment