This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:foreach i in=[/ip dns cache find name~"(youtube-ui.l.google.com|youtube.com|googlevideo.com)\$" && $type ~ "^(A|CNAME)\$" ] do={ | |
:local tmpAddress [/ip dns cache get $i data]; | |
:local cacheName [/ip dns cache get $i name] ; | |
delay delay-time=10ms | |
:if ( [/ip firewall address-list find where address=$tmpAddress list=YOUTUBE_DOMAINS ] = "") do={ | |
:log info ("added entry: $cacheName $tmpAddress"); | |
/ip firewall address-list add address=$tmpAddress list=YOUTUBE_DOMAINS comment=$cacheName; | |
} | |
} |
OlderNewer