amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
4.47k stars 291 forks source link

DNS/Routing Problem in Linux Client on openSUSE Tumbleweed #528

Closed JackGin closed 8 months ago

JackGin commented 8 months ago

Hi guys,

I would like to extend my gratitude for your exceptional work in developing the Amnezia VPN project.

I am reaching out to report a potential bug I've encountered with the Linux client, specifically when operated on openSUSE Tumbleweed. Although the client successfully establishes a connection to the server, it appears to be facing a DNS/routing issue.

More precisely, while I am able to ping any IP address successfully, DNS resolution seems to be failing as I cannot access websites through a web browser. This issue persists regardless of whether Amnezia DNS is enabled or disabled.

I have tested this with two different versions of the client (4.1.0 and 4.2.0), and have experimented with both Amnezia WG and OpenVPN over Cloak protocols. Interestingly, the client functions without any such DNS issues on Android and Windows platforms when connecting to the same server.

I understand the complexities involved in maintaining cross-platform compatibility and appreciate any efforts you can make to investigate and resolve this issue. Your support in this matter would be greatly appreciated.

The logs say: 2024-01-22 17:10:02 debug Amnezia "DaemonLocalServer" "New connection received" 2024-01-22 17:10:02 debug Amnezia "DaemonLocalServerConnection" "Connection created" 2024-01-22 17:10:02 debug Amnezia "DaemonLocalServerConnection" "Read Data" 2024-01-22 17:10:02 debug Amnezia "DaemonLocalServerConnection" "Command received: status" 2024-01-22 17:10:02 debug Amnezia "Daemon" "Status request" 2024-01-22 17:10:02 debug Amnezia "DaemonLocalServerConnection" "Command received: activate" 2024-01-22 17:10:02 debug Amnezia "Daemon" "Activating interface" 2024-01-22 17:10:02 debug Amnezia "WireguardUtilsLinux" "Created wireguard interface amn0" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "LinuxRouteMonitor created." 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding exclusion route for 153.92.126.74/32" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Gateway 10.0.0.1 for interface enp2s0" 2024-01-22 17:10:02 debug Amnezia "WireguardUtilsLinux" "Configuring peer 26/jz74o49mD0r4PBrw4MD8pVijp6k2/X5HsPS87mWI= via 153.92.126.74" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding exclusion route for 153.92.126.74/32" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Gateway 10.0.0.1 for interface enp2s0" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding exclusion route for /999999" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Invalid destination prefix" 2024-01-22 17:10:02 debug Amnezia "DnsUtilsLinux" "Adding DNS resolver 172.29.172.254 via amn0" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding route to 0.0.0.0/1" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding route to 128.0.0.0/1" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding route to ::/1" 2024-01-22 17:10:02 debug Amnezia "LinuxRouteMonitor" "Adding route to 8000::/1" 2024-01-22 17:10:02 debug Amnezia "Daemon" "Connection status: 1" 2024-01-22 17:10:02 debug Amnezia "DnsUtilsLinux" "Error received from the DBus service" 2024-01-22 17:10:02 debug Amnezia "DnsUtilsLinux" "Error received from the DBus service" 2024-01-22 17:10:02 debug Amnezia "DnsUtilsLinux" "Error retrieving the DNS domains from the DBus service" 2024-01-22 17:10:02 debug Amnezia "Daemon" "Checking for handshake..." 2024-01-22 17:10:02 debug Amnezia "Daemon" "awaiting 26/jz74o49mD0r4PBrw4MD8pVijp6k2/X5HsPS87mWI=" 2024-01-22 17:10:02 debug Flush dns completed 2024-01-22 17:10:02 critical Critical, trying to add invalid route: 172.29.172.254 2024-01-22 17:10:02 critical Critical, trying to add invalid route: 1.0.0.1

JackGin commented 8 months ago

Turns out to be an issue with resolv.conf. Thanks once again. Closing.

KDBal commented 5 months ago

Turns out to be an issue with resolv.conf. Thanks once again. Closing.

Could you, please, tell, how did you fix this issue? I have the same problem.

SputerSnot commented 5 months ago

Turns out to be an issue with resolv.conf. Thanks once again. Closing.

Could you, please, tell, how did you fix this issue? I have the same problem.

Assuming you're using NetworkManager:

Amnezia works poorly with NetworkManager, try other network manager like systemd-networkd or another alternatives https://wiki.archlinux.org/title/Network_configuration#Network_managers