kuchkovsky
Regular Contributor
I've been building a small collection of scripts for my own Asuswrt-Merlin setup - mostly to fill in missing features and automate things I found lacking in the stock firmware.
Recently I decided to properly document everything and open-source it - maybe it'll be useful for someone else too:
github.com
Here's what's included:
Recently I decided to properly document everything and open-source it - maybe it'll be useful for someone else too:
GitHub - kuchkovsky/asuswrt-merlin-scripts
Contribute to kuchkovsky/asuswrt-merlin-scripts development by creating an account on GitHub.
Here's what's included:
- IPSet-based WAN Firewall - IPv4 & IPv6 inbound protection for publicly exposed ports (bogons, malware, country blocking using GeoLite2/IPdeny, DoS throttling, optional killswitch). Uses FireHOL Level 1 for IPv4 and Team Cymru fullbogons + Spamhaus DROPv6 for IPv6 by default. You can add custom blocklists.
- IPSet-based Tunnel Director - outbound policy routing that directs traffic from selected LAN devices or subnets through WireGuard/OpenVPN, based on destination countries or custom ipsets. Perfect for anti-censorship use cases: you can force all traffic to or from entire countries or custom ipsets through a censorship-resistant VPN, or invert the logic - send everything through the VPN except selected countries.
- WireGuard Client Port Forwarder - lets you forward ports through your WireGuard client tunnel (wgcX), with easy support for multiple ports and ranges.
- Dual WAN handler - email alerts when your primary WAN drops/returns, with optional blocking of specific hosts from using the secondary WAN. You can also find an extended version of this script here that automatically toggles the Quectel's RM520N-GL 5G modem's radio based on the primary WAN state.
- SSD TRIM support - scripts to enable full TRIM/UNMAP for USB SSDs on ASUS routers.
- IPv6 SLAAC and RA support for SDN networks - enables full IPv6 stateless autoconfiguration (SLAAC) for SDNs and automatically assigns proper /64 subnets from the prefix delegated by your ISP. It fixes a firmware limitation where only DHCPv6 is supported and SDNs are forced to use /72 prefixes with no support for SLAAC functionality.
- nextdns-cli SDN integration & automatic updates - extends NextDNS to all SDNs and keeps the nextdns-cli binary up-to-date.
- Static IPv6 routes to LAN hosts - lets you delegate whole prefixes (e.g., /64) to LAN devices such as Docker hosts or downstream routers.
- Traffic Monitor patch - shows speeds in Kb/s & Mb/s instead of KB/s & MB/s.
- Router startup notifications - email alert 60 seconds after boot (useful as a power outage signal).
- Shared utilities - extended helper library (logging, idempotent iptables helpers, WAN blocking, hashing, locking, temp files/dirs, etc.), available for your own scripts too.
Last edited:
