Scripts
From MikroTik Wiki
Contents
Setup
- A script to set up WAN/LAN/WLAN to get you started
- How to Make an Automated Configuration and Uninstall
General
- A Bit of Sounds
- Automated Billing Script
- Automated Usage Script without usermanager
- Backup graphing data
- Calculate with decimal numbers
- Calea perl trafr
- Converting network and gateway from routing table to hexadecimal string
- Dynamic DNS on private DNS server (Router OS, Bind, Apache, and Shell script)
- Dynamic DNS Update Script for ChangeIP.com
- Dynamic DNS Update Script for ChangeIP behind NAT
- Dynamic DNS Update Script for DNSoMatic.com
- Dynamic DNS Update Script for DNSoMatic.com behind NAT
- Dynamic DNS Update Script for dynDNS
- Dynamic DNS Update Script for dynDNS behind NAT
- Dynamic DNS Update Script for EveryDNS
- Dynamic DNS Update Script for Hurricane Electric DNS
- Dynamic DNS Update Script for Namecheap
- Dynamic DNS Update Script for No-IP DNS
- Email setup/troubleshooting
- Get active VPN connections via e-mail (PPTP and L2TP)
- GPS text file converter to Google Earth/Maps
- Hurricane Electric IPv6 Tunnel - IPv4 Endpoint updater
- IP Pool Statistics
- Log Parser - Event Trigger Script
- Queue tree and e-mailing stats
- Remove BUSY status DHCP Leases to solve malfunction of DHCP server
- Routing via a DHCP allocated gateway (when this address could change and is not a default route)
- Scheduled disconnect for WAN-Interface e.g. DSL
- Scheduled check for loaded interfaces (auto adding queue to some IP or interface)
- Script to create directory
- Script to find the day of the week
- Script to monitor unexpected script failure
- Sending text out over a serial port
- Sending your self an e-mail with DSL interface IP address
- Set global and local variables
- Setting static DNS record for each DHCP lease
- Super Mario Theme
- Traffic Prioritization Script
- Update static DNS entries every 10mins. (Specifically in cases where the upstream ISP "loadbalance" between SMTP servers by using a low TTL on their SMTP DNS)
- UPnP Multi-WAN
- Use Functions in CMD Script
- Use host names in firewall rules
- Use Mikrotik as Fail2ban firewall
- Useful Bash Scripts
- Using 'find' command to filter a command output
- Using scripting to overcome the inability to specify number ranges on the command line
- Wake on Lan before connection to Remote Desktop
Hotspot
- Add a data limit to trial hotspot users
- Enable/Disable new guest user account daily
- Expire users a after number of days
- PayPal with hotspot and walled garden bypass
- Reset Hotspot user count
Modifying Router Settings 'on the fly'
- Blocking Rapidshare.com web page
- Enable and Disable P2P connections
- Enable Disable Firewall Rules
- Generate bogons firewall chain based on routing-marks
- Limiting a user to a given amount of traffic (using firewall)
- Limiting a user to a given amount of traffic II (using queues)
- Limiting a user to a given amount of traffic with user levels (using queues)
- Limit Different Bandwidth In Day and Night
- Random MAC/Ethernet address generate and apply
- Using Fetch and Scripting to add IP Address Lists
Resilience/Monitoring
- Monitoring Script
- ECMP Failover Script
- Improved Netwatch
- Improved Netwatch II
- Failover con Netwatch III
- Failover via Netwatch III (English)
- Force Disconnect Wireless Stations with Low CCQ
- Monitor logs, send email alert / run script
- PPP Keepalive ping
- Send email about reboot
- Easy Failover using only a script
- Secure L2TP server for IPSec clients only
System Maintenance
- BackupROS (Centralized Backups) - by Nahuel Ramos (new!)
- Centralized Automated Backups via Email with Procmail and Perl
- Automatic Backup with Centralized Storage
- Antenna Alignment with RB532 LED
- Audible signal test
- Logging SNR and thruput values
- Logging Average CCQ and Wireless Clients Stats
- Generate routes for stress testing BGP functionality
- Improved Semi-automatic system-update script
- Scheduled sending of an email with system backup attached
- Flash Friendly Backup Script
- Semi-automatic system-update by script
- Use SSH to execute commands (DSA key login)
- Auto upgrade script V3.x
- sending mails when on battery or battery low
- Delete ARP trafic for arp table
- Add Static DHCP Leases to ARP List
- Batch deployment of DSA key (SSH) and schedule backup with export
- Automated Upgrade/Downgrade script V3.9+
- Improved auto upgrade script v3.X
- Remotely change password for managers
- Monitor input voltage on RB333/433AH
- Reboot Boards due to low Memory with notification
- Yet Another Alignment Script With LEDs And Sound
- Alignment Script that "reads back" RSSI with beeps
- Netwatch on web
- Sync Address List with DNS Cache
- Sync Address List from DNS Lookup Results - CNAME and A Records
- SXT 5HnD Alignment Script
- Semi-Automating CPE ROS/Firmware/script updates and setting changes
- Managing Power Distribution Unit via SMS
Reporting
See also
- Theory of Scripting
- Scripting Examples