Skip to content

Instantly share code, notes, and snippets.

@WallaceTan
Created July 10, 2022 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WallaceTan/d531d66d61f821caaa3f237dd7b1ec15 to your computer and use it in GitHub Desktop.
Save WallaceTan/d531d66d61f821caaa3f237dd7b1ec15 to your computer and use it in GitHub Desktop.
/jffs/openvpn/firewall-up.sh
#!/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