Skip to content

Instantly share code, notes, and snippets.

@ChrisG661
Last active April 13, 2023 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ChrisG661/f2e9121cea57dbfb5ce7c950ed4c33dd to your computer and use it in GitHub Desktop.
Save ChrisG661/f2e9121cea57dbfb5ce7c950ed4c33dd to your computer and use it in GitHub Desktop.
MikroTik Zoom Hosts address list
## Made by ChrisG661, 2021
## github.com/ChrisG661
# Address list name
:local listname "zoom-hosts"
# Zoom IP range URLs
:local sourceUrl {"https://assets.zoom.us/docs/ipranges/Zoom.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomMeetings.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomCRC.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomPhone.txt"}
# Import update script
:local updateList [:parse [/system script get UpdateAddressList source]]
# Remove existing addresses from the current Address list
/ip firewall address-list remove [/ip firewall address-list find list=$listname]
# Download each IP range files
:foreach url in=$sourceUrl do={
/tool fetch mode=https url=$url
:delay 1
}
# Load IP range files to address list
:local filenames {"Zoom.txt"; "ZoomMeetings.txt"; "ZoomCRC.txt"; "ZoomPhone.txt"}
:foreach file in=$filenames do={
$updateList listname="zoom-hosts" filename=$file
:delay 1
}
:log info "Zoom hosts address list updated"
@ChrisG661
Copy link
Author

ChrisG661 commented Mar 26, 2021

Requires MikroTik Address List Updater, make sure that both script is in system scripts and are named correctly. Copy both of the script to system scripts and make sure it is named the same as the file name (ZoomHosts and UpdateAddressList).
Run this to add the script to scheduler:

/system scheduler
add interval=1d name=updateZoomHosts on-event="/system script run ZoomHosts" policy=read,write,policy,test

For usage with simple queue, simply run:

/ip firewall mangle
add action=mark-connection chain=postrouting dst-address-list=zoom-hosts \
    new-connection-mark=zoom-connections passthrough=yes src-address=\
    192.168.1.0/24
add action=mark-packet chain=postrouting connection-mark=zoom-connections \
    new-packet-mark=zoom-packet passthrough=yes

/queue simple
add max-limit=100M/100M name="Zoom Traffic" packet-marks=zoom-packet \
    place-before=0 target=192.168.1.0/24

If used to bypass Zoom traffic, make sure to NOT set max-limit to unlimited as this will not work and packets will move to next queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment