amnezia-client
amnezia-client copied to clipboard
Problem with DNS servers
I can’t access websites when VPN is enabled. Pings IP addresses, but when trying to ping google.com or other domains it gives an error. VPN works on other devices
Amnezia: 4.4.0.0 Linux: KaOS rolling
4.5.0.0 from github Manjaro Linux AmneziaWG - DNS not working. AmneziaDNS nor 8.8.8.8/1.1.1.1 etc Amnezia OpenVPN over Cloak works well
Please test https://github.com/amnezia-vpn/amnezia-client/releases/tag/4.5.3.0
Please test https://github.com/amnezia-vpn/amnezia-client/releases/tag/4.5.3.0
Thank you. But it's not work for me now
Connect established, but dns not acceptable.
Not working for me
This problem also remains in version 4.6.0.3 (AmneziaWG).
OS: Manjaro linux 24.0.5.
Same problem with Arch Linux. AmneziaVPN version 4.6.0.3. Unable to resolve domain names with OpenVPN and AmneziaWG. OpenVPN over Cloak works fine.
Same problem here.
Linux 6.1.0-22-amd64 Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux
both on 4.6.0.3 and 4.5.0.0 has the same problem.
Vpn on:
❯ nslookup google.com
;; communications error to 192.168.50.1#53: connection refused
;; communications error to 192.168.50.1#53: connection refused
;; communications error to 192.168.50.1#53: connection refused
;; communications error to 8.8.8.8#53: connection refused
;; communications error to 8.8.4.4#53: connection refused
;; no servers could be reached
and whithout vpn:
❯ nslookup google.com
Server: 192.168.50.1
Address: 192.168.50.1#53
Non-authoritative answer:
Name: google.com
Address: 142.250.186.142
Name: google.com
Address: 2a00:1450:4026:803::200e
i decided to check:
vpn off:
❯ nc -vz 142.250.186.142 443
Connection to 142.250.186.142 443 port [tcp/https] succeeded!
❯ nc -vz 142.250.186.142 80
Connection to 142.250.186.142 80 port [tcp/http] succeeded!
❯ nc -vz 8.8.8.8 53
Connection to 8.8.8.8 53 port [tcp/domain] succeeded!
vpn on:
❯ nc -vz 8.8.8.8 53
nc: connect to 8.8.8.8 port 53 (tcp) failed: Connection refused
❯ nc -vz 142.250.186.142 80
Connection to 142.250.186.142 80 port [tcp/http] succeeded!
❯ nc -vz 142.250.186.142 443
Connection to 142.250.186.142 443 port [tcp/https] succeeded!
TL;DR : so, my workaround was this:
❯ sudo iptables -L | grep DNS
Chain amnvpn.310.blockDNS (1 references)
Chain amnvpn.320.allowDNS (1 references)
Chain amnvpn.a.310.blockDNS (1 references)
amnvpn.310.blockDNS all -- anywhere anywhere
Chain amnvpn.a.320.allowDNS (1 references)
amnvpn.320.allowDNS all -- anywhere anywhere
amnvpn.a.320.allowDNS all -- anywhere anywhere
amnvpn.a.310.blockDNS all -- anywhere anywhere
I thought that it looks wierd, and i decide to delete some rules 1 by 1 (cuz i have no idea how iptables works):
sudo iptables -F amnvpn.a.310.blockDNS
and now everything is working, except amnezia dns:
❯ nc -vz 8.8.8.8 53
Connection to 8.8.8.8 53 port [tcp/domain] succeeded!
❯ nslookup google.com
Server: 192.168.50.1
Address: 192.168.50.1#53
Non-authoritative answer:
Name: google.com
Address: 216.58.209.206
Name: google.com
Address: 2a00:1450:4026:803::200e
Still need to hit sudo iptables -F amnvpn.a.310.blockDNS
each time i need to use vpn!!
If I understand the logic in client/platforms/linux/daemon/dnsutilslinux.cpp
correctly amnezia-client
tries to send information about new DNS servers via DBUS to local resolver (systemd-resolved
), and blocks all other DNS requests with the firewall rule amnvpn.a.310.blockDNS
. If local resolver is disabled (default on Arch and Manjaro), it causes an error in DNS name resolution.
You can start systemd-resolved
before connecting to VPN to fix this issue:
sudo systemctl start systemd-resolved
or enable it on system boot
sudo systemctl enable systemd-resolved
It didn't work for me with Kali Linux, I installed systemd-resolved and started service, it's running, but when I turn on VPN and try to find IP of google.com it writes:
nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find google.com: REFUSED
Moreover, after VPN turned off, DNS still was not working. I had to write nameservers to resolv.conf file manually to restore Internet without VPN.
I solved issue by changing nameserver 127.0.0.53 to nameserver 172.29.172.254 (it's the address of Amnezia DNS) in /etc/resolv/conf and not reloading systemd-resolved after making changes. It seems that there is no DNS leak and everything works fine.
With 4.7.0.0 AmneziaWG started to work OS: Manjaro Linux Client app from Releases page here
Doesn't work for me when the systemd-resolved and the VPN are active both.
I have to do systemctl disable systemd-resolved
systemctl stop systemd-resolved
and just then DNS resolve works again.
EndeavourOS
Amnezia 4.7.0.0