Created
May 24, 2020 19:24
-
-
Save zycon/7106847fc6ce06507258c329a3f13a32 to your computer and use it in GitHub Desktop.
iptable entries sample openvpn
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
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