Skip to content

Commit

Permalink
add wiregard notes
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Jun 6, 2022
1 parent 96f3dd8 commit 04a583b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions wireguard/killswitch.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 04a583b

Please sign in to comment.