Connect a container to Gluetun VPN Client
Connect a container to VPN
Redirect traffic to Gluetun container
In the compose file of the container that you want traffic to go through VPN, remove all occurrences of networking and port mapping to let only this :
Port mapping
All the port mapping you normally have done inside your service compose file, you now have to do in the vpn container compose file.
If your application XYZ listen to port 9000, then in you Gluetun compose, you have to map a port like this :
Full Example
You redirect trafic of a XYZ service through VPN, this service have access through port 9000 :
You now have access to the XYZ service through port 9000 and all internet traffic of this service is routed to your VPN !
Last updated