# Revert DNS settings after disconnection

**URL:** https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777
**Category:** Pritunl VPN
**Tags:** pritunl-client
**Created:** [April 16, 2026, 11:02pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777 "2026-04-16T23:02:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lorsungcu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@lorsungcu](https://forum.pritunl.com/u/lorsungcu)
#### Post date: [April 16, 2026, 11:02pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777/1 "2026-04-16T23:02:53Z")

</div>

When connecting, DNS settings are changed as configured in the server. Occasionally, it appears that this is not reverted to the expected, dynamic settings. Is this intentional? Do I need a scheduled task that resets the DNS settings on login if the VPN isn’t connected or something? Seems bizarre, given that I’ve used plenty of OpenVPN-based clients in the past and have never had this issue (that I’m aware of).

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [April 16, 2026, 11:30pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777/2 "2026-04-16T23:30:20Z")

</div>

What operating system is it? For Linux run the commands below to get the DNS system configuration.

```bash
sudo bash -x << 'EOF'
set -x
cat /etc/resolv.conf
cat /etc/resolvconf.conf
cat /etc/resolv.conf.bak
ls -la /etc/resolv.conf
resolvectl status
resolvectl dns
systemctl status systemd-resolved
resolvconf -l
NetworkManager --print-config | grep rc-manager
EOF

```

---

<div class="post-metadata">

### Author: ![lorsungcu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@lorsungcu](https://forum.pritunl.com/u/lorsungcu)
#### Post date: [April 17, 2026, 1:32pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777/3 "2026-04-17T13:32:28Z")

</div>

Clients are all Windows 10/11.

---

<div class="post-metadata">

### Author: ![lorsungcu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/l/8edcca/32.png) [@lorsungcu](https://forum.pritunl.com/u/lorsungcu)
#### Post date: [September 2, 2026, 6:22pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777/4 "2026-09-02T18:22:40Z")

</div>

Bumping this, seems to continue to be an issue. Anyone experienced it or know how I can resolve it?

---

<div class="post-metadata">

### Author: ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)
#### Post date: [September 2, 2026, 6:27pm UTC](https://forum.pritunl.com/t/revert-dns-settings-after-disconnection/3777/5 "2026-09-02T18:27:33Z")

</div>

All the DNS on the Windows OpenVPN connections is handled by the OpenVPN process. Only macOS and Linux have custom DNS code. I haven’t seen many reports of DNS issues on Windows. When the issue occurs run the commands below to get debugging information. Also check the profile logs for errors on disconnect.

```bash
Get-DnsClientServerAddress -AddressFamily IPv4 | Format-Table InterfaceAlias,InterfaceIndex,ServerAddresses -AutoSize

Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces' |
  ForEach-Object { $p = Get-ItemProperty $_.PSPath
    [pscustomobject]@{ GUID=$_.PSChildName; NameServer=$p.NameServer; DhcpNameServer=$p.DhcpNameServer; EnableDHCP=$p.EnableDHCP } } |
  Where-Object { $_.NameServer -or $_.DhcpNameServer } | Format-Table -AutoSize

Get-NetAdapter | Format-Table Name,InterfaceDescription,Status,ifIndex -AutoSize
Get-NetIPInterface -AddressFamily IPv4 | Sort-Object InterfaceMetric | Format-Table InterfaceAlias,InterfaceMetric,ConnectionState,Dhcp -AutoSize

Get-DnsClientNrptRule
Get-DnsClientNrptPolicy -Effective

netsh wfp show filters file=$env:TEMP\wfp.xml; Select-String -Path $env:TEMP\wfp.xml -Pattern 'OpenVPN|Pritunl' -Context 0,3

Get-Process | Where-Object { $_.Name -match 'openvpn|pritunl|wireguard' } | Format-Table Name,Id,StartTime

Resolve-DnsName app.pritunl.com | Format-List
Get-DnsClientGlobalSetting

```
