UpsiloNIX
Hello,
I'm trying to set up a particular configuration where the OpenVPN client is running on my host, and some Docker containers are running behind a Bridge
Here my network conf :
Network docker [172.21.0.1/16] ==> Bridge docker ==> Tun0 [10.8.0.5] ==> Internet ==> Openvpn server [10.8.0.1] ==> Internet
enp4s0:[192.168.1.100] ==> Internet
I tried to play a bit with iptables postrouting without any success (the traffic still goes out through enp4s0), and with "route" (route 172.21.0.0 255.255.0.0) command on openvpn client without success too...
My openvpn usually "push redirect-gateway def1" so I set "pull-filter ignore redirect-gateway" on my client as I don't want to route all the traffic to the vpn.
Any idea ?
Regards,
300000
if you dont want particular configuration for one client just put this in the client config.
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway
that client will never use server getaway and never route all the traffic to through server.