Skip to content

A firewall is a gatekeeper. It decides which network traffic may leave or enter a device or a network, and it does so by rules about applications, ports, protocols and destinations. That is exactly why it can be the reason a VPN will not connect: the VPN app needs to send a particular kind of traffic out, and somewhere along the way a rule says no. The difficulty is that a firewall rarely announces itself. You get a timeout or "cannot connect" with no mention of the cause.

This article is a diagnosis guide. It shows how to recognise the pattern that points to a firewall, how to work out which of three firewalls is involved (your device, your router, or someone else's network), how to test without lowering your protection, and what to do in each case. It is deliberately about reviewing rules you own. If the block belongs to a school, employer or venue, the right answer is to ask the owner or use another connection, not to fight their policy. For a general overview of how firewalls and VPNs differ, see VPN vs firewall, and for the general fixes when a VPN will not start, see VPN not connecting.

The pattern that points to a firewall

Firewalls leave a typical fingerprint. Compare what you see with this table.

What you observe What it suggests
Ordinary websites load, but the VPN times out Something filters VPN traffic specifically
VPN works on mobile data, fails on one Wi-Fi network The Wi-Fi network or its router has a rule
VPN fails on every network, only on one device The device firewall or a security suite on it
VPN worked yesterday, fails today, and a security update ran A new default rule, or the app lost its allow entry
Authentication failed message Not a firewall: the server answered you
Connected, but sites will not load Not a firewall at the entry point; see DNS and routing

A firewall that blocks VPN usually makes the connection attempt time out, because the packets are silently dropped and nobody replies. A firewall that actively rejects may show an instant failure. Neither produces a login error, so if the app says your credentials were refused, the firewall is not the problem: the server answered, and you should check your login details on My Pass instead. Check the exact wording first, since the whole diagnosis depends on it.

Time is another clue. A failure after about thirty seconds to a minute means traffic went out and nothing came back. An instant failure within a second or two suggests the device refused to send it, which points to the device's own rules.

Three places a firewall can live

The most useful step is working out which firewall you are dealing with, because the action is different for each.

1. The firewall on your device

Every mainstream operating system has a built-in firewall, and many people also run a security suite with its own. On Windows there is Windows Defender Firewall. On macOS there is an application firewall and the system packet filter. On Linux there are tools such as the kernel firewall and front ends for it. Phones have fewer user-facing firewall settings, but security apps and filtering apps act like them.

Signs it is the device: the same VPN fails on every network you try, other devices on the same Wi-Fi connect fine, and the problem began after installing a security product or changing a firewall setting.

2. The firewall on your router

Home routers filter traffic too, and some include parental controls, "security shields" or application blocking. Most do not block VPN traffic by default, but a rule set long ago, or a stricter mode switched on in an update, can.

Signs it is the router: every device on that Wi-Fi has the same trouble, the VPN works on mobile data and at a friend's house, and your router has a security or filtering feature you recall switching on.

3. The network you are visiting

Schools, offices, hotels, airports and some public hotspots run firewalls that decide what guests may do. The reasons are usually mundane: capacity, security policy or compliance. Such a network may allow web browsing and limit other traffic.

Signs it is the network: the VPN works at home and fails at one location, other guests report the same, and a notice or terms page mentions what is allowed.

Safe tests, in order

Run these tests from least to most invasive. Each answers one question.

Test 1: change the network. Connect the same device to mobile data and try the VPN. If it works, the difference lies in the Wi-Fi network (the router or the network policy), not the device. If it fails everywhere, the device or the app is more likely. This single test settles the question for most people.

Test 2: change the device. Try a second device on the same Wi-Fi. If the second device connects, the first device has the problem. If neither connects, the network or router is involved.

Test 3: ask the app about its permission. On a computer, check whether the operating system showed an allow prompt when the VPN app first ran, and whether you dismissed it. On Windows, the prompt asks whether to let the app communicate on private and public networks. If it was declined, the app has no allow rule. Review it in the firewall's allowed-apps list.

Test 4: pause one thing, briefly. If you are on your own home network and need to know whether the device's firewall or a security suite is responsible, switch off one component for a minute, try the VPN, and switch it back on straight away. Test only on a trusted network, and test only one component at a time. A better method, where possible, is to leave protection on and add an allow rule, because that tests the same thing without exposure.

Test 5: read the log. Most firewalls keep a log of blocked connections. On Windows you can enable logging of dropped packets in the advanced firewall settings. Security suites show blocked events in their history. Look for entries timed at your last attempt. A log entry that names the VPN app or its destination is the strongest proof you can get.

What to change on your own device

Once you know the device is the cause, make the smallest change that solves it.

  1. Allow the VPN app through the firewall. In the built-in firewall's allowed-apps list, make sure the VPN app is permitted. Choose the network types you actually use. On Windows, see the notes in Windows VPN firewall, which cover private and public profiles.
  2. Add an exception in the security suite. Look in the suite's web protection, network protection or firewall section for a list of trusted applications. Add the VPN app. Only do this for software that came from the official download.
  3. Check outbound rules. Some setups block outgoing traffic by default and allow only listed apps. A VPN client is then blocked until you list it.
  4. Look for rules created by other software. Remote-access tools, virtual machines and older VPN clients sometimes add firewall rules that remain after you remove them. Review the list for entries you do not recognise, but do not delete rules whose purpose you cannot identify. Note them and ask.
  5. Do not leave protection off. If you had to switch something off to test, switch it back on and apply a proper allow entry instead.

The NIST guide to IPsec VPNs and the Microsoft instructions for connecting to a VPN in Windows both explain the traffic that VPN clients commonly need to send, and they are good references if you manage rules yourself. We do not state which methods your own VPN uses; the app's defaults are the right starting point.

What to change on your router

If Test 1 and Test 2 point to the router, work through these.

  1. Restart the router. Unplug for thirty seconds. This clears a stuck state and often fixes odd blocking.
  2. Find the security or parental feature. Names vary: "security shield", "web protection", "application filtering", "intrusion prevention", "family controls". Turn each off in turn for a test, one at a time.
  3. Look at outbound rules. Some routers let you define which ports and protocols may leave. A strict list can block VPN traffic.
  4. Check for a guest network profile. If you are using a guest Wi-Fi with limited access, move to the main network or ask the owner whether VPN traffic is allowed on the guest one.
  5. Update the firmware. Updates fix bugs in filtering code. Back up settings first.
  6. Note what you changed. Write down the original value of anything you adjust so you can undo it.

If the router is supplied and managed by your internet provider, you may not have access to these settings. Contact the provider rather than trying to work around it.

When the network belongs to someone else

This is the case where the right answer is most often not technical. A firewall on a school, office, hotel or public network is an expression of policy. Treat it as such.

  • Check the rules. Look for the terms of use or an acceptable-use page. Some networks say plainly whether VPN is allowed.
  • Ask. Contact the network administrator or reception. Explain that you need a VPN for work or for protecting your own traffic and ask whether and how it is permitted. Administrators often have a standard answer, and some provide a dedicated network for it.
  • Use another connection. Your own mobile data or your own hotspot is usually a legitimate alternative. See connecting to a VPN on public Wi-Fi for sensible habits when you can connect, and using a VPN on hotel Wi-Fi for that specific setting.
  • Do not try to defeat the policy. Working around an employer's or school's restrictions can break their rules or your agreement with them, with consequences for your account or job. This article does not give methods for that, and you should not look for them.

A worked example

Mia works from home on a laptop. One morning the VPN will not connect. The app times out after about forty seconds.

  • Test 1. She connects the laptop to her phone's hotspot. The VPN connects at once. So the laptop and the app can work, and the difference is the home Wi-Fi.
  • Test 2. Her partner's laptop also fails on the home Wi-Fi. That points at the router, not her device.
  • Router check. In the router's settings she finds a recently updated "Network Protection" feature set to the strictest level. She notes the current setting, lowers it to the standard level and reconnects. The VPN works.
  • Follow-up. She keeps the new setting, writes down the old one, and checks again after the next router update.

Notice that Mia never switched off her laptop's firewall and never touched the app. The tests narrowed the problem to one place, and the fix was one setting.

Common mistakes

  • Switching the firewall off for the whole day instead of a one-minute test.
  • Testing only on the home network and concluding the app is broken.
  • Adding an allow rule for software that did not come from the official source.
  • Deleting firewall rules you do not understand.
  • Assuming a login error is a firewall problem.
  • Trying to defeat a school, employer or hotel policy rather than asking or using another connection.
  • Forgetting a guest network profile that has stricter rules than the main one.

Summary

A firewall that blocks a VPN usually shows up as a timeout on some networks and not others. Decide where it lives: your device, your router or someone else's network. Compare the same device on two networks, and two devices on one network. Then change the smallest thing: an allow rule on the device, a filtering feature on the router, or a conversation with the network owner. Never leave your protection switched off, and never try to defeat a policy that is not yours.

If you want a pass to test on a second connection, you can see the options on the pricing page.

Frequently asked questions

How can I tell if a firewall is blocking my VPN?

The usual pattern is that ordinary websites load, but the VPN times out or fails to start, and the same device connects fine on a different network such as mobile data. If it fails on every network, look at the device itself, its security software or the app.

Is it safe to turn my firewall off to test?

Only briefly and only on a network you trust, such as your own home. Turn it back on straight away. A better test is to leave the firewall on and add an allow rule for the VPN app, or to test on a different network.

Where can a firewall that blocks a VPN be?

On your device (the built-in firewall or a security suite), on your router, or on the network you are connected to, such as a school, office, hotel or public hotspot. Each needs a different action.

What should I do if the network owner blocks VPN traffic?

Respect it. Use another connection you are allowed to use, such as your own mobile data, or ask the network administrator whether and how VPN use is permitted. Do not try to defeat a policy set by someone else.

Does a firewall rule have to be for the VPN app by name?

Not always. Some rules are by application, some by port or protocol, and some by destination. A rule for the app is the easiest to review, but the cause may also be a broader rule about outgoing traffic.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

VPN Basics

VPN vs Firewall: What Is the Difference?

A firewall decides which connections are allowed. A VPN protects the route connections take. This guide follows real traffic through both and shows where each one sits.

9 min read

Device Guides

Windows Firewall and VPN: Safe Configuration Tips

How to keep Windows Defender Firewall switched on and still let your VPN work: profiles, prompts, narrow rules, sharing settings and a safe troubleshooting routine.

10 min read

VPN Security

VPN vs Antivirus vs Firewall: Do You Need All Three?

A VPN, antivirus software and a firewall solve three different problems. Here is what each one does, what it cannot do, and how they fit together.

9 min read

Troubleshooting

VPN Not Connecting? Step-by-Step Fixes

A clear order of checks for when the VPN will not connect: pass status, login details, Wi-Fi and mobile data, permissions, firewalls, app conflicts and error messages.

8 min read

Device Guides

How to Connect to a VPN on Public Wi-Fi

Join a public network, get past the login page, and switch your VPN on in the right order. Includes fixes for captive portals that stop the VPN from connecting.

5 min read