Skip to content
Contents
GuidesOpenWrt

Pause an OpenWrt subnet with a button and preserve the reset function

First, read the key mapping and logs for the device to confirm the presence of a dedicated WPS or user key.

First, read the key mapping and logs for the device to confirm the presence of a dedicated WPS or user key. Retain the original reset and failure recovery capabilities. Design a key operation that can be triggered repeatedly with clear state indication, for example, disabling forwarding for a protected subnet.

Test short press and long press in experimental environment

Receive press, release, and duration events from button scripts in OpenWrt, using locks to prevent concurrent execution of multiple actions. Switching affects only the specified network, consistent with VPN disconnection policies; wired management remains always accessible. Use LED indicators or logs to show entry and exit states.

Run the WireGuard stop and start actions a button script would call and verify blocking and recovery. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Check the terminal output
Run the WireGuard stop and start actions a button script would call and verify blocking and recovery. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Run the WireGuard stop and start actions a button script would call and verify blocking and recovery. · OpenWrt 25.12.6 x86/64 (QEMU/KVM). Open the original image

Confirm protected scope and reset entry via local switch

First, on a backup machine, check the event corresponding to the button press, and ensure wired management and recovery methods are available. Press briefly to trigger a test, then inspect the protected network and regular network separately. After reboot, verify the current status again.

Press the button under normal VPN conditions, when the peer disconnects, and during boot-up to re-establish the client request confirmation for the outbound path. After removing the newly added script, test that the original button handling functions correctly.

The button action only modifies the predefined network policies. If the action affects device reset or cannot be reversed, first remove the test script before restoring the original button behavior.

Reference

Related guides

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments