VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
As soon as I add network_mode: "service:gluetun" to services gluetun would start to work (as expected) but existing networks become broken (not expected).
Because of that I cannot get containers which are using gluetun to connect to existing database services which are part of the bridge_current_host_cross_containers_net or to any other service which is part of bridge_current_host_cross_containers_net
I did run the command docket network inspect bridge_current_host_cross_containers_net and none of the services for which I added network_mode: "service:gluetun" are listed there (and because of that I cannot get connectivity between them).
I tried having gluetun on its separate network but nothing seems to work.
I also tried making gluetun part of the existing bridge_current_host_cross_containers_net but it does not work also.
It is like we I am forced to choose either
Either use a VPN when accessing the internet (network_mode: "service:gluetun")
Either be able to connect to your database
Both in the same time are not possible and this does not make sense. It should be allowed to use a VPN and to connect to a database both in the same time.
Did anybody encounter the same? How to overcome this situation and have services to use both a VPN for external internet connectivity and to also be able to connect to docker services (databases) running on the same docker network locally?
my-db-service:
networks:
- bridge_current_host_cross_containers_net
//if I remove network_mode: "service:gluetun" I can connect to the dababase but cannot use the VPN
//If I add network_mode: "service:gluetun" I can use the VPN but cannot connect to database
my-service
depends-on:
- my-db-service
network_mode: "service:gluetun"
networks:
- bridge_current_host_cross_containers_net
gluetun:
networks:
- bridge_current_host_cross_containers_net
networks:
bridge_current_host_cross_containers_net:
driver: bridge
external: true
@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:
do not ask for updates, be patient
:+1: the issue to show your support instead of commenting
@qdm12 usually checks issues at least once a week, if this is a new urgent bug,
revert to an older tagged container image
Is this urgent?
No
Host OS
No response
CPU arch
x86_64
VPN service provider
ProtonVPN
What are you using to run the container
docker-compose
What is the version of Gluetun
latest qmcgaw/gluetun docker image
What's the problem 🤔
Thank you for your work on gluetun.
gluetun would be useful but I cannot seem to get it working.
This would not work.
This would work
As soon as I add
network_mode: "service:gluetun"
to services gluetun would start to work (as expected) but existing networks become broken (not expected).Because of that I cannot get containers which are using gluetun to connect to existing database services which are part of the
bridge_current_host_cross_containers_net
or to any other service which is part ofbridge_current_host_cross_containers_net
I did run the command
docket network inspect bridge_current_host_cross_containers_net
and none of the services for which I added network_mode: "service:gluetun" are listed there (and because of that I cannot get connectivity between them).I tried having gluetun on its separate network but nothing seems to work.
I also tried making gluetun part of the existing
bridge_current_host_cross_containers_net
but it does not work also.It is like we I am forced to choose either
Both in the same time are not possible and this does not make sense. It should be allowed to use a VPN and to connect to a database both in the same time.
Did anybody encounter the same? How to overcome this situation and have services to use both a VPN for external internet connectivity and to also be able to connect to docker services (databases) running on the same docker network locally?
Share your logs (at least 10 lines)
Share your configuration