I really like using Windows to get around the web and write software, but I prefer Linux and bash for a CLI. Thus I tend to use WSL2 to do lots of things around the house. One thing missing for a long time is IPv6.
Finally, today, I managed to get IPv6 working.
If you want to follow along, you need an Asus router flashed with AsusWrt, and obviously, native IPv6 on your network. Also, WSL2 with this kernel and
Installing things on the router
SSH to your router and enter the following commands:
epand install entware
wgand install wireguard manager
uf devto upgrade wireguard manager to the latest dev branch
eto exit and then
wgto get the updated wireguard manager
- Now you can create a server
peer new ipv6=2001:YOUR_PREFIX::100:1/64 noipv4
- and a new device:
Turning on IPv6
Finally copy the configuration to your computer from
/opt/etc/wireguard.d/wsl.conf on your router to somewhere on your WSL installation.
wg-quick up /path/to/wsl.conf and ping your favorite ipv6-only domain:
Congrats! You now have a public IPv6 address for your WSL2 installation!