Closed clpir3s closed 9 months ago
I am having a similar problem https://github.com/qdm12/gluetun/issues/2072
Same problem, but I have an idea why, investigating....
I found the issue; I tried to post my entire deduction because everybody's network and setup are different, so I might need more than posting a solution.
Here is what you can do and how I solved it.
The log shows that WireGuard keeps trying to connect, but it never succeeds. You never see in your log that it is connected and what your new public IP is.
You also see an error for a timeout of ipinfo.
So logic: Timeout for ipinfo
== CORRECT; because there is no established VPN connection.
BTW: I have a similar setup; I'm trying to run it as a sidecar on a nomad cluster. This cluster also runs consul and vault. Important to know about my setup is that I have a custom dnmasq running on every node which is accessible on the IP of the node to make sure that my entire network can resolve *.service.consul
services. Important about this side node is that in my /etc/resolv.conf I have nameserver 192.168.0.{NODE_IP}
Instead of 127.0.0.7
.
The side note I gave above, combined with the logging except for different VPN providers, is identical to this issue; it led me to think I might have a DNS issue or there is a firewall issue within the gluten container, and it is unable to resolve the IP of the VPN node.
Steps:
FIREWALL_DEBUG=on
DOT
)
docker exec
ping google.com
and see if it is working or notping
does not return anything, you might have the same issue./iptables/post-rules.txt
depending on what your actual problem isFIREWALL_OUTBOUND_SUBNETS=192.168.0.0./24
to trust my entire local network, which solved the DNS and firewall rules, after recreating the container with the option VPN was connected in about 3 sec.I apologize for the lengthy read, because everybody's network setup can be so vastly different, I wrote this entire thing to guide everybody who reads this through the logical steps. Just take it one step at a time and eliminate issues until you find the root case.
@clpir3s @mkozikowsk Hope this helps
To summarize, it looks like your container has some config which causes the firewall to block the outbound connection to the VPN Providers VPN Node.
I just fixed it but adding the following environment variable : FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
.
Does this cause any security issues?
@gjrtimmer, @N367B
In my case, it seems that DNS is also not working. Adding env variable FIREWALL_OUTBOUND_SUBNETS=192.168.0.0./24
or even 0.0.0.0/0
doesn't fix the issue.
On my container, adding this causes another error:
torrent-gluetun-1 | 2024-01-25T13:53:42Z INFO [wireguard] Connecting to 37.19.221.156:51820
torrent-gluetun-1 | 2024-01-25T13:53:42Z INFO [wireguard] Wireguard is up
torrent-gluetun-1 | 2024-01-25T13:53:42Z INFO [healthcheck] healthy!
torrent-gluetun-1 | 2024-01-25T13:53:42Z INFO [dns over tls] downloading DNS over TLS cryptographic files
torrent-gluetun-1 | 2024-01-25T13:53:44Z INFO [dns over tls] downloading hostnames and IP block lists
torrent-gluetun-1 | 2024-01-25T13:53:49Z INFO [dns over tls] init module 0: validator
torrent-gluetun-1 | 2024-01-25T13:53:49Z INFO [dns over tls] init module 1: iterator
torrent-gluetun-1 | 2024-01-25T13:53:49Z INFO [dns over tls] start of service (unbound 1.17.1).
torrent-gluetun-1 | 2024-01-25T13:53:50Z INFO [healthcheck] unhealthy: dialing: dial tcp4: lookup cloudflare.com: i/o timeout
torrent-gluetun-1 | 2024-01-25T13:53:58Z INFO [healthcheck] program has been unhealthy for 6s: restarting VPN (see https://github.com/qdm12/gluetun/wiki/Healthcheck)
torrent-gluetun-1 | 2024-01-25T13:53:58Z ERROR [vpn] cannot get version information: Get "https://api.github.com/repos/qdm12/gluetun/releases": context canceled
Thanks guys,
@gjrtimmer, For me it looks like "temporary" issue (load on the servers), because sometimes it works fine. I have seen this issues happens when is also difficult to connect using the official surfshark, app also in PC and Mobile.
It looks like the server is is in trouble to give a new server to connect. But its strange because @mkozikowsk is using another provider.
But, I already first tried with FIREWALL_OUTBOUND_SUBNETS=192.168.0.0/24
and then FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
.
With the last FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
is seams more stable, and fast to create the container and be ready.
I'll keep seeing if this variable FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
solve it. If I see this error I will test on the mobile at the same time, because right now its fasted connect also.
Update,
@N367B
I already check that when I use this FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
, I'm not in tunel, I'm seeing my privider ip on the other side instead of a vpn ip.
also the logs:
2024-01-25T16:45:44Z INFO [ip getter] Public IP address is
It's probably that, but at least it's not blocking traffic. Hoping for a real solution soon.
I also started running into this issue with a similar wireguard setup. Everything was working fine for the last few months. Hoping a fix can be made 🙏
Hi guys,
I some changes in my configuration, it still stable for more than one 1 day.
What I do.
WIREGUARD_PRIVATE_KEY
to the final container.after that it was giving me this error [healthcheck] unhealthy: cannot dial: dial tcp4 cloudflare:443: i/o timeout
I added this config - HEALTH_TARGET_ADDRESS=1.1.1.1:443
https://github.com/qdm12/gluetun/discussions/929
try
- DOT=off
- DNS_ADDRESS=8.8.8.8
Sometimes it's a Cloudflare DNS problem, try using a different DNS and you might be able to solve it.
Hello everyone... so a lot of funny things going on here...
The main point is in the logs; Typically i/o timeout errors indicate the Wireguard connection is not working
. And then the other log line program has been unhealthy for 41s: restarting VPN (see https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md)
I suggest you read https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md
I just fixed it but adding the following environment variable :
FIREWALL_OUTBOUND_SUBNETS=0.0.0.0/0
. Does this cause any security issues?
Yes. This basically allows your traffic to go out of the VPN totally, so yeah nothing will fail obviously, since it doesn't go through the VPN if it doesn't work. Don't do it. I'll probably codify this.
Sometimes it's a Cloudflare DNS problem, try using a different DNS and you might be able to solve it.
No, it's the VPN server. You can always check on your non-VPN machine that cloudflare DNS works.
DOT=off
As a reminder, this leaks DNS traffic to the VPN provider, which I would ideally not trust personally.
Hoping a fix can be made / Hoping for a real solution soon.
Read https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md If nothing works, change VPN provider 😞
Closing this since this is going in all directions, without useful information (i.e. what provider are you using? What server hostname? etc.)
6b9c775055d9a1712f60d1980f1d9c542456bc9b prevents using public subnets in FIREWALL_OUTBOUND_SUBNETS
. Better have a safe not working Gluetun than an unsafe leaking "working" Gluetun.
In my case it was not a problem with the gluetun configuration, but the firewall on my router :|
Is this urgent?
No
Host OS
ubuntu
CPU arch
aarch64
VPN service provider
Surfshark
What are you using to run the container
docker-compose
What is the version of Gluetun
v3.36.0
What's the problem 🤔
Hi all,
I already setup multiple server (in order to have many Public IP), I'm not sure if this is related to the number of server I'm using.
Can you help me if I'm missing some config?
Share your logs (at least 10 lines)
Share your configuration