[GH-ISSUE #1230] DNS nameserver doesn't revert to default after VPN disconnection #463

Open
opened 2026-10-13 20:22:05 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @mikop63 on GitHub (Nov 4, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1230

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):

  • OS: MacOS
  • Version: 13.4.1 (22F82)

Server (please complete the following information):

  • OS: Ubuntu 24.04
Originally created by @mikop63 on GitHub (Nov 4, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1230 **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):** - OS: MacOS - Version: 13.4.1 (22F82) **Server (please complete the following information):** - OS: Ubuntu 24.04
Author
Owner

@omaximchuk commented on GitHub (Nov 28, 2024):

I am facing the same problem, my OS is MacOS Sequoia 15.1.1 (24B91), Amnezia 4.8.2.3.
My quick solution for this problem is

  1. Remove redundant nameserver lines from the /etc/resolv.conf file
  2. sudo killall -HUP mDNSResponder
<!-- gh-comment-id:2505474815 --> @omaximchuk commented on GitHub (Nov 28, 2024): I am facing the same problem, my OS is MacOS Sequoia 15.1.1 (24B91), Amnezia 4.8.2.3. My quick solution for this problem is 1. Remove redundant `nameserver` lines from the `/etc/resolv.conf` file 2. `sudo killall -HUP mDNSResponder`
Author
Owner

@nikonov220 commented on GitHub (Dec 3, 2024):

I am facing same problem with Amnesia 4.8.2.3 and MacOS Sequoia 15.1.1
Quick fix at sudo networksetup -setdnsservers Wi-Fi dns ip-address

<!-- gh-comment-id:2515602428 --> @nikonov220 commented on GitHub (Dec 3, 2024): I am facing same problem with Amnesia 4.8.2.3 and MacOS Sequoia 15.1.1 Quick fix at sudo networksetup -setdnsservers Wi-Fi _dns ip-address_
Author
Owner

@bearattack11 commented on GitHub (Dec 18, 2024):

I have the same problem in Amnezia 4.8.2.3 and macOS 15.2 (24C101).

It can be resolved by disabling Wi-Fi and/or the Ethernet interface and re-enabling.

<!-- gh-comment-id:2552266633 --> @bearattack11 commented on GitHub (Dec 18, 2024): I have the same problem in Amnezia 4.8.2.3 and macOS 15.2 (24C101). It can be resolved by disabling Wi-Fi and/or the Ethernet interface and re-enabling.
Author
Owner

@e13mort commented on GitHub (Jan 20, 2025):

Got the same issue. v4.8.2.3, MacOS 15.0.1

<!-- gh-comment-id:2601870674 --> @e13mort commented on GitHub (Jan 20, 2025): Got the same issue. v4.8.2.3, MacOS 15.0.1
Author
Owner

@bigslycat commented on GitHub (Aug 13, 2025):

Same issue on v4.8.9.2, Mac OS 15.6.

<!-- gh-comment-id:3184070498 --> @bigslycat commented on GitHub (Aug 13, 2025): Same issue on `v4.8.9.2`, Mac OS `15.6`.
Author
Owner

@harmakit commented on GitHub (Nov 13, 2025):

it for me it changes not to 1.1.1.1, but to server's address (i suppose it depends on whether you are using amenzia dns or not)
on v4.8.10.0, macOS 26.1

<!-- gh-comment-id:3528680008 --> @harmakit commented on GitHub (Nov 13, 2025): it for me it changes not to 1.1.1.1, but to server's address (i suppose it depends on whether you are using amenzia dns or not) on `v4.8.10.0`, macOS `26.1`
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#463
No description provided.