Open mikehoyle opened 1 year ago
Also note that the curl commands resolve just fine when executed after container initialization, like:
docker exec -it gluetun /scripts/test.sh
And all else is working with the container and network.
I also have this issue.
I think it might be something to do with either the firewall or how the --up
behaves.
For me running a curl command from docker exec -it gluetun /bin/sh
works just fine as well.
This leads me to believe it might be something to do with the level/time at which --up
is invoked.
I tried --up-delay
, hoping it's something to do with the tunnel not being active early enough, but no luck.
Try with DOT=off
see if it fixes it?
Good idea, but still no dice
2023-01-01T11:06:54-08:00 ERROR [openvpn] curl: (6) Could not resolve host: ipinfo.io
2023-01-01T11:06:54-08:00 WARN [openvpn] Failed running command (--route-up): external program exited with error status: 6
@mikehoyle Did you ever get anywhere with this? I saw it was for your MAM session IP?
Unfortunately not, my current (bad) solution is to just regularly ssh into my machine and manually invoke the scripts via docker exec.
On Fri, Apr 19, 2024, 1:59 PM undaunt @.***> wrote:
@mikehoyle https://github.com/mikehoyle Did you ever get anywhere with this? I saw it was for your MAM session IP?
— Reply to this email directly, view it on GitHub https://github.com/qdm12/gluetun/issues/1267#issuecomment-2067275109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR2UU63Y77PWY3ZQLHYFKLLY6GARJAVCNFSM6AAAAAASRNDKW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGI3TKMJQHE . You are receiving this because you were mentioned.Message ID: @.***>
Is this urgent?
No
Host OS
Debian Bullseye
CPU arch
x86_64
VPN service provider
NordVPN
What are you using to run the container
docker-compose
What is the version of Gluetun
Running version latest built on 2022-11-18T09:51:44.899Z (commit 7a3b994)
What's the problem 🤔
Minimal repro: When using an OpenVPN userscript, as invoked like, for example:
- "OPENVPN_FLAGS=--script-security 2 --up /scripts/test.sh"
where/scripts
is a mounted folder withtest.sh
containingcurl http://ipinfo.io/ip
(Note this is an imagine onto which I've installed curl)
The expectation should be that the contents of the curl'ed address are returned. Instead, curl will always result in
curl: (6) Could not resolve host: ipinfo.io
. This is the case for any valid domain name. It also occurs even when explicitly setting--interface tun0
It seems like DNS is somehow not setup or working at this step. The same occurs when using --ipchange, or even --route-up, the latest script hook openvpn provides according to their docs.
Expected behavior: curl can successfully resolve hosts in these scripts.
Share your logs
Share your configuration
Dockerfile:
docker-compose.yml: