OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
network medium common DISPUTE

Fix a Tailscale exit node or subnet router that forwards nothing behind ufw

omarchyarchendeavouroscachyosmanjarolaptopdesktop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Every command in the fix is source-supported and I checked them against the primary pages and against this machine. https://wiki.archlinux.org/title/Uncomplicated_Firewall documents both remedies verbatim: DEFAULT_FORWARD_POLICY="ACCEPT" in /etc/default/ufw, and the two -A ufw-before-forward -i <if> -j ACCEPT / -o lines placed after # End required lines in /etc/ufw/before.rules, plus "You may also need to uncomment" exactly the three slash-syntax lines net/ipv4/ip_forward=1, net/ipv6/conf/default/forwarding=1, net/ipv6/conf/all/forwarding=1, which are lines 8-10 of /etc/ufw/sysctl.conf on this box, commented, character for character as the record prints them. sudo ufw allow in on tailscale0 is recommended verbatim by the cited tailscale.com/kb/1077. I confirmed --advertise-exit-node, --exit-node, --exit-node-allow-lan-access, --stateful-filtering and --netfilter-mode are all real flags on tailscale set in cmd/tailscale/cli/set.go. /etc/default/ufw here has DEFAULT_FORWARD_POLICY="DROP" and IPT_SYSCTL=/etc/ufw/sysctl.conf, and Omarchy's install/config/firewall.sh does ufw default deny incoming and enables ufw, so the Omarchy framing is right. THREE INACCURACIES, all in the cause and danger text rather than the commands. (1) The cause's headline "trap" overstates: ufw applies /etc/ufw/sysctl.conf with sysctl -e -q -p in ufw_start, so it overrides /etc/sysctl.d only for keys it actually sets, and on Arch all three forwarding lines ship commented out, so ufw does not silently reset an ip_forward=1 you set elsewhere. The real reason the symptom survives is DEFAULT_FORWARD_POLICY=DROP. Leaving the wrong mechanism standing sends a reader hunting a reset that is not happening. (2) The danger note says /etc/ufw/before.rules is package-owned and "a ufw upgrade can replace it and silently drop your rules". pacman -Qii ufw lists /etc/ufw/before.rules in the backup array, so pacman preserves a modified copy and writes a .pacnew instead. The described silent loss does not occur. (3) "ufw reload does not always re-read before.rules" is wrong for current ufw: ufw_reload() in /usr/lib/ufw/ufw-init-functions is a full stop-then-start, which re-reads before.rules and re-applies IPT_SYSCTL. The disable/enable cycle is harmless but should not be sold as necessary. Also, as with the sibling record, the cited github.com/basecamp/omarchy/blob/master/install/config/firewall.sh 404s. That file lives on quattro, not master.

The cause above was rewritten on 2026-09-01 to match this note; the fix was corrected by the audit itself.
RISK

DEFAULT_FORWARD_POLICY="ACCEPT" turns the machine into an open router for *every* interface, not just tailscale0. On a laptop that also runs Docker or a hotspot this is a real exposure. Prefer the two targeted ufw-before-forward lines. Note also that /etc/ufw/before.rules is package-owned: a ufw upgrade can replace it and silently drop your rules, so re-check after updates. Turning on IP forwarding at all changes the machine's role on the network. Do not leave it enabled on a laptop that no longer needs to be an exit node.

Symptom

You advertise the machine as an exit node, approve it in the admin console, select it on your phone, and the phone loses all internet. Tailscale itself stays connected and you can still ping the exit node's 100.x address, but nothing routes through it. A subnet router shows the same shape: the route is approved and visible, but the LAN behind it is unreachable. sysctl net.ipv4.ip_forward prints 1 and it still does not work.

Cause

