-
I am looking for a simple way to trigger a vpn disconnect and reconnect. Not restart the container, just a vpn restart like when the healthcheck fails. I want to issue this a few times a week to randomly change the VPN endpoint. For instance, I use this snippet to check the current location of the VPN:
Is there a similar command to issue inside of the container to perform a restart? Or maybe a curl request to the HTTP control server? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Answering my own question. One can utilize a "bug" (per qdm12) that triggers auto-healing to rotate to a new vpn endpoint by issuing this to the control server: docker exec -ti [gluetun container id] 'wget' '-qO-' '--method=PUT' '--body-data={"status":"stopped"}' 'http://127.0.0.1:8000/v1/openvpn/status' |
Beta Was this translation helpful? Give feedback.
-
Hey @sboger --A few questions, if you a have a moment I'd really appreciate your input.
I'm wanting to collect some more detail on this and other updater issues. Also, as noted in the issues I've mentioned, there is a deadly combination of using this to reissue an ipaddr / gateway if your cocktail involves: > gluetun:v3 + wireguard + I just summarized my previous use, etc. in this recent comment: |
Beta Was this translation helpful? Give feedback.
-
@sboger I also found such option, it works a bit faster: |
Beta Was this translation helpful? Give feedback.
Answering my own question. One can utilize a "bug" (per qdm12) that triggers auto-healing to rotate to a new vpn endpoint by issuing this to the control server:
docker exec -ti [gluetun container id] 'wget' '-qO-' '--method=PUT' '--body-data={"status":"stopped"}' 'http://127.0.0.1:8000/v1/openvpn/status'