Skip to content

Instantly share code, notes, and snippets.

@zycon
Created May 24, 2020 19:24
Show Gist options
  • Save zycon/7106847fc6ce06507258c329a3f13a32 to your computer and use it in GitHub Desktop.
Save zycon/7106847fc6ce06507258c329a3f13a32 to your computer and use it in GitHub Desktop.
iptable entries sample openvpn
sudo iptables -A INPUT -i tun0 -j ACCEPT
sudo iptables -A FORWARD -o tun0 -i ens3 -j ACCEPT
sudo iptables -A FORWARD -i tun0 -o ens3 -j ACCEPT
sudo iptables -A INPUT -i ens3 -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
iptables -D OUTPUT -d 8.8.8.8 -o ens3 -j DROP
iptables -I FORWARD -s 10.8.0.80 -i tun0 -d 216.18.168.124/25 -o eth0 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment