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).
What operating system is it? For Linux run the commands below to get the DNS system configuration.
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
Clients are all Windows 10/11.
Bumping this, seems to continue to be an issue. Anyone experienced it or know how I can resolve it?
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.
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