Retrict Docker Container To VPN

Jason A. Donenfeld Jason at
Fri Feb 16 06:31:31 CET 2018

Hi Benni,

You're probably looking for this document:

Basically you do this:

# ip link add wg0 type wireguard
# ip link set wg0 netns PID

Where "PID" is the PID of any process running in that Docker
container. After that, you'll be able to see wg0 inside the Docker
container, but not in the host. The only traffic that will leave the
Docker container will then be encrypted packets sent to peer


More information about the WireGuard mailing list