wfg / docker-openvpn-client

OpenVPN client with killswitch and proxy servers; built on Alpine
MIT License
353 stars 107 forks source link

[HowTo] reassign internet connection to the containers after connection drop #82

Open Bazzu85 opened 1 year ago

Bazzu85 commented 1 year ago

Hi, I'm pretty new to docker container but so far I'm understanding what I'm doing (I thing) I have a docker compose with you openvpn-client and 2 other containers depending on his network. I'm trying to figure out if and how the killswitch works but openvpn doesn't have a "disconnect" command so I tried to "kill" the network adapter with ifconfig tun0 down. first question: is this a valid method to test it? Doing the ifconfig tun0 down and trying to do a google ping in a dependant container the connection is ko (good).

At this point how to restore the connection? are there something that restore it under the hood or I have to restart the entire compose? thx for your time