panic
The panic command activates an emergency lockdown that immediately blocks all domains and hides dangerous commands.
Overview
Section titled “Overview”Panic mode is designed for crisis moments when you need absolute protection against impulsive access. It:
- Immediately blocks all configured domains
- Hides commands like
unblock,allow,disallow - Cannot be disabled until the timer expires
- Minimum duration of 15 minutes
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
panic DURATION | Activate panic mode |
panic status | Check panic mode status |
panic extend MINUTES | Extend panic duration |
panic DURATION
Section titled “panic DURATION”Activate panic mode for the specified duration.
nextdns-blocker panic DURATIONDuration Formats
Section titled “Duration Formats”| Format | Example | Description |
|---|---|---|
| Minutes | 60 | 60 minutes |
| Minutes | 30m | 30 minutes |
| Hours | 2h | 2 hours |
| Days | 1d | 1 day |
Examples
Section titled “Examples”# Activate for 1 hournextdns-blocker panic 60
# Activate for 30 minutesnextdns-blocker panic 30m
# Activate for 4 hoursnextdns-blocker panic 4h
# Activate for 1 daynextdns-blocker panic 1dOutput
Section titled “Output”⚠️ PANIC MODE ACTIVATED
Duration: 60 minutesExpires at: 2024-01-15 15:30:00
All domains are now blocked.The following commands are disabled: - unblock - allow - disallow
Subcommands also restricted: - config edit - pending cancel - watchdog disable
Panic mode cannot be cancelled.Wait for expiration or use 'panic extend' to add more time.Minimum Duration
Section titled “Minimum Duration”Panic mode requires a minimum of 15 minutes to be effective:
nextdns-blocker panic 10Output:
Error: Minimum panic duration is 15 minutespanic status
Section titled “panic status”Check the current panic mode status.
nextdns-blocker panic statusOutput (Active)
Section titled “Output (Active)”Panic Mode Status━━━━━━━━━━━━━━━━━
Status: ACTIVE
Activated: 2024-01-15 14:30:00Expires: 2024-01-15 15:30:00Remaining: 45 minutes
Hidden commands: - unblock - allow - disallow
Hidden subcommands: - config edit - pending cancel - watchdog disableOutput (Inactive)
Section titled “Output (Inactive)”Panic Mode Status━━━━━━━━━━━━━━━━━
Status: Inactive
Use 'panic DURATION' to activateExample: nextdns-blocker panic 60panic extend
Section titled “panic extend”Extend the current panic mode duration.
nextdns-blocker panic extend MINUTESExample
Section titled “Example”# Add 30 more minutesnextdns-blocker panic extend 30Output
Section titled “Output”Panic mode extended by 30 minutesNew expiration: 2024-01-15 16:00:00Remaining: 75 minutesRequirements
Section titled “Requirements”- Panic mode must be active
- Extension adds to remaining time
What Happens During Panic Mode
Section titled “What Happens During Panic Mode”All Domains Blocked
Section titled “All Domains Blocked”Every domain in your blocklist is immediately added to the NextDNS denylist, regardless of schedule:
Before panic: reddit.com: AVAILABLE (within schedule) twitter.com: BLOCKED youtube.com: AVAILABLE (within schedule)
After panic: reddit.com: BLOCKED (panic override) twitter.com: BLOCKED youtube.com: BLOCKED (panic override)Commands Hidden
Section titled “Commands Hidden”These commands are completely hidden from help and tab completion:
| Command | Why Hidden |
|---|---|
unblock | Would bypass panic |
allow | Would add allowlist entries that bypass blocks |
disallow | Hidden for consistency |
Subcommands Hidden
Section titled “Subcommands Hidden”These subcommands are also hidden during panic mode:
| Subcommand | Why Hidden |
|---|---|
config edit | Would allow modifying schedules |
pending cancel | Would allow cancelling pending actions |
watchdog disable | Would stop automatic sync |
Attempting to run them directly:
nextdns-blocker unblock reddit.comOutput:
Error: Command 'unblock' is not available during panic modePanic mode expires at: 2024-01-15 15:30:00Sync Behavior
Section titled “Sync Behavior”During panic mode, sync:
- Blocks all domains regardless of schedule
- Skips unblock processing
- Skips allowlist sync (prevents bypasses)
- Processes pending action cancellation (cleanup only)
Pending Actions
Section titled “Pending Actions”Pending unblock actions are paused during panic mode:
- Their timers continue
- But execution is skipped
- They resume processing after panic expires
Why Panic Mode?
Section titled “Why Panic Mode?”Panic mode is based on behavioral psychology research:
- Crisis Moments: During moments of weakness, you need absolute protection
- No Loopholes: Hidden commands prevent “just this once” thinking
- Time-Based: You know it will end, reducing desperation
- Extendable: If needed, you can add more time
Recommended Use Cases
Section titled “Recommended Use Cases”| Situation | Recommended Duration |
|---|---|
| Feeling tempted | 30-60 minutes |
| After a slip | 2-4 hours |
| Bad day | 4-8 hours |
| Weekend protection | 24-48 hours |
| Recovery period | Multiple days |
Panic Mode vs Other Features
Section titled “Panic Mode vs Other Features”| Feature | Purpose | Can Disable |
|---|---|---|
| Panic mode | Crisis protection | No |
| Schedule | Regular access | Via config |
| Allowlist | Permanent exceptions | Yes |
State Storage
Section titled “State Storage”Panic state is stored in:
- macOS/Linux:
~/.local/share/nextdns-blocker/.panic - Windows:
%LOCALAPPDATA%\nextdns-blocker\.panic
The file contains an ISO 8601 timestamp of expiration.
Troubleshooting
Section titled “Troubleshooting”Cannot activate panic mode
Section titled “Cannot activate panic mode”Check for existing panic:
nextdns-blocker panic statusPanic mode not blocking
Section titled “Panic mode not blocking”Force a sync:
nextdns-blocker config pushCheck watchdog is running:
nextdns-blocker watchdog statusNeed to end panic early
Section titled “Need to end panic early”This is intentionally not possible. Panic mode’s effectiveness comes from its inescapability.
Options:
- Wait for expiration
- In extreme emergencies, delete the
.panicfile (not recommended)
Domains still accessible
Section titled “Domains still accessible”They might be:
- Cached in your browser (clear cache)
- Cached in your OS DNS (flush DNS)
- Not going through NextDNS (check DNS settings)
# macOS: Flush DNSsudo dscacheutil -flushcache
# Linuxsudo systemctl restart systemd-resolved
# Windowsipconfig /flushdns