Skip to content

Instantly share code, notes, and snippets.

@lattice0
Created April 2, 2018 03:21
Show Gist options
  • Save lattice0/7b237c37fe93d19264fbebf9f51a1ef8 to your computer and use it in GitHub Desktop.
Save lattice0/7b237c37fe93d19264fbebf9f51a1ef8 to your computer and use it in GitHub Desktop.
ufw vpn configuration
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