Created
July 10, 2022 05:52
-
-
Save WallaceTan/d531d66d61f821caaa3f237dd7b1ec15 to your computer and use it in GitHub Desktop.
/jffs/openvpn/firewall-up.sh
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
#!/bin/sh | |
iptables -I OVPN -o tun0 -j ACCEPT | |
iptables -t nat -I POSTROUTING 1 -o tun0 -j MASQUERADE | |
# Troubleshoot iptables rule with: | |
# iptables --line-numbers -vL FORWARD | |
# iptables --line-numbers -vL OVPN | |
# iptables -t nat --line-numbers -vL POSTROUTING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment