On this page
Try these first, in this order
- 1
Let the VPN clean up after itself
Start the program, connect and disconnect with its own button, then quit from the tray or the menu bar. If you removed it, install the same one again for a minute: this takes away what it set far more safely than you can by hand.
- 2
Turn off its kill switch
Some clients keep the internet closed on purpose after a drop, until you connect again or turn the protection off. Look for kill switch, “always require VPN”, “block internet without VPN”.
- 3
Restart the computer
Routes and adapters of a program that has died go away. Firewall rules, DNS and the proxy can stay.
- 4
Check with another device
If the phone has no internet on the same Wi-Fi either, it isn't the VPN: restart the router and look at the provider.
- 5
Then find what is left
Three commands in the next section tell the proxy from DNS and from the firewall.
What exactly is broken
Run these with the VPN off. The first goes to an address without names, the second asks for a name, the third goes the way a browser does.
ping -n 2 1.1.1.1
nslookup example.com
curl.exe -sI -m 8 https://example.comping -c 2 1.1.1.1
nslookup example.com
curl -sI -m 8 https://example.comThe ping fails too:
General failure,Destination host unreachable, or silenceWhat is leftRoutes into a dead tunnel, or the kill switch's firewall rules
What to doThe routes and firewall of your system below
The ping works, nslookup doesn't
What is leftDNS of the VPN: an address that exists only in its tunnel
What to doReturn DNS to automatic
Both work, curl works, the browser doesn't
What is leftThe system proxy or the browser's own
What to doTurn the proxy off
Both work, curl doesn't,
127.0.0.1in its errorWhat is leftProxy variables
What to doRemove
http_proxy,https_proxy,all_proxySome sites open, others don't
What is leftIPv6 turned off halfway, a routing rule, or MTU
What to doTurn the adapter off and on; on Windows reset the network
The Wi-Fi shows “No internet”, though sites open
What is leftThe system's check is closed by a leftover rule or DNS
What to doSame as the first two rows
It worked for years, then a driver or antivirus of the VPN was removed
What is leftA filter driver in the adapter's settings
What to doReset the network; on a Mac, remove the system extension
Windows: undo it
PowerShell as administrator. The adapter's name in quotes comes from Get-NetAdapter: on a Windows in another language it isn't Wi-Fi.
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable -Value 0
netsh winhttp reset proxyThe first is the browsers' switch (the same one is in Settings → Network & internet → Proxy), the second is for services. Restart the browser. If your work gives you a proxy, don't touch either.
Get-DnsClientServerAddress -AddressFamily IPv4
Set-DnsClientServerAddress -InterfaceAlias 'Wi-Fi' -ResetServerAddresses
ipconfig /flushdnsAn address such as 10.x or 172.x next to your Wi-Fi that isn't your router's is a leftover. The second line returns it to automatic.
Get-DnsClientNrptRuleUsually empty. A rule with Namespace . sends all names to one server: if it belongs to the removed VPN, take it away with Remove-DnsClientNrptRule -Name and its name in braces. On a work computer ask the admins first.
Get-NetRoute -DestinationPrefix '0.0.0.0/0','0.0.0.0/1','128.0.0.0/1' -ErrorAction SilentlyContinue | Format-Table InterfaceAlias, DestinationPrefix, NextHop
Remove-NetRoute -DestinationPrefix '0.0.0.0/1','128.0.0.0/1'One line with 0.0.0.0/0 and your router's address is normal. The halves, 0.0.0.0/1 and 128.0.0.0/1, belong to a VPN: with no VPN on, the second line removes them and asks to confirm.
Get-NetFirewallRule -Direction Outbound -Action Block -Enabled True | Format-Table DisplayName, GroupBlocking outbound rules are rare on a home computer, and the name or group says whose they are. Turn one off with Disable-NetFirewallRule -DisplayName and the name: that can be undone, unlike deleting.
netsh winsock reset
netsh int ip resetThen restart. The same, deeper, is Settings → Network & internet → Advanced network settings → Network reset: it reinstalls adapters and forgets Wi-Fi passwords, and other VPNs have to be installed again.
- A leftover adapter — Device Manager → View → Show hidden devices → Network adapters: TAP, Wintun, WireGuard or the VPN's name. Remove the device if its program is gone.
- A filter in the adapter — Network Connections (
ncpa.cpl) → your adapter → Properties: an item with the name of the removed VPN or antivirus can be unticked.
macOS: undo it
networksetup -setwebproxystate Wi-Fi off
networksetup -setsecurewebproxystate Wi-Fi off
networksetup -setsocksfirewallproxystate Wi-Fi off
networksetup -setautoproxystate Wi-Fi offNames of other connections: networksetup -listallnetworkservices. The same is in System Settings → Network → Wi-Fi → Details → Proxies.
networksetup -getdnsservers Wi-Fi
sudo networksetup -setdnsservers Wi-Fi Empty
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderEmpty returns DNS to automatic. An address in the first answer that you didn't set is a leftover.
netstat -rn -f inet | grep -E 'default|^0/1|^128'
sudo pfctl -s rules
sudo pfctl -f /etc/pf.conf0/1 and 128.0/1 on a utun adapter belong to a VPN and go away on restart. The second line shows firewall rules, the third loads the system's own set instead of them.
- VPN profiles and filters — System Settings → VPN, and the filters in Network: turn off and remove what belonged to the VPN.
- A device profile — System Settings → General → Device Management: a profile can hold DNS, a proxy or a VPN. Remove it if it isn't your employer's.
Linux: undo it
resolvectl status
cat /etc/resolv.conf
sudo systemctl restart systemd-resolved NetworkManagerA server from the tunnel next to your Wi-Fi is a leftover; restarting returns what the router gives. If /etc/resolv.conf doesn't change, look at lsattr /etc/resolv.conf: with an i some program locked it, and sudo chattr -i /etc/resolv.conf unlocks it.
ip route
ip rule
ip link show type wireguardIn ip rule, three lines are normal: 0, 32766 and 32767. sudo wg-quick down wg0 takes down a WireGuard tunnel with everything it set.
sudo nft list ruleset
sudo iptables -S OUTPUT
gsettings set org.gnome.system.proxy mode 'none'A table or chain with the VPN's name that drops output is its kill switch. sudo nft delete table inet NAME removes one table: take the name from the first answer.
Android and iPhone
- Android, Always-on VPN. Settings → Network & internet → VPN → the gear next to the app: with “Block connections without VPN” on, there is no internet until that VPN is up. Turn both switches off.
- Android, Private DNS. Settings → Network & internet → Private DNS: a hostname the VPN needed may not answer now. Set Automatic.
- Android, the Wi-Fi proxy. The network's settings → Proxy: None.
- iPhone. Settings → General → VPN & Device Management: delete the VPN's configuration and profile. Settings → General → Transfer or Reset iPhone → Reset → Reset Network Settings is the last resort and forgets Wi-Fi passwords.
When it isn't the VPN
- The router or the provider: a phone on the same Wi-Fi has no internet either.
- The plan: the mobile data or the home tariff ran out while the VPN was on.
- Another protection: an antivirus with its own firewall, or a second VPN that starts with the system.
- Your address was blocked by one site: other sites open.