WireGuard through NetworkManager has no kill switch, so a dropped tunnel leaks the real IP
The record's central claim is wrong and its suspend framing is unsourced, so the cause, symptom, fix, verify and danger are rewritten. Checked add_default() in src/wg-quick/linux.bash at tag v1.0.20250521: the firewall rules wg-quick installs are a raw-table PREROUTING drop of packets arriving on a non-tunnel interface addressed to the tunnel's own IP, plus CONNMARK save and restore for the UDP handshake. That is an inbound anti-spoofing rule, not the egress drop the record describes, so wg-quick has the same gap NetworkManager has. wg-quick(8) at the same tag says so: the kill switch is an optional PostUp iptables REJECT the user adds, and the man page notes DHCP survives it only through packet sockets. The routing half held: the NetworkManager settings page and the installed nm-settings-nmcli(5) say ip4-auto-default-route corresponds to Table=auto and is on by default with a /0 allowed-ips. The suspend trigger did not hold: do_sleep_wake() in src/core/nm-manager.c at 1.58.0 skips software devices when suspending and only renews their dynamic IP on wake, so the WireGuard interface and its policy routes survive sleep. The Arch wiki sentence the record leaned on is inside the systemd-networkd troubleshooting section and is about the systemd 253 ManageForeignRoutingPolicyRules change, and Omarchy does not run networkd. The peer-stops-answering trigger was also unsourced, and with the policy routes in place traffic keeps entering the tunnel interface rather than the ordinary route. Gate 1 now passes on positive evidence rather than silence: NetworkManager issues 1503 (2024-03-26, IP leak when switching WireGuard profiles) and 1515 (2024-04-07, open feature request for a kill switch), both third party and both still open, plus the wg-quick manual documenting the kill switch as opt-in. The 1.58.0 NEWS file lists no kill switch. Confirmed on this workstation, omarchy 4.0.2-1 on 2026-09-18: networkmanager 1.58.1-1 enabled and active, systemd-networkd disabled and inactive, ufw 0.36.2-7 enabled and active with DEFAULT_OUTPUT_POLICY=ACCEPT and IPV6=yes, wireguard-tools absent, the wireguard module present under /usr/lib/modules/7.1.9-arch1-2, no NM GUI package installed, and no file under /usr/share/omarchy mentions wireguard, so the symptom's reference to a settings panel was wrong for Omarchy. nm-device-wireguard.c changes the link over nm_platform_link_wireguard_change with no spawn of wg, and resolves hostname endpoints with GResolver, which is why the fix now requires an IP endpoint. The fix's own claims were wrong in three places: an inbound ssh session does not die, because before.rules accept RELATED,ESTABLISHED output, while mirrors and NTP do not need rules because they route through the tunnel, and what actually breaks is LAN and multicast traffic, including Avahi's queries on a distro that ships Avahi. The connectivity probe finding comes from nm-connectivity.c setting CURLOPT_INTERFACE to if!<iface>. nmcli -f wireguard.peers and -g wireguard.peers were accepted by nmcli on the loopback profile, which is read-only. Severity lowered from high to medium: no credential, privilege boundary or code path is exposed, the tool is one the user installs and configures, and the exposure is the machine's real IP and traffic path while the profile is inactive, which is the brief's hardening-control-off case. Not exercised: no tunnel was brought up, no ufw rule was added, the machine was not suspended, and whether NetworkManager's built-in DHCP client renews through a UDP socket that the deny would catch was not checked, which is why the DHCP allow rule is included as a precaution. The title is unchanged because the schema has no corrected_title, and it remains accurate for a deactivated profile.
ufw default deny outgoing applies to the whole machine, not only the tunnel. Add the allow rules first, in the order above, or every new outgoing connection stops at once. An ssh session already open into the machine survives, because ufw's shipped before.rules accept RELATED,ESTABLISHED output, but nothing new leaves. Package mirrors, NTP and DNS keep working while the tunnel is up because they are routed through it. What stops is everything that goes outside the tunnel on purpose: the local printer, NAS and other LAN devices, LocalSend, KDE Connect, and Avahi's own multicast queries, so .local names and printer discovery stop working on Omarchy while the block is on. Each one you want back needs its own scoped ufw allow out rule, and each is traffic that leaves outside the tunnel on whatever network you are on. A profile whose endpoint is a hostname cannot come up once the default is deny, because the name has to be resolved through the tunnel that is not established, and the failure looks like a profile that never activates rather than a firewall block. NetworkManager's connectivity probe of http://ping.archlinux.org/nm-check.txt is bound to the Wi-Fi or Ethernet device, so the block stops it too and nmcli networking connectivity may report limited. That is the probe failing, not the tunnel. To use the machine without the tunnel, run sudo ufw default allow outgoing, and remember the protection is off until you set deny again. The wrong fix is to leave outgoing open and trust the routing: it holds while the profile is active and offers nothing when it is not, which is the state this record is about.
Symptom
A privacy guide or VPN provider says WireGuard has no kill switch, or a full tunnel WireGuard connection added through NetworkManager was off for a moment (it failed to activate at boot or on a new Wi-Fi network, was switched off to change to another profile, or was taken down with nmcli connection down) and during that time traffic left over the ordinary connection carrying the machine's real IP address instead of stopping. Nothing on a stock Omarchy install sets up a tunnel: wireguard-tools is not installed, Omarchy ships no NetworkManager GUI, and none of its own scripts mention WireGuard. Nothing needs installing to add one, though. The Arch kernel ships the wireguard module and NetworkManager configures it directly, so this applies as soon as a profile exists, for example after nmcli connection import type wireguard file <name>.conf. NetworkManager is the only network manager Omarchy runs, and systemd-networkd is disabled.
Cause
WireGuard is a network interface, and neither the protocol, wg-quick nor NetworkManager ships a kill switch, meaning a firewall rule that blocks ordinary traffic whenever the tunnel is not carrying it. wg-quick(8) is explicit that the kill switch is something the user adds: it describes it as an optional PostUp line, iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT, that works together with the fwmark. The only firewall rules wg-quick installs on its own, in add_default() of src/wg-quick/linux.bash, drop inbound packets that arrive on another interface addressed to the tunnel's own IP and connmark the tunnel's UDP handshake traffic. Neither is an egress block. A NetworkManager WireGuard profile has no PostUp at all, so not even the optional rule can travel with the profile.
What NetworkManager does provide is the routing half. wireguard.ip4-auto-default-route and wireguard.ip6-auto-default-route, on by default whenever a peer's allowed-ips carries a /0 route, put the tunnel's default route in a dedicated table with two policy rules, which the settings documentation says corresponds to what wg-quick does with Table=auto. While the profile is active that routing keeps sending traffic into the tunnel interface even when the tunnel cannot deliver it, so a peer that stops answering or a Wi-Fi handoff does not by itself put packets on the ordinary route. Suspend does not undo it on NetworkManager either: do_sleep_wake() in src/core/nm-manager.c skips software devices when the system suspends, with a comment that it does not want to destroy them for an external event such as a system suspend, so the WireGuard interface and its routes survive sleep. The Arch wiki's warning that resuming from suspend can expose the public IP unless a kill switch is configured is about systemd-networkd after the systemd 253 change to ManageForeignRoutingPolicyRules, and Omarchy does not run systemd-networkd.
The leak window on NetworkManager is whenever the profile is not active: before it activates at boot or on a fresh network, after it fails to activate or is deactivated, and the gap while switching from one profile to another. Both halves are reported upstream. NetworkManager issue 1503 describes the real IP appearing while switching between two WireGuard profiles, and issue 1515 is an open feature request for a kill switch that blocks until the VPN is up and again the moment it goes down. Neither has been implemented as of NetworkManager 1.58.1, and the NEWS file for 1.58 lists no such change.
Fix
There is no NetworkManager setting that adds this protection, and a NetworkManager profile cannot carry the PostUp rule that wg-quick(8) documents. Build the block with ufw, which Omarchy ships enabled with default allow outgoing. Three kinds of traffic have to stay allowed: the tunnel interface itself, the encrypted handshake to the peer's endpoint, which leaves through the ordinary interface, and DHCP to the local router. Read the interface name and the endpoint from the profile first:
nmcli connection show --active | grep wireguard
nmcli -g wireguard.peers connection show <connection-name>
The peer line carries endpoint=<ip>:<port>. If it carries a hostname rather than an IP address, re-import the profile from a config whose Endpoint = line uses the address before going further, because once outgoing traffic is denied the name can only be resolved through the tunnel that is not up yet. Then add the allow rules before switching the default, in this order:
sudo ufw allow out on <tunnel-interface> comment 'wireguard tunnel'
sudo ufw allow out proto udp to <endpoint-ip> port <endpoint-port> comment 'wireguard handshake'
sudo ufw allow out proto udp to any port 67 comment 'dhcp'
sudo ufw default deny outgoing
ufw default takes effect at once while ufw is active and is written to /etc/default/ufw, so it holds across reboots. That is what makes this a kill switch rather than a rule that only exists while the tunnel is up: at boot, on a new network and after a failed activation, nothing leaves until the profile is active again. IPV6=yes in /etc/default/ufw means the deny covers IPv6 too, so traffic with no route into the tunnel is blocked rather than sent in clear. The DHCP rule is there because ufw's shipped before.rules accept DHCP replies in and allow nothing out, and wg-quick(8) notes that DHCP survives its own rule only because most clients use packet sockets that bypass Netfilter.
To use the machine without the tunnel, switch the default back and leave the allow rules in place:
sudo ufw default allow outgoing
Verify
sudo ufw status verbose shows Default: deny (outgoing) plus an ALLOW OUT line for the tunnel interface, one for the endpoint address and port, and one for 67/udp. nmcli -g wireguard.peers connection show <connection-name> shows the endpoint as an IP address rather than a hostname. ip link show lists the WireGuard device under the same name the rule uses, since a name that does not match leaves the rule matching nothing. The check is that the rules exist, not that traffic is dropped, so nothing here needs the tunnel taken down.
Sources
- https://wiki.archlinux.org/title/WireGuard
- https://networkmanager.dev/docs/api/latest/settings-wireguard.html
- https://git.zx2c4.com/wireguard-tools/tree/src/man/wg-quick.8?h=v1.0.20250521
- https://git.zx2c4.com/wireguard-tools/tree/src/wg-quick/linux.bash?h=v1.0.20250521
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1515
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1503
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.58.0/src/core/nm-manager.c
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.58.0/NEWS
- https://git.launchpad.net/ufw/plain/conf/before.rules