Commit 92043675 authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Switched to absolute paths for ufw.

parent 52815edc
#!/bin/bash
sudo ufw --force reset
sudo ufw enable
sudo /usr/bin/ufw --force reset
sudo /usr/bin/ufw enable
# delete back rules from reset
sudo rm /etc/ufw/*.rules.*
sudo /usr/bin/rm /etc/ufw/*.rules.*
# reset to defaults and enable
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo /usr/bin/ufw default deny incoming
sudo /usr/bin/ufw default allow outgoing
#!/bin/bash
# Default policies
sudo ufw default deny incoming
sudo ufw default deny outgoing
sudo /usr/bin/ufw default deny incoming
sudo /usr/bin/ufw default deny outgoing
# Openvpn interface (adjust interface accordingly to your configuration)
sudo ufw allow out on tun0
sudo /usr/bin/ufw allow out on tun0
# Openvpn (adjust port accordingly to your vpn setup)
sudo ufw allow out to any port 1194
sudo /usr/bin/ufw allow out to any port 1194
# process arguments
while getopts "t:" opt; do
case ${opt} in
t)
echo "allow outgoing traffic to $OPTARG"
sudo ufw allow out to $OPTARG;;
sudo /usr/bin/ufw allow out to $OPTARG;;
esac
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment