From 04a583b8b355010541b8927dc624771b2bdc67de Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 6 Jun 2022 20:04:45 +0100 Subject: [PATCH] add wiregard notes --- wireguard/killswitch.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 wireguard/killswitch.md diff --git a/wireguard/killswitch.md b/wireguard/killswitch.md new file mode 100644 index 0000000..baae01e --- /dev/null +++ b/wireguard/killswitch.md @@ -0,0 +1,38 @@ +# Forward all traffic through a wireguard VPN + +* VPN: https://lnvpn.net/ + +* How to: https://www.wireguard.com/netns/ + +* Kill Switch with PostUp and PreDown WG syntax https://www.ivpn.net/knowledgebase/linux/linux-wireguard-kill-switch/ + +* Simple ufw killswitch from https://www.reddit.com/r/WireGuard/comments/bpmssc/comment/envrhu2 + ``` + another option is to create 2 bash scripts that make use of ufw. + + firewall.sh (change tun0 to what ever your wireguard interface is you can find it with "ifconfig" probably has "wg" in it somewhere) + + sudo ufw reset + + sudo ufw default deny incoming + + sudo ufw default deny outgoing + + sudo ufw allow out on tun0 from any to any + + sudo ufw enable + + And unfirewall.sh + + sudo ufw reset + + sudo ufw default deny incoming + + sudo ufw default allow outgoing + + sudo ufw enable + + make them both executable with chmod. then when you want the killswitch on "sudo bash firewall.sh" then you can test it by disconnecting from wireguard and ur internet shouldnt be working. + + and when you want to turn it off just run unfirewall.sh + ``` \ No newline at end of file