Hi all,

I’ve been going through a guide by techhut for setting up gluetun, and there’s a small bit of code that he adds in from his github, and I want to understand the implications of using it.

He writes:

When containers are in the same docker compose all you need to add is a network_mode: service:container_name and open the ports through the gluetun container. See example from the compose.yaml below.

And here’s the code: services: gluetun: # This config is for wireguard only tested with AirVPN image: qmcgaw/gluetun container_name: gluetun … ports: - 8888:8112 # deluge web interface - 58846:58846 # deluge RPC deluge: image: linuxserver/deluge:latest container_name: deluge … network_mode: service:gluetun

If you could please explain to me what this means, and if there are any risks associated with this, I would really appreciate it.

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 day ago

    Assuming they use NAT. Almost certainly true for IPv4, very unlikely for IPv6. And you should have a firewall too.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      Exactly. I have my firewall set up to block everything I don’t explicitly allow through. That way if I’m a little loose with running things on ports, it at least won’t leak ports past the firewall.