Collection of MikroTik RouterOS automation scripts for ISP and network engineers.
Zill E Ali — MTCNA Certified Network Engineer & ISP Specialist
- 🌐 Website: zilleali.com
- 💼 LinkedIn: linkedin.com/in/zilleali12
- 🛒 Fiverr: fiverr.com/zillealibutt
- 📧 Email: info@zilleali.com
Currently managing FTTH and B2B/B2C ISP infrastructure at FiberX Digital,
serving 1,250+ clients across 28 sites with 99.99% uptime.
Mikrotik-Scripts/
├── firewall/
│ ├── basic-firewall-rules.rsc
│ ├── ddos-protection.rsc
│ └── port-scanner-block.rsc
├── pppoe/
│ ├── pppoe-server-setup.rsc
│ └── pppoe-client-monitor.rsc
├── hotspot/
│ ├── hotspot-setup.rsc
│ └── user-manager-config.rsc
├── bandwidth/
│ ├── pcq-queue-setup.rsc
│ └── simple-queue-isp.rsc
├── monitoring/
│ ├── snmp-setup.rsc
│ └── email-alerts.rsc
├── vpn/
│ ├── wireguard-setup.rsc
│ └── l2tp-server.rsc
└── utils/
├── backup-script.rsc
└── ip-blacklist.rsc
| Script | Description |
|---|---|
basic-firewall-rules.rsc |
Essential firewall rules for MikroTik routers |
ddos-protection.rsc |
DDoS protection using address lists |
port-scanner-block.rsc |
Block port scanners automatically |
| Script | Description |
|---|---|
pppoe-server-setup.rsc |
Complete PPPoE server configuration for ISPs |
pppoe-client-monitor.rsc |
Monitor and auto-reconnect PPPoE clients |
| Script | Description |
|---|---|
hotspot-setup.rsc |
Full hotspot setup with login page |
user-manager-config.rsc |
User Manager with data limits and speed profiles |
| Script | Description |
|---|---|
pcq-queue-setup.rsc |
PCQ queuing for fair bandwidth distribution |
simple-queue-isp.rsc |
Simple queue setup for ISP clients |
| Script | Description |
|---|---|
snmp-setup.rsc |
SNMP configuration for LibreNMS/Zabbix |
email-alerts.rsc |
Email notifications for link down/up events |
| Script | Description |
|---|---|
wireguard-setup.rsc |
WireGuard VPN server setup |
l2tp-server.rsc |
L2TP/IPSec VPN server configuration |
| Script | Description |
|---|---|
backup-script.rsc |
Automated backup with email delivery |
ip-blacklist.rsc |
Dynamic IP blacklist management |
Method 1 — Winbox Terminal:
# Open Winbox → New Terminal
# Copy and paste script contentMethod 2 — SSH:
ssh admin@192.168.1.1
# Paste script in terminalMethod 3 — Import file:
# Upload .rsc file to MikroTik Files
/import file=script-name.rsc- MikroTik RouterOS v6.x or v7.x
- Admin access to router
- Basic RouterOS knowledge
- Always test scripts in a lab environment before applying to production
- Take a backup before applying any script:
/system backup save - Some scripts may need modification based on your network topology
Contributions are welcome! Feel free to:
- Submit issues for bugs or improvements
- Fork and create pull requests
- Star ⭐ the repo if you find it useful
MIT License — see LICENSE for details.
💬 Need help with MikroTik? Hire me on Fiverr or contact me