https://www.wireguard.com/netns/
This only works if you have your kernel headers installed in /usr/src and your kernel allows kernel modules (CONFIG_MODULES=y).
If you are like me and set CONFIG_MODULES=n then you can use my kernel-builder Dockerfile to build a custom kernel.
$ docker run --rm -it \
-v /usr/src:/usr/src \
-v /lib/modules:/lib/modules \
-v /boot:/boot \
--name kernel-builder \
r.j3ss.co/kernel-builder
https://nbsoftsolutions.com/blog/routing-select-docker-containers-through-wireguard-vpn
https://blog.jessfraz.com/post/installing-and-using-wireguard/
docker run ubuntu:18.04
Comments