Toot

Written by gencha@lemm.ee on 2024-04-30 at 16:28

Sharing the network space with another container is the way to go IMHO. I use podman and just run the main application in one container, and then another VPN-enabling container in the same pod, which is essentially what you’re achieving with with the network_mode: container:foo directive.

Ideally, exposing ports on the host node is not part of your design, so don’t have any –port directives at all. Your host should allow routing to the hosted containers and, thus, their exposed ports. If you run your workloads in a dedicated network, like 10.0.1.0/24, then those addresses assigned to your containers need to be addressable. Then you just reach all of their exposed ports directly. Ultimately, you then want to control port exposure through services like firewalld, but that can usually be delayed. Just remember that port forwarding is not a security mechanism, it’s a convenience mechanism.

If you want DLNA, forget about running that workload in a “proper” container. For DLNA, you need the ability to open random UDP ports for communication with consuming devices on the LAN. This will always require host networking.

Your DLNA-enabled workloads, like Plex, or Jellyfin, need a host networking container. Your services that require internet privacy, like qBittorrent, need their own, dedicated pod, on a dedicated network, with another container that controls their networking plane to redirect communication to the VPN. Ideally, all your manual configuration then ends up with a directive in the Wireguard config like:

=> More informations about this toot | View the thread | More toots from gencha@lemm.ee

Mentions

=> View lemmyvore@feddit.nl profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/112361113101082938
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
240.199325 milliseconds
Gemini-to-HTML Time
0.558981 milliseconds

This content has been proxied by September (ba2dc).