Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jay Ta'ala
killswitch
Commits
08a7ac70
Commit
08a7ac70
authored
Mar 20, 2019
by
Jay Ta'ala
Browse files
Working kill switch scripts.
parent
921e6e85
Changes
2
Hide whitespace changes
Inline
Side-by-side
vpnkillswitch-off
0 → 100755
View file @
08a7ac70
#!/bin/bash
sudo
ufw
--force
reset
# delete back rules from reset
sudo rm
/etc/ufw/
*
.rules.
*
# reset to defaults and enable
sudo
ufw default deny incoming
sudo
ufw default allow outgoing
sudo
ufw
enable
vpnkillswitch-on
0 → 100755
View file @
08a7ac70
#!/bin/bash
# Default policies
sudo
ufw default deny incoming
sudo
ufw default deny outgoing
# Openvpn interface (adjust interface accordingly to your configuration)
sudo
ufw allow out on tun0
# Openvpn (adjust port accordingly to your vpn setup)
sudo
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
;;
esac
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment