Skip to content

Can nftables Rules Block VPN Traffic Without an Obvious Error?

A silent drop in nftables looks like a VPN that is simply broken. Here is how to read the ruleset, trace one packet and find the rule that is responsible.

11 min readUpdated Nov 11, 2026By XPASS Editorial Team

Can nftables Rules Block VPN Traffic Without an Obvious Error?

You bring a VPN up on a Linux computer and everything looks fine. The tunnel interface exists, the client says it is connected, and yet pages will not load, or the connection never completes at all. There is no red error, no message in any history, nothing to search for. That is exactly how a firewall drop behaves, and on a modern Linux system the firewall engine is very often nftables.

So, to answer the title directly: yes, nftables rules can block VPN traffic without any obvious error. This article explains why that happens, which kinds of rules are the usual cause, and a calm step-by-step way to find the one that is responsible. It is generic Linux guidance. If you are still installing the VPNclient app, start with the Linux setup guide first and come back here only if the connection is blocked.

Why a firewall drop looks like silence

A firewall can refuse a packet in two ways. A reject sends an answer back, such as "connection refused", so the program fails immediately and can tell you why. A drop says nothing: the packet is simply discarded. The sender waits, retries, and eventually gives up with a timeout.

VPN clients are especially bad at reporting this, because the packet that gets dropped is usually the very first one they send. A client that cannot reach its server has no reply to describe. It can only say "connecting" until a timer runs out. From your seat it feels like the server is down, your password is wrong or the app is broken, when in fact your own machine threw the packet away before it left the network card.

Three more things make the silence worse.

  • Rules are quiet by default. A rule only writes to the kernel log if someone added a log statement. Most rule sets do not.
  • There is no single place to look. nftables can have several tables, each with several chains, and more than one tool can add them.
  • A different layer may be responsible. The same symptom can come from routing, DNS or packet size, so the firewall is sometimes innocent. The checks below help you separate those cases.

The places an nftables rule can catch VPN traffic

To understand where a rule can bite, it helps to know the three paths a packet can take through the Linux firewall. Each path is a hook in the kernel.

Hook Which packets pass through it Typical VPN symptom when it drops them
output Packets created on this computer, such as the client's first message to the VPN server The client stays on "connecting" and never gets a reply
input Packets arriving for this computer, such as the server's replies The client sends but never hears back; a trace shows the reply arriving and vanishing
forward Packets passing through this computer to somewhere else Sharing the VPN with other devices, or containers and virtual machines, fails while the host itself works

A VPN adds a twist: traffic exists twice. The outer, encrypted packets travel on your real interface such as wlan0 or eth0. The inner, plain packets travel on the tunnel interface such as wg0 or tun0. A rule can allow one and block the other, and the tunnel only works when both are permitted.

Rule patterns that commonly cause trouble

You do not need to read every line of a large ruleset. Certain patterns appear again and again.

A default policy of drop on output

Some hardened setups set the output chain to policy drop and then list what is allowed. That is a legitimate design, and it is also how a kill switch is built (see how to configure a Linux VPN kill switch). If the allow list does not include the VPN server's address and port on the real interface, the tunnel can never start. The connection is not slow, it is simply never permitted.

A rule tied to an interface name

Rules such as oifname "eth0" accept or iifname "wlan0" drop depend on interface names. Laptops move between Wi-Fi, a docking station and a phone connected by cable, so the name can change. After a change, the allow rule no longer matches and the default policy applies. Tunnel interfaces also differ between clients and can be numbered, for example tun0 one day and tun1 the next.

A rule that only allows established connections

A very common rule reads ct state established,related accept, followed by a drop for everything new. It works well for ordinary browsing. For a VPN it means that the first packet of the tunnel, which is new, must be allowed by a separate rule. If that separate rule is missing or matches the wrong port, the tunnel fails even though "everything normal" still works.

Port and protocol mismatches

Firewall rules name a protocol and a port, for example UDP 51820. If your VPN uses another port, or the same port over a different transport, a rule written for the old port does nothing for the new one. This is a good reason to check which connection method your client is using before you edit anything. Setup instructions and the supported connection methods for a pass are shown on the My Pass page.

Forward chain rules for shared connections

If you share the VPN through a hotspot, a container or a virtual machine, the packets are forwarded rather than local. A forward chain with policy drop stops them even if the host itself is connected. A related problem is network address translation: forwarding works only if the masquerade rule also exists.

Packet size and fragmentation rules

Some rule sets drop ICMP, the small control messages that tell a sender to use smaller packets. Without them, large packets inside a tunnel can vanish in a way that looks random: small pages load, large ones hang. That is a path MTU problem, described in RFC 1191, and it is not a firewall bug, but a firewall can cause it.

Check from the outside in

Before reading rules, collect three quick facts. Doing this first stops you from editing a firewall that was never the problem.

  1. Is the VPN interface up and does it have an address? Run ip addr and look for the tunnel interface.
  2. Is there a route through it? Run ip route and ip route get 1.1.1.1. If the answer does not mention the tunnel, the issue is routing; see Linux VPN routing.
  3. Does it fail only with the VPN? Test a normal website without the VPN. If that also fails, the problem is the network, not the tunnel.

If the interface is up, the route looks right, and the failure is still silent, move to the ruleset.

Read the ruleset safely

Reading rules changes nothing, so it is safe to do on any machine. You may need administrator rights.

  1. List everything the kernel currently enforces with sudo nft list ruleset. On a busy system pipe it to a pager, for example sudo nft list ruleset | less.
  2. Add -a to show handle numbers (sudo nft -a list ruleset). Handles let you refer to a single rule later.
  3. Scan for the words drop, reject and policy drop. Note the table and chain each one lives in.
  4. Look at the hook line at the top of each chain, such as type filter hook output priority 0; policy drop;. This tells you which direction the chain controls.
  5. Note the priority number. Chains on the same hook run in priority order, lowest first. A permissive chain at one priority never cancels a strict chain at another, because every chain on the hook gets its turn.

Do not be surprised if the ruleset is long. Tools such as ufw, firewalld, container engines and VPN scripts can each add their own tables. If you see tables you did not write, that is normal, and it is part of the reason the problem is hard to spot. Their own status commands, for example sudo ufw status verbose or sudo firewall-cmd --list-all, show the intent behind the generated rules.

Prove which rule is dropping the packet

Reading tells you which rules could be responsible. Measuring tells you which one actually is. There are two practical techniques.

Counters

A counter simply counts how many packets matched a rule. Add counter to a suspect rule, or look at existing counters if the rule already has one. Then:

  1. Note the counter values.
  2. Repeat the failing action, such as starting the VPN connection.
  3. List the ruleset again.

If the counter on a drop rule moved while the VPN was trying to connect, you have found your cause. If no drop counter moves, the firewall is probably not the problem.

Trace a packet

For a precise answer, nftables can trace the path of selected packets. In outline, you create a table with a chain that sets a trace flag on packets of interest, for example those to the VPN server's address, then run sudo nft monitor trace in a second terminal while you retry. The output lists each chain and rule the packet visited and the final verdict. Look for the line that ends with verdict drop; the lines just above it name the rule.

Remove the temporary trace chain afterwards. Because it sits at a very early priority, leaving it in place adds noise and some processing cost.

Log, then read

If you prefer a log, add a rule just before the suspect drop that records matching packets with a short prefix such as log prefix "vpn-test ". Retry and read recent kernel messages with journalctl -k. This is slower than a trace, but it works well when you want to capture an intermittent problem.

Fix it with the smallest change

When you know the rule, resist the urge to turn the firewall off. A narrow allow rule restores the VPN without removing protection.

  • If the output chain drops the connection to the server, allow the VPN server's address and port on the real interface before the drop. Check your connection details on My Pass rather than guessing.
  • If the tunnel interface is dropped, allow traffic in and out of that interface name.
  • If replies are dropped, make sure your established,related rule exists on the input side as well.
  • If a forward chain stops shared traffic, allow forwarding between the tunnel interface and the interface you are sharing, and confirm the masquerade rule.
  • If ICMP is the issue, allow the "fragmentation needed" and related messages rather than every ICMP type.

