Created
April 2, 2018 03:21
-
-
Save lattice0/7b237c37fe93d19264fbebf9f51a1ef8 to your computer and use it in GitHub Desktop.
ufw vpn configuration
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
sudo ufw --force reset | |
sudo ufw default deny incoming # Use the VPN tunnel for all traffic | |
sudo ufw default deny outgoing | |
sudo ufw allow out on tun0 | |
sudo ufw allow in on tun0 | |
sudo ufw allow out 1194/udp # e.g. 1234/udp, depending on your OpenVPN client config | |
sudo ufw allow out to 192.168.0.0/16 | |
# Enable the firewall | |
sudo ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment