Adguard
Control AdGuard Home DNS filtering via HTTP API. Use when managing blocklists/allowlists, checking domain filtering status, toggling protection, or clearing DNS cache. Supports blocking/allowing domai
Control AdGuard Home DNS filtering via HTTP API. Use when managing blocklists/allowlists, checking domain filtering status, toggling protection, or clearing DNS cache. Supports blocking/allowing domai
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Manage AdGuard Home DNS filtering from the command line via the REST API.
curl installed (usually default on macOS/Linux)# Set password once export ADGUARD_PASSWORD=your_admin_passwordUse commands
./adguard.sh status ./adguard.sh check example.com ./adguard.sh allow broken-site.com ./adguard.sh block malware.ru
Set environment variables for your AdGuard instance:
export ADGUARD_URL="http://192.168.1.100:3000" # Your AdGuard IP and port export ADGUARD_USERNAME="admin" # Usually 'admin' (default) export ADGUARD_PASSWORD="your_admin_password" # REQUIRED
Add to
~/.bashrc or ~/.zshrc for persistence.
Create
~/.adguard/config.json (optional):
{ "url": "http://192.168.1.100:3000", "username": "admin" }
Then set
ADGUARD_PASSWORD separately for security.
<domain>Check if a domain is currently blocked or allowed.
./adguard.sh check doubleclick.net # ✗ doubleclick.net IS BLOCKED # Blocked by: Adblock Plus filter./adguard.sh check example.com
✓ example.com is NOT blocked (allowed)
<domain> | whitelist <domain>Add a domain to the allowlist (whitelist). Creates an exception rule that overrides blocklists.
./adguard.sh allow broken-site.com # ✓ Added rule: @@||broken-site.com^ # Domain: broken-site.com # Action: allow
<domain> | blacklist <domain>Add a domain to the blocklist. Creates a custom blocking rule.
./adguard.sh block spyware-domain.ru # ✓ Added rule: ||spyware-domain.ru^ # Domain: spyware-domain.ru # Action: block
Display DNS filtering statistics and protection state.
./adguard.sh status # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # AdGuard Home Status # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # Protection: ✓ ENABLED # # DNS Queries: 1,234 # Blocked by rules: 156 # Blocked by safe browsing: 23 # Safe search replacements: 5 # Block rate: 14% # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Enable or disable DNS protection. Useful for temporarily disabling filtering.
./adguard.sh toggle # Disabling protection... # ✓ Protection is now false
Clear the DNS cache to apply rule changes immediately.
./adguard.sh cache-clear # Clearing DNS cache... # ✓ Cache cleared
If you don't know your AdGuard URL:
nmap or check "Connected Devices"http://localhost:3000http://adguard-home.local:3000 (depends on network)AdGuard uses a DNS filtering rule syntax:
| Rule | Effect |
|---|---|
| Block example.com and subdomains |
| Allow example.com (exception/whitelist) |
| Block exact domain only |
| Block only ad.example.com |
See API Reference for complete syntax.
adguard.sh allow my-bank.com
adguard.sh block malicious-tracker.xyz
adguard.sh check ads.google.com
adguard.sh status
adguard.sh toggle
Error: Failed to authenticate → Check
ADGUARD_PASSWORD is correct and set
→ Verify ADGUARD_URL points to the right IP and port
Error: API call failed (HTTP 401) → Authentication failed, check credentials
Rules don't take effect → Run
adguard.sh cache-clear to flush DNS cache
→ Wait 5+ minutes for clients to refresh their cache
→ Restart your device's network connection
Can't connect to AdGuard → Verify device is on the same network → Check firewall isn't blocking port 3000 → Ping the device:
ping <ip>
Block multiple domains:
for domain in tracker1.com tracker2.com tracker3.com; do adguard.sh block "$domain" done
Check multiple domains:
for domain in example.com test.org my-site.net; do echo "Checking $domain..." adguard.sh check "$domain" done
See references/api.md for complete AdGuard Home API documentation.
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.