5
Container traffic on a specific host interface
(feddit.it)
Here's my Gluetun configuration if it helps:
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=custom
- VPN_TYPE=openvpn
- OPENVPN_CUSTOM_CONFIG=/gluetun/custom.conf
- FIREWALL_VPN_INPUT_PORTS=XYZ
ports:
- 8080:8080 # webui
- XYZ:XYZ/tcp
- XYZ:XYZ/udp
restart: always
volumes:
- ./gluetun:/gluetun
env_file:
- .env
devices:
- /dev/net/tun:/dev/net/tun
Have you specified network_mode: "service:gluetun"
in your docker?
Gluetun
This is pretty interesting, I never used that before and I will have a look. However, it would be also interesting using my approach, use a local interface where the traffic is already filtered, that can be used on other scenarios.
There is probably something on a docker configuration telling that all my traffic should go out from the default interface.