Order matters. A new allow rule placed after a matching drop never runs, so insert it above the drop by handle (nft insert rule ... position HANDLE) or in the right place in your configuration file. Edit the file that loads your rules at boot, usually /etc/nftables.conf or the file your distribution's tool manages, so the fix survives a restart. Changes made only at the command line disappear on reboot.

If a tool such as ufw or firewalld owns the ruleset, change the rule through that tool. Editing the generated tables directly is likely to be overwritten the next time the tool reloads.

A plain example

Mia runs a Linux laptop with a strict home-made firewall. After a distribution upgrade, her VPN stays on "connecting" with no error. Her ip addr shows no tunnel yet, which is normal before connection.

She lists the ruleset and finds an output chain with policy drop and a single allow line for oifname "wlan0". She is now at her desk with a network cable, so the interface is called enp3s0. She adds a counter to the final drop, retries the VPN and watches the counter climb. That is her proof. She changes the allow rule to match both interface names, reloads the file, and the client connects at the first attempt.

Nothing was wrong with the VPN. The firewall was written for a name the laptop no longer used.

Limits and what to watch for

  • A VPN does not repair a blocked path. If your own firewall drops the traffic, no setting inside the app can overrule it. The fix is in the rules.
  • Do not remove protection you rely on. A permissive firewall is a different risk. Change one rule at a time and keep a copy of the original file.
  • Remote machines need a safety net. If you reach the computer over SSH, a wrong rule can cut you off. Use a console or a timed command that restores the old rules after a few minutes.
  • The firewall is not always the cause. The same silent failure can come from the router, the network you are on, DNS, MTU or routing. If the counters stay still, move on. The article on firewalls that block a VPN covers the network side.
  • Rule syntax varies by distribution and version. The commands above are general. Check your distribution's documentation before running anything that changes rules.
  • No guarantee of results. Allowing the traffic removes one obstacle. It does not promise a fast or private connection, and it cannot make a VPN work on a network that blocks it.

Summary

nftables can block VPN traffic without an obvious error because a drop makes no sound, rules are quiet unless you add logging, and several tools may be writing rules on your behalf. Work from the outside in: confirm the interface and route, read the ruleset with handles, prove the culprit with a counter or a trace, and then allow only what the tunnel needs. Keep changes small, persistent and reversible.

If you would like a pass to test the connection on your own Linux computer, you can look at the XPASS pricing options or visit the Help Center for setup guidance.

Frequently asked questions

Can nftables block VPN traffic without showing an error?

Yes. A rule that ends in drop discards the packet and sends nothing back, so the application only sees a timeout. Unless you added a log rule or a counter, nothing is written to a log and no message appears on screen.

How do I find which nftables rule is dropping my VPN packets?

List the ruleset with its handles, add counters to the suspect rules, repeat the failing action and see which counter increases. For a precise answer, turn on nftrace for one packet type and watch the path with nft monitor trace.

Does an accept in one table override a drop in another?

No. Each base chain attached to the same hook is evaluated separately, and a drop in any of them ends the packet. An accept only finishes that one chain, so a permissive table does not cancel a strict one.

I use ufw or firewalld. Do I still need to look at nftables?

Often yes. On many current distributions those tools write nftables rules underneath. Check their own status first, then read the generated ruleset to see what is really active.

Can I just flush the ruleset to test?

On a remote machine that is risky, because you can lock yourself out or remove protection you want. Prefer adding a temporary allow rule or a counter, and use a timed rollback if you must change the active policy.

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

Device Guides

How to Configure a Linux VPN Kill Switch

On Linux a kill switch is a firewall rule, not a button. Three ways to build one, what traffic must still be allowed, and a safe test routine.

10 min read

Troubleshooting

Firewall Blocking VPN: How to Diagnose It

How to work out whether a firewall is the reason your VPN fails: telling a device firewall from a router or network policy, testing safely, and what to do in each case.

9 min read

Device Guides

Linux VPN Routing Tables Explained

A VPN on Linux is mostly a set of routing decisions. Learn to read ip route, understand the half-default trick and policy tables, and diagnose why traffic goes the wrong way.

9 min read