VPN not connecting or not working: how to find the cause

If a VPN won't connect, turn it off first and check that the internet works without it: if it doesn't, the VPN isn't the cause. If it does, go through the usual causes in order: the device's clock, DNS, a server that is down or a subscription that has run out, another VPN or proxy, an antivirus, and a network that blocks the protocol or the server's address. Two quick tests split them: another server, then another network such as mobile data. Whichever one works tells you where the fault is.

Updated

Link checker: every field and what's wrong with it

Why it won't connect, in Veli. Veli says in plain words why a connection isn't coming up: under the button while it tries, and in Diagnostics afterwards.

Download Veli for free
On this page

First, what exactly happens

A VPN can fail at different moments, and each has its own causes. Find yours before changing anything.

  • Nothing opens even with the VPN off: the VPN isn't the cause. It's your network, or a proxy, DNS or routes a VPN left behind.
  • It never connects: the button spins, then an error or a timeout. That is this page.
  • It says Connected, but sites don't open: a different problem with its own guide, connected but no internet.
  • It works on Wi-Fi but not on mobile data: cause eight below, and its own guide.
  • It connects, then drops after a while: the guide about a VPN that keeps disconnecting.
  • Only one site or app fails: that site may refuse VPN addresses, or a split tunneling rule sends it past the tunnel.

The common causes, in order

Go from the top: the first checks take seconds and rule out the most.

  1. 1

    No internet without the VPN

    Disconnect the VPN and open a site you rarely visit. If nothing loads, the VPN has nowhere to connect to. Hotel, café and airport Wi-Fi often wants a sign-in on its own page first: open the browser and sign in. Otherwise restart the router or try another network. If the internet broke right after a VPN crashed or was removed, it left its settings behind; the guide about no internet after a VPN undoes them.

  2. 2

    The clock is wrong

    TLS refuses a certificate when the device's date falls outside its validity dates, so a clock off by days breaks every protocol over TLS. VMess, by Xray's documentation, needs the clock within 120 seconds of real time, and a Reality server may set its own limit. Turn on automatic time: on Windows 11 Settings → Time & language → Date & time → “Set time automatically”, on macOS System Settings → General → Date & Time → “Set time and date automatically”, on Android Date & time in the settings. The zone itself doesn't matter, but the right hour set by hand in the wrong zone is hours off.

  3. 3

    DNS can't find the server

    If the server in your link is a name such as vpn.example.com, the device has to look it up first. When that fails, the client says it can't resolve the name (Go-based ones write no such host), and nslookup with that name returns no address while ping 1.1.1.1 answers. Flush the DNS cache, restart the router or set another DNS server. On Android, Private DNS set to a hostname your network doesn't let through stops every name from resolving: set it to Automatic for a test.

  4. 4

    The server is down, or the term has run out

    Test the delay through the server (real delay, URL test, ping via proxy), not ICMP ping: many servers never answer ping. One server silent while others answer: that server is down or blocked. Every server silent, the list empty, or server names turned into messages: the term, the traffic or the device limit has run out. Update the subscription and look at your account with the service. For a server of your own, check in the hosting panel that it runs and its port is open.

  5. 5

    Another VPN or a proxy is on

    Two VPNs that both want all the traffic don't work together, and a proxy client that crashed leaves the system proxy pointing at a port where nothing listens. Quit other VPN and proxy apps completely, tray icon included, and turn the system proxy off. On Android only one VPN runs at a time, and starting one stops the other; in the VPN settings (on stock Android, Settings → Network & internet → VPN) see whether another app is set as always-on.

  6. 6

    An antivirus or firewall stops it

    Windows' own firewall lets outgoing connections through unless a rule says otherwise, so a block usually comes from a third-party security suite or an administrator's rule. Signs: the client says its core file is missing, or it connects with the suite paused for a minute. Restore the file from quarantine, add the client's folder as an exception, then turn protection back on.

  7. 7

    This network blocks the protocol or the server's address

    If the same server connects from mobile data or another Wi-Fi but not from here, this network is in the way. When nothing reaches the address at all (ping, every port, SSH), its IP is blocked here, and only another address helps. When the address answers but the VPN connection breaks, the protocol is being recognized: try one that looks more like ordinary HTTPS, such as VLESS Reality. TLS fragmentation helps only against filtering by site name.

  8. 8

    Wi-Fi works, mobile data doesn't

    Most often the carrier doesn't pass the UDP that WireGuard, AmneziaWG and Hysteria2 run on, while a TCP protocol gets through. Less often it's an IPv6-only network, packet size, Private DNS or battery limits. The guide about mobile data goes through each.

  9. 9

    It connects, then drops

    Here something breaks the link later, and when it drops tells you why: on changing networks, after the screen goes off, after idle minutes, on a big download. See the guide about a VPN that keeps disconnecting.

What you see, the likely cause, what to do

  • Nothing opens with the VPN off

    Likely causeYour network, or settings a VPN left behind

    What to doAnother network, restart the router, remove the leftovers

  • Public Wi-Fi, nothing connects

    Likely causeThe network wants a sign-in first

    What to doOpen the browser, sign in, then connect

  • A certificate error, or VMess fails on every server

    Likely causeThe clock

    What to doAutomatic time, then connect again

  • no such host, the name can't be resolved

    Likely causeDNS

    What to doFlush the cache, another DNS, Private DNS to Automatic

  • One server is silent, others answer

    Likely causeThat server is down or blocked

    What to doAnother server; tell the service

  • Every server is silent, the list is empty or has odd names

    Likely causeTerm, traffic or device limit

    What to doUpdate the subscription, check your account

  • Works once another app is closed

    Likely causeAnother VPN or a leftover system proxy

    What to doKeep one VPN, turn the system proxy off

  • The client says its core file is missing

    Likely causeAntivirus quarantine

    What to doRestore the file, add an exception

  • Fails here, connects from mobile data

    Likely causeThis network blocks the protocol

    What to doAnother protocol

  • Ping, every port and SSH to the server fail from here

    Likely causeThe server's IP is blocked on this network

    What to doA new IP from the hosting, or a new server

