ASUS Router Operations
Facts verified as of 2026-07.
Authoritative guidance for configuring and hardening ASUS routers — stock Asuswrt and Asuswrt-Merlin firmware — via the web UI and SSH/nvram. Covers security hardening, encrypted DNS, VPN, network segmentation, AiMesh, AiProtection, and JFFS scripting.
Safety first. Changes here can lock you out or drop the network. Test during low-usage windows, document the before value, and know how to undo. Cite official docs, not folklore.
Stock Asuswrt vs Asuswrt-Merlin
|
Stock Asuswrt |
Asuswrt-Merlin |
| Base |
ASUS official |
Community fork of ASUS source (same core, more control) |
| Scripting |
Limited |
JFFS custom scripts, cron, services-start, firewall-start, nat-start |
| DNS control |
Basic |
DNS Director (per-client/global DNS redirection, DoT) |
| VPN |
OpenVPN/WireGuard server+client |
+ VPN Director (policy/split-tunnel routing) |
| Best for |
Most users |
Power users wanting scripts, fine-grained DNS/VPN routing |
Never mix stock and Merlin nodes in the same AiMesh network. Keep the firmware family consistent across mesh nodes.
Security hardening checklist
Do these on every new router, in order:
- Change defaults immediately — both the admin/login password and the WiFi password.
- Disable WPS — it's a brute-force surface.
- Disable UPnP unless an app genuinely needs it (it creates unpredictable port forwards).
- Use explicit port forwarding, never DMZ — DMZ exposes the entire device.
- Disable remote WAN admin access — use a VPN to manage remotely instead.
- Enable AiProtection (two-way IPS + malicious-site blocking) where available.
- Set up a guest network with intranet access disabled (proper isolation).
- Enable firewall logging for security monitoring; forward to syslog if you have a collector.
- Apply ingress filtering (BCP38/84 anti-spoofing) where supported.
- Keep firmware current — security fixes land in point releases.
See references/hardening-and-network.md for the full hardening rationale, VLAN/IoT
segmentation, AiMesh backhaul tuning, QoS, and dual-WAN.
DNS privacy stack
| Layer |
What |
Notes |
| Transport |
DoT (DNS over TLS) or DoH (DNS over HTTPS) |
Stops plaintext port-53 hijacking. Merlin DNS Director can enforce DoT |
| Provider |
Cloudflare (1.1.1.1), NextDNS, ControlD, AdGuard |
Choose for filtering/analytics needs |
| Validation |
DNSSEC |
Validates record authenticity |
| Per-client policy |
DNS Director (Merlin) |
Different DNS per device/profile; split-horizon |
| Rebinding protection |
On by default |
Can break local services (Plex, smart home) — whitelist specific domains rather than disabling wholesale |
Avoid plain DNS (port 53) — unencrypted and hijackable. Move to DoT/DoH.
VPN decision table
| Need |
Use |
| Fast modern tunnel, low overhead |
WireGuard server/client (preferred where supported) |
| Maximum compatibility / legacy clients |
OpenVPN server/client |
| Route only some clients/traffic through VPN |
VPN Director (Merlin) — policy-based split tunnel |
| Remote admin of the router |
VPN in, then manage on LAN (never expose WAN admin) |
Common clients: NordVPN, Surfshark, Mullvad via OpenVPN/WireGuard config import.
Network segmentation
| Goal |
Approach |
| Visitor isolation |
Guest network with "Access Intranet" off |
| IoT containment |
Dedicated guest/VLAN SSID; block lateral movement to main LAN |
| Consistent guest across mesh |
Enable guest on AiMesh deliberately; mind "Access Intranet" per node |
| Smart-home discovery |
mDNS/Bonjour may need controlled cross-VLAN allowances — scope narrowly |
| Segmented routing |
VLAN segmentation + routing policies (capability varies by model) |
Patterns to avoid
| Anti-pattern |
Why |
Instead |
| DMZ mode |
Exposes the whole device to the internet |
Explicit per-port forwarding |
| UPnP globally on |
Unpredictable auto port forwards |
Enable only when required, understand the risk |
| Plain DNS (port 53) |
Plaintext, hijackable |
DoT/DoH |
| Mixing stock + Merlin in AiMesh |
Inconsistent behavior |
Keep firmware family uniform |
| Disabling DNS rebind protection wholesale |
Reopens rebinding attacks |
Whitelist the specific local domains that break |
| Wireless mesh backhaul on congested channels |
Throughput collapse |
Wired backhaul or dedicated DFS 5GHz channel |
| Default admin/WiFi credentials |
Trivial compromise |
Change both immediately |
| Remote WAN admin enabled |
Major attack surface |
Manage via VPN |
Operating principles
- Reversibility — record the current value before changing; know the undo path.
- Testability — change during low-usage windows; verify before walking away.
- Trade-offs — note privacy-vs-functionality costs (rebind protection vs local services).
- Verification — confirm via system log, client-side test (e.g. DNS leak test), or
nvram get.
- Cite official docs — avoid unverified tweaks.
SSH / JFFS scripting (Merlin)
Merlin runs user scripts from JFFS at lifecycle points. Enable JFFS custom scripts and
configs (Administration → System) first.
| Script |
Runs at |
Use for |
services-start |
After services start |
Start custom daemons |
firewall-start |
After firewall (re)builds |
Add custom iptables rules (survives firewall restarts) |
nat-start |
After NAT rules load |
Custom NAT/port rules |
dnsmasq.postconf |
Before dnsmasq starts |
Inject dnsmasq config |
Inspect/set persistent config with nvram get <key> / nvram set <key>=<val> + nvram commit
(commit sparingly — it writes flash).
The assets/firewall-start.sh template shows the canonical safe shape for custom firewall
rules. See references/hardening-and-network.md for placement and gotchas.
Assets
| File |
Use |
assets/firewall-start.sh |
Annotated Merlin /jffs/scripts/firewall-start template — idempotent custom iptables rules with safe-by-default examples |
See also
net-ops — general networking: subnets, DNS, TLS, firewalls, packet inspection
Key external resources
1---2name: asus-router-ops3description: ASUS router config and hardening: Asuswrt-Merlin, security hardening, encrypted DNS (DoT/DoH), VPN (WireGuard/OpenVPN), guest networks, VLAN/IoT isolation, AiMesh, AiProtection. Triggers on: asus router, asuswrt, merlin, wireguard router, AiProtection, AiMesh, nvram, jffs, IoT isolation.4license: MIT5---67# ASUS Router Operations89> Facts verified as of 2026-07.1011Authoritative guidance for configuring and hardening ASUS routers — stock **Asuswrt** and **Asuswrt-Merlin** firmware — via the web UI and SSH/nvram. Covers security hardening, encrypted DNS, VPN, network segmentation, AiMesh, AiProtection, and JFFS scripting.1213> **Safety first.** Changes here can lock you out or drop the network. Test during low-usage windows, document the before value, and know how to undo. Cite official docs, not folklore.1415---1617## Stock Asuswrt vs Asuswrt-Merlin1819| | Stock Asuswrt | Asuswrt-Merlin |20|---|---|---|21| Base | ASUS official | Community fork of ASUS source (same core, more control) |22| Scripting | Limited | **JFFS custom scripts**, cron, `services-start`, `firewall-start`, nat-start |23| DNS control | Basic | **DNS Director** (per-client/global DNS redirection, DoT) |24| VPN | OpenVPN/WireGuard server+client | + **VPN Director** (policy/split-tunnel routing) |25| Best for | Most users | Power users wanting scripts, fine-grained DNS/VPN routing |2627**Never mix stock and Merlin nodes in the same AiMesh network.** Keep the firmware family consistent across mesh nodes.2829---3031## Security hardening checklist3233Do these on every new router, in order:34351. **Change defaults immediately** — both the admin/login password *and* the WiFi password.362. **Disable WPS** — it's a brute-force surface.373. **Disable UPnP** unless an app genuinely needs it (it creates unpredictable port forwards).384. **Use explicit port forwarding, never DMZ** — DMZ exposes the entire device.395. **Disable remote WAN admin access** — use a VPN to manage remotely instead.406. **Enable AiProtection** (two-way IPS + malicious-site blocking) where available.417. **Set up a guest network** with intranet access disabled (proper isolation).428. **Enable firewall logging** for security monitoring; forward to syslog if you have a collector.439. **Apply ingress filtering** (BCP38/84 anti-spoofing) where supported.4410. **Keep firmware current** — security fixes land in point releases.4546See `references/hardening-and-network.md` for the full hardening rationale, VLAN/IoT47segmentation, AiMesh backhaul tuning, QoS, and dual-WAN.4849---5051## DNS privacy stack5253| Layer | What | Notes |54|-------|------|-------|55| **Transport** | DoT (DNS over TLS) or DoH (DNS over HTTPS) | Stops plaintext port-53 hijacking. Merlin DNS Director can enforce DoT |56| **Provider** | Cloudflare (1.1.1.1), NextDNS, ControlD, AdGuard | Choose for filtering/analytics needs |57| **Validation** | DNSSEC | Validates record authenticity |58| **Per-client policy** | DNS Director (Merlin) | Different DNS per device/profile; split-horizon |59| **Rebinding protection** | On by default | **Can break local services** (Plex, smart home) — whitelist specific domains rather than disabling wholesale |6061**Avoid plain DNS (port 53)** — unencrypted and hijackable. Move to DoT/DoH.6263---6465## VPN decision table6667| Need | Use |68|------|-----|69| Fast modern tunnel, low overhead | **WireGuard** server/client (preferred where supported) |70| Maximum compatibility / legacy clients | **OpenVPN** server/client |71| Route only *some* clients/traffic through VPN | **VPN Director** (Merlin) — policy-based split tunnel |72| Remote admin of the router | VPN in, then manage on LAN (never expose WAN admin) |7374Common clients: NordVPN, Surfshark, Mullvad via OpenVPN/WireGuard config import.7576---7778## Network segmentation7980| Goal | Approach |81|------|----------|82| Visitor isolation | Guest network with "Access Intranet" **off** |83| IoT containment | Dedicated guest/VLAN SSID; block lateral movement to main LAN |84| Consistent guest across mesh | Enable guest on AiMesh deliberately; mind "Access Intranet" per node |85| Smart-home discovery | mDNS/Bonjour may need controlled cross-VLAN allowances — scope narrowly |86| Segmented routing | VLAN segmentation + routing policies (capability varies by model) |8788---8990## Patterns to avoid9192| Anti-pattern | Why | Instead |93|--------------|-----|---------|94| DMZ mode | Exposes the whole device to the internet | Explicit per-port forwarding |95| UPnP globally on | Unpredictable auto port forwards | Enable only when required, understand the risk |96| Plain DNS (port 53) | Plaintext, hijackable | DoT/DoH |97| Mixing stock + Merlin in AiMesh | Inconsistent behavior | Keep firmware family uniform |98| Disabling DNS rebind protection wholesale | Reopens rebinding attacks | Whitelist the specific local domains that break |99| Wireless mesh backhaul on congested channels | Throughput collapse | Wired backhaul or dedicated DFS 5GHz channel |100| Default admin/WiFi credentials | Trivial compromise | Change both immediately |101| Remote WAN admin enabled | Major attack surface | Manage via VPN |102103---104105## Operating principles1061071. **Reversibility** — record the current value before changing; know the undo path.1082. **Testability** — change during low-usage windows; verify before walking away.1093. **Trade-offs** — note privacy-vs-functionality costs (rebind protection vs local services).1104. **Verification** — confirm via system log, client-side test (e.g. DNS leak test), or `nvram get`.1115. **Cite official docs** — avoid unverified tweaks.112113---114115## SSH / JFFS scripting (Merlin)116117Merlin runs user scripts from JFFS at lifecycle points. Enable **JFFS custom scripts and118configs** (Administration → System) first.119120| Script | Runs at | Use for |121|--------|---------|---------|122| `services-start` | After services start | Start custom daemons |123| `firewall-start` | After firewall (re)builds | Add custom iptables rules (survives firewall restarts) |124| `nat-start` | After NAT rules load | Custom NAT/port rules |125| `dnsmasq.postconf` | Before dnsmasq starts | Inject dnsmasq config |126127Inspect/set persistent config with `nvram get <key>` / `nvram set <key>=<val>` + `nvram commit`128(commit sparingly — it writes flash).129130The `assets/firewall-start.sh` template shows the canonical safe shape for custom firewall131rules. See `references/hardening-and-network.md` for placement and gotchas.132133---134135## Assets136137| File | Use |138|------|-----|139| `assets/firewall-start.sh` | Annotated Merlin `/jffs/scripts/firewall-start` template — idempotent custom iptables rules with safe-by-default examples |140141---142143## See also144145- `net-ops` — general networking: subnets, DNS, TLS, firewalls, packet inspection146147### Key external resources148149- [Asuswrt-Merlin project](https://www.asuswrt-merlin.net/) · [docs](https://www.asuswrt-merlin.net/docs) · [wiki](https://github.com/RMerl/asuswrt-merlin.ng/wiki)150- [Merlin features (DNS Director, VPN Director)](https://www.asuswrt-merlin.net/features)151- [ASUS router security hardening FAQ](https://www.asus.com/support/faq/1039292/)152- [ASUS firewall intro](https://www.asus.com/us/support/faq/1013630/) · [Network Services Filter](https://www.asus.com/support/faq/1013636/) · [IPv6 firewall](https://www.asus.com/support/faq/1013638/)153- [AiProtection overview](https://www.asus.com/au/content/aiprotection/) · [setup](https://www.asus.com/support/faq/1008719/)154- [Cloudflare DoH](https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/) · [ControlD ASUS setup](https://docs.controld.com/docs/asus-router-setup)155- [SNBForums community](https://www.snbforums.com/)