Development discussion of WireGuard
 help / color / mirror / Atom feed
* Retrict Docker Container To VPN
@ 2018-02-15 13:07 Benni Laib
  2018-02-16  5:31 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Benni Laib @ 2018-02-15 13:07 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Hi there,

I am currently struggling with setting up a Docker container that can only access the internet through a WireGuard tunnel. According to [the website](https://www.wireguard.com/#ready-for-containers), this should be possible, but I can't find anything on how to set it up.
Can you guys help me with that and perhaps point me to useful information?

Thank you very much in advance,
Benjamin

[-- Attachment #2: Type: text/html, Size: 581 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Retrict Docker Container To VPN
  2018-02-15 13:07 Retrict Docker Container To VPN Benni Laib
@ 2018-02-16  5:31 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2018-02-16  5:31 UTC (permalink / raw)
  To: Benni Laib; +Cc: wireguard

Hi Benni,

You're probably looking for this document:
https://www.wireguard.com/netns/

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
endpoints.

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-16  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 13:07 Retrict Docker Container To VPN Benni Laib
2018-02-16  5:31 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).