Skip to content

Finally Getting ipv6 in WSL2

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.

Requirements

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 wireguard-tools installed.

Installing things on the router

SSH to your router and enter the following commands:

  1. amtm
  2. ep and install entware
  3. wg and install wireguard manager
  4. uf dev to upgrade wireguard manager to the latest dev branch
  5. e to exit and then wg to get the updated wireguard manager
  6. Now you can create a server peer new ipv6=2001:YOUR_PREFIX::100:1/64 noipv4
  7. and a new device: create wsl

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.

Then just wg-quick up /path/to/wsl.conf and ping your favorite ipv6-only domain: ping6 ipv6.google.com.

Congrats! You now have a public IPv6 address for your WSL2 installation!

%d bloggers like this: