amnezia-vpn / amnezia-client

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

DNS nameserver doesn't revert to default after VPN disconnection #1230

Open mikop63 opened 2 weeks ago

mikop63 commented 2 weeks ago

Describe the bug Upon disconnecting from the VPN, DNS nameserver doesn't revert to default value

To Reproduce Steps to reproduce the behavior:

  1. Before connecting to the VPN, run the command: cat /etc/resolv.conf. You should see the following line in the file: nameserver 192.168.0.1 (this DNS is provided by my DHCP server).
  2. Connect to the VPN using the XRay protocol in Amnezia.
  3. Check the /etc/resolv.conf file again, and you will see that nameserver 192.168.0.1 has been replaced by 1.1.1.1.
  4. Disconnect from the VPN and check /etc/resolv.conf again. The nameserver remains set to 1.1.1.1 instead of reverting to the DHCP-provided value, 192.168.0.1.

Expected behavior Upon disconnecting from the VPN, the DNS should revert to the DHCP-assigned value (192.168.0.1) rather than remaining at 1.1.1.1.

Desktop (please complete the following information):

Server (please complete the following information):