You can use a NetworkManager dispatcher script to react to Wi-Fi connection changes and apply host-side rules, but it is not a substitute for securing the Wi-Fi link or configuring Tailscale access correctly. A sound design treats these as three separate layers: protect the local connection, let a carefully constrained script respond to network events, and limit private-service access through authenticated tailnet identities and policies.
What this setup can—and cannot—protect
A tailnet is an overlay network for authenticated users and devices. Tailscale assigns private addresses and lets you configure access policies for services on that network. It relies on underlying physical connectivity; joining a tailnet does not verify that a Wi-Fi access point is trustworthy or protect every kind of traffic on the local network. See Tailscale’s overview of how Tailscale works and access-control documentation.
As an Amazon Associate I earn from qualifying purchases.
- Wi-Fi link security protects the wireless connection between your device and the access point. Choose an appropriate secured network; NetworkManager supports WPA2 and WPA3 security methods. Its wireless security settings reference describes the available options.
- Host-side automation can change local settings in response to network events—for example, applying a local firewall policy when a known connection activates. It does not create a perimeter by itself: the script’s actions and the host’s existing rules determine the result.
- Tailnet access controls govern which authenticated users and devices can reach private tailnet services. Tailnet Lock provides a separate control over node admission; neither policy mechanism makes an arbitrary access point safe. Tailscale explains Tailnet Lock separately from access policies.
“Trust the tailnet, not the network” is therefore a useful rule for deciding where to expose private services: rely on authenticated identities and narrowly scoped tailnet permissions rather than assuming the local Wi-Fi is private. It is not a reason to ignore Wi-Fi security, local-network exposure, or host firewall configuration.
How NetworkManager dispatcher events work
NetworkManager runs dispatcher scripts in response to network changes, including interface activation or deactivation and changes to DHCP or DNS state. The dispatcher passes an event action and connection or interface information that a script can use to decide what to do. The official dispatcher reference lists the event names, arguments, and environment variables.
#1 Best Overall
- OneMesh Compatible Router - Form a seamless WiFi when work with TP-Link OneMesh WiFi Extenders
- Next-Gen Wi-Fi 6 Technology – The Archer AX10 leverages advanced Wi-Fi 6 features like OFDMA and 1024-QAM to deliver improved efficiency across your entire network. Perfect for high-bandwidth activities like streaming, gaming, and smart home connectivity.
- Next-gen Dual Band router - 300 Mbps on 2. 4 GHz (802. 11n) plus 1201 Mbps on 5 GHz (802. 11ax)
- Connect more devices than ever before - Wi-Fi 6 technology simultaneously communicates more data to more devices using OFDMA and MU-MIMO while reducing lag dramatically
- Powerful Dual-Core 900MHz Processor – Handles multiple data streams simultaneously for reliable performance across your devices. Ensures smooth streaming, online gaming, and video conferencing without buffering or lag.
Dispatcher scripts run with root-level consequences, so installation and behavior both matter. The documented requirements include root ownership, executable regular files, no group or other write permission, and no setuid bit. Review the current manual for exact requirements and execution details before deploying a script.
Events are not a perfectly ordered state machine
Queued events can become stale: “Also beware that once a script is queued, it will always be run, even if a later event renders it obsolete.” Scripts normally run serially, while scripts configured not to wait can run in parallel. A script must therefore check the current connection state instead of assuming that the event it received still describes the live network.
Rank #2
- DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
- AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
- CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
- EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
- OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.
Do not rely on a pre-down event for cleanup after every disconnect. The dispatcher manual says forced disconnects—for example, lost carrier or a fading wireless signal—do not emit it. Design recovery so that a missing disconnect event does not leave the machine in an unsafe state.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesDesigning a safer Wi-Fi-triggered policy
There is no universal trusted-SSID test in the dispatcher documentation, nor does it prescribe a standard firewall rule, Tailscale command, or kill switch for this use case. Treat connection matching and any policy changes as your own design, with explicit assumptions about the network and the host’s firewall.
Rank #3
- Next-Gen Gigabit Wi-Fi 6 Speeds: 2402 Mbps on 5 GHz and 574 Mbps on 2.4 GHz bands ensure smoother streaming and faster downloads; support VPN server and VPN client¹
- A More Responsive Experience: Enjoy smooth gaming, video streaming, and live feeds simultaneously. OFDMA makes your Wi-Fi stronger by allowing multiple clients to share one band at the same time, cutting latency and jitter.²
- Expanded Wi-Fi Coverage: 4 high-gain external antennas and Beamforming technology combine to extend strong, reliable, Wi-Fi throughout your home.
- Improved Battery Life: Target Wake Time helps your devices to communicate efficiently while consuming less power.
- Improved Cooling Design: No heat ups, no throttles. A larger heat sink and redefined case design cools the WiFi 6 system and enables your network to stay at top speeds in more versatile environments.
- Choose the policy outcome first. Decide what should be restricted on an untrusted connection: for example, inbound access to local services, or selected outbound traffic. Do not assume that enabling Tailscale alone blocks other traffic.
- Identify connections using more than a display name. Validate the dispatcher action and match the intended connection identity using the connection and interface details supplied by NetworkManager. A human-readable SSID or connection label can be duplicated or spoofed; it is not proof that an access point is genuine.
- Make the operation idempotent. Repeated activation events and delayed events should converge on the same desired policy, not stack duplicate rules or undo a newer decision. Before applying a change, verify that the relevant connection is still active.
- Keep the dispatcher work short. Avoid lengthy blocking operations. The service may kill scripts that run too long; use a bounded action and put complex work in a separately managed service if needed.
- Provide a recovery path independent of a clean disconnect. Decide how the host returns to a safe default after abrupt Wi-Fi loss, daemon restart, script error, or a newer connection event. Test that recovery path rather than assuming a matching down event will run.
If your chosen policy changes firewall rules, document the exact rules and their interaction with existing firewall management. If it changes Tailscale state, treat that as a host-specific implementation choice—not a behavior guaranteed by NetworkManager or a prescribed Tailscale public-Wi-Fi mode. In either case, verify that a failure does not silently leave unwanted local exposure.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Installation and verification checklist
- Read the NetworkManager dispatcher manual for the event and environment details available on your installed version.
- Install the script as a regular executable file owned by root, with no group/other write permissions and no setuid bit, as required by the documentation.
- Validate the event action and connection identity; do not trigger a security-sensitive change merely because any Wi-Fi interface came up.
- Make handling safe for repeats, stale queued events, and parallel execution if using no-wait behavior.
- Test normal connection and disconnection, abrupt loss of Wi-Fi, captive-portal connectivity, rapid transitions between networks, and deliberate script failure.
- Confirm both sides of the policy: what remains reachable over the local network and what authenticated tailnet users or devices can access.
The dispatcher is an event hook, not a complete network-security framework. The reliable design is the one whose host rules have a safe default, whose event handler tolerates races and failure, and whose tailnet policy grants only the private-service access users actually need.
Quick Recap
Best Value
- 𝐆𝐢𝐠𝐚𝐛𝐢𝐭 𝐖𝐢𝐅𝐢 𝐟𝐨𝐫 𝟖𝐊 𝐒𝐭𝐫𝐞𝐚𝐦𝐢𝐧𝐠 – Up to 5400 Mbps WiFi for faster browsing, streaming, gaming and downloading, all at the same time. Performance varies by conditions, distance to devices, & obstacles such as walls.
- 𝐅𝐮𝐥𝐥 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐝 𝐖𝐢𝐅𝐢 𝟔 𝐑𝐨𝐮𝐭𝐞𝐫 – Equipped with 4T4R and HE160 technologies on the 5 GHz band to enable max 4.8 Gbps ultra-fast connections.Power:12 V 2.5 A
- 𝐂𝐨𝐧𝐧𝐞𝐜𝐭 𝐌𝐨𝐫𝐞 𝐃𝐞𝐯𝐢𝐜𝐞𝐬 – Supports MU-MIMO and OFDMA to reduce congestion and 4X the average throughput
- 𝐄𝐱𝐭𝐞𝐧𝐬𝐢𝐯𝐞 𝐂𝐨𝐯𝐞𝐫𝐚𝐠𝐞 - Covers up to 2,000 sq. ft. High-Power FEM, 6× Antennas, Beamforming, and 4T4R structures combine to adapt WiFi coverage to perfectly fit your home and concentrate signal strength towards your devices.
- 𝐌𝐨𝐫𝐞 𝐕𝐞𝐧𝐭𝐬, 𝐋𝐞𝐬𝐬 𝐇𝐞𝐚𝐭 – Improved vented areas help unleash the full power of the router
Rank #4
- NIGHTHAWK WIFI 6 ROUTER FOR YOUR WHOLE HOME: Delivers fast, reliable WiFi across every room of your apartment or small home for streaming, gaming, video calls, and smart home devices, all running at the same time without slowing each other down.
- WORKS WITH YOUR EXISTING INTERNET SERVICE: Pairs with your existing modem or gateway via ethernet. Compatible with most cable, fiber, DSL, and satellite providers. Some gateways and modem router combos may require bridge mode. No coax needed.
- SET UP AND MANAGE YOUR NETWORK WITH THE NIGHTHAWK APP: Download the free Nighthawk app on iOS or Android for guided setup. Manage WiFi, run speed tests, pause devices, and set up guest networks from anywhere. Active internet required.
- READY FOR THE DEVICES YOU ALREADY OWN: Your phones, laptops, and TVs work right out of the box. WiFi 6 delivers speeds up to 1.8 Gbps across 2.4 GHz and 5 GHz bands. Backward compatible with WiFi 5 and earlier.
- COVERAGE IN EVERY ROOM: Covers up to 1,500 sq. ft. for up to 20 connected devices. Walls, floors, and interference can reduce range. Larger or multi-story homes may benefit from a NETGEAR Orbi mesh WiFi system.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