Two firewall-side causes. First and dominant: ufw's default forward policy is DROP (DEFAULT_FORWARD_POLICY="DROP" in /etc/default/ufw), so packets arriving on tailscale0 destined elsewhere are dropped in the FORWARD chain before any of your allow rules are consulted. Those rules govern INPUT, not FORWARD. That is why sysctl net.ipv4.ip_forward can read 1 and nothing routes. Second: ufw runs sysctl -e -q -p /etc/ufw/sysctl.conf every time it starts or reloads, so for any key that file actually sets, ufw's value wins over /etc/sysctl.d/*. On Arch the three forwarding keys ship commented out, so ufw is not resetting your setting, but /etc/ufw/sysctl.conf is nonetheless the durable place to enable forwarding on a ufw box, because it is applied last and survives every reload. Omarchy enables ufw with default deny incoming out of the box, so both apply.

Fix

Diagnose in this order:


tailscale status
sysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding
grep -E '^#?net' /etc/ufw/sysctl.conf
grep DEFAULT_FORWARD_POLICY /etc/default/ufw
sudo ufw status verbose

**1. Enable forwarding where ufw will not undo it.** Uncomment these in /etc/ufw/sysctl.conf (note the slash-separated syntax that file uses). They ship commented out on Arch, so ufw is not currently resetting anything, but this file is applied on every ufw start and reload, which makes it the durable place for the setting on a ufw box:


# /etc/ufw/sysctl.conf
net/ipv4/ip_forward=1
net/ipv6/conf/default/forwarding=1
net/ipv6/conf/all/forwarding=1

**2. Let forwarded traffic through. This is the step that actually fixes the symptom.** Either globally:


# /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT"

or, better, only for the tunnel: add these inside the *filter block of /etc/ufw/before.rules, after the # End required lines marker:


-A ufw-before-forward -i tailscale0 -j ACCEPT
-A ufw-before-forward -o tailscale0 -j ACCEPT

**3. Allow the tunnel itself in.**


sudo ufw allow in on tailscale0
sudo ufw allow 41641/udp comment 'tailscale direct'

**4. Reload.** sudo ufw reload is sufficient. ufw_reload() performs a full stop and start, so it re-reads before.rules and re-applies /etc/ufw/sysctl.conf. Restart the daemon afterwards so it re-installs its own rules on top:


sudo ufw reload
sudo systemctl restart tailscaled

**5. Re-advertise:**


sudo tailscale set --advertise-exit-node
# on the client:
sudo tailscale set --exit-node=<exit-node-ip> --exit-node-allow-lan-access=true

Do **not** add your own MASQUERADE rule. In its default netfilter mode Tailscale installs its own NAT and filter rules. Adding a competing one produces asymmetric NAT that is harder to debug than the original problem. Only if you are deliberately managing every rule yourself should you take Tailscale out of the loop:


sudo tailscale up --netfilter-mode=off

and then you own the forwarding, MASQUERADE and filter rules entirely.

Also stop NetworkManager fighting over the interface, which produces intermittent tailnet connectivity that looks like a firewall problem:


sudo tee /etc/NetworkManager/conf.d/99-tailscale.conf >/dev/null <<'EOF'
[keyfile]
unmanaged-devices=interface-name:tailscale0
EOF
sudo systemctl restart NetworkManager tailscaled

One note on maintenance: /etc/ufw/before.rules is listed in ufw's pacman backup array, so an upgrade will **not** overwrite your edits. It leaves your file in place and drops a .pacnew beside it. Check for one after a ufw update (find /etc/ufw -name '*.pacnew') so you do not miss upstream changes, but your two forward rules will still be there.

Verify

On the exit node: sysctl net.ipv4.ip_forward prints 1 after a sudo ufw disable && sudo ufw enable cycle, and sudo iptables -L FORWARD -n -v shows the tailscale0 ACCEPT rules with a non-zero packet counter once a client is routing. On the client: tailscale status shows the exit node in use, and a public IP lookup returns the exit node's address rather than yours.

Sources

tailscale-exit-node-no-internet-ufw-forward