This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wg-quick on WSL2 doesn't play well - if you have a default route through wireguard it tries to use features of nftables/iptables that aren't compiled into the WSL2 kernel, and all the answers I could find basically said "build a custom kernel". No thanks! | |
Wireguard itself works fine on ubuntu on WSL2, it's just the way wg-quick sets it up that doesn't. | |
this might help you if you have one peer, and want to route all traffic through it. | |
This note doesn't tell you how to configure wireguard - there are plenty of sites that cover that. The config below is just an example, and will NOT work! | |
the startup script finds the IP of the wireguard endpoint you're connecting to and sets up a host route to it, firs up wireguard, and sets a default route through wireguard. |