23
submitted 1 week ago* (last edited 1 week ago) by onlinepersona@programming.dev to c/programming@programming.dev

I'd basically like to run some containers within a VPN and some outside of it. The containers running within the VPN should not be able to send or receive any traffic from outside the VPN (except localhost maybe).

The container could be docker, podman, or even a qemu VM or some other solution if need be.

Is that possible? Dunno if this is the right place to ask.

---Resolution-------

Use https://github.com/qdm12/gluetun folks.

Anti Commercial-AI license

you are viewing a single comment's thread
view the rest of the comments
[-] adam@doomscroll.n8e.dev 16 points 1 week ago

Easily doable in docker using the network_mode: "service:VPN_CONTAINER" configuration (assuming your VPN is running as a container)

[-] PlexSheep@infosec.pub 1 points 3 days ago

That works but sucks when you redeploy the Vpn container iirc. I don't do this anymore.

(Now I just use lxc containers with docker inside, and I'll set the default gateway of the lxc to another lxc that is a gateway for a VPN network)

this post was submitted on 20 Jun 2024
23 points (89.7% liked)

Programming

16207 readers
531 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS