Useful scripts for use as an edge RouterOS device
-
In the RouterOS WebGUI (doing this via CLI will make you want to do unspeakable things to people), System > Scripts > Add New
-
Follow the configuration requirements for each script below
Depends on Mikrotik JSON Parser *(if repo is unavailable, please open an issue and I'll provide the script)
- Install python-cloudflare
$ sudo apt install python-pip && sudo pip install cloudflare
-
Edit the cloudflare-api.py to enter your domain you want to find the IDs for, your email, and global API key
-
Run the cloudflare-api.py to get your zone IDs and record IDs
-
Edit the RouterOS script according to your domains and specifications
$ python cloudflare-api.py
RouterOS Config Requirements:
Don't Require Permissions: UNCHECKED
Policy: Read, Write, Test
- Edit the RouterOS according to the interface the device is on and the MAC Address of the NIC
RouterOS Config Requirements:
Don't Require Permissions: UNCHECKED
Policy: Read, Test