Check it yourself in a minute

These commands tell your network, DNS and the server's port apart. Put your server's address and port in place of vpn.example.com and 443.

Windows, macOS, Linux
ping 1.1.1.1

Answers: the internet works. Some networks drop ping, so also open a site with the VPN off.

Windows, macOS, Linux
nslookup vpn.example.com

An address in the answer: DNS is fine. An error or no address: DNS is the cause.

Windows, PowerShell
Test-NetConnection vpn.example.com -Port 443

TcpTestSucceeded : True: the server's TCP port answers from this network. It tests TCP only, so it says nothing about WireGuard, AmneziaWG or Hysteria2.

macOS, Linux
nc -vz vpn.example.com 443

“succeeded” or “Connected”: the TCP port answers. UDP can't be checked this way.

Windows, Command Prompt as administrator
w32tm /resync

Sets the clock from the time server now.

Linux
timedatectl

You want System clock synchronized: yes. If not: sudo timedatectl set-ntp true.

By the error text

The words in the log point to the step that failed. Each of these has its own detailed guide.

  • context deadline exceeded: a client written in Go (Xray, sing-box and the apps on them) waited for a step and gave up. The cause is in the words next to it: i/o timeout, connection reset by peer, EOF.
  • Handshake did not complete: WireGuard or AmneziaWG got no answer to its first packet. Check the Endpoint, whether UDP gets through, the keys and the server's firewall.
  • reality verification failed: the server didn't recognize the client and passed it to its masking site. The public key, short ID or site name in the link don't match.
  • TLS key negotiation failed to occur within 60 seconds: OpenVPN's TLS handshake didn't finish in its default 60 seconds. Usually the packets don't get through: the port, UDP or TCP, the address.
  • timeout: no recent network activity: the QUIC library under Hysteria2 got nothing back. The UDP port is closed, the port or obfs is wrong, or the network drops UDP.
  • ERR_TUNNEL_CONNECTION_FAILED: the browser goes through a proxy that can't reach the site, usually a system proxy left on by a closed client. Turn it off.

By app: what usually breaks

Each program has its own guide with its messages and menus. Here is the first thing to look at.

  • Happ: measure ping via proxy for the whole subscription. One server silent means that server; none answering means your network or the term.
  • v2rayNG: a subscription stays an empty tab until “Update subscription”. Every server failing: check the date and time.
  • v2rayN: “Failed to run Core” is usually a broken config or a local port another program holds. A vanished core file is often in quarantine.
  • Hiddify: VPN mode on a computer needs administrator rights once. “The VPN provider refused this link” means the term or the device limit.
  • NekoBox: no longer developed, the last version is 1.4.2. A subscription address without a path is read as an HTTP proxy.
  • Clash Verge Rev: “Tun Mode” needs the service, installed once with “Install Service”. After a forced close the system proxy stays on.
  • AmneziaWG: Jc, S1, H1 and the other parameters must match the server; an older app may not read a newer file.
  • WireGuard: Handshake did not complete is silence from the server. On Windows, “Unable to create network adapter” is the driver.
  • OpenVPN: TLS key negotiation failed means the packets don't get through, or proto udp and proto tcp differ. On Windows a busy TAP adapter stops it earlier.

Sources

How we write and check

In Veli

Why it won't connect, in Veli

Veli says in plain words why a connection isn't coming up: under the button while it tries, and in Diagnostics afterwards. The line under the button names the reason: the server isn't answering, it refuses the connection, its name can't be found, or there's no network. A countdown shows how long the app keeps trying, and “Cancel” stops it. If it gives up, “What happened” opens the record in the log.

Diagnostics → “Check everything” checks DNS, internet access, the clock and the VPN server. On a computer it also runs “Profiles from this network”: each profile tries its own protocol without touching the computer's network, so you see which ones get through from here (OpenVPN and the profile in use aren't tried). There it also offers fixes: “Sync the clock” for a clock off by a minute or more, “Flush the DNS cache” for failed lookups, “Sign in to the network” for a network that wants a sign-in. If another VPN is on, the app names it.

Veli has no servers of its own: the server comes from your VPN service or is yours, so if it's down or the term is over, the fix is on that side.

FAQ

Why did my VPN suddenly stop connecting?

Something changed: the server went down, the term or traffic ran out, you moved to another network, or another VPN started. Check the internet without the VPN, then another server, then another network.

Why does the VPN connect on one device but not on another?

If the same server works elsewhere on the same network, the trouble is on the failing device: its clock, another VPN or proxy, an antivirus, an old app that doesn't know the protocol, or the subscription's device limit.

Can the wrong time stop a VPN from connecting?

Yes. TLS checks certificate dates, VMess allows 120 seconds of difference by Xray's documentation, and a Reality server can set a limit too. Turn on automatic date and time.

Can an antivirus block a VPN?

Yes: it can quarantine the client's core file or block it with its own firewall. Pause it for a minute to test, then add an exception rather than leaving protection off.

How do I know whether the server is down or my network blocks it?

Try the same server from another network, such as mobile data. If it connects there, your network is in the way; if it fails everywhere, the server or the subscription is.

The reason in words, not a spinner

Veli is a free VPN client for Windows, macOS, Linux and Android. It says why a connection fails, and Diagnostics checks the clock, DNS and the server.