کد:
:foreach i in=[/ip dns cache all find where (name~"youtube" || name~"wikia.com" || name~"twitter" || name~"facebook" || name~"fbcdn" || name~"fandom.com" || name~"giphy" || name~"4chan" || name="t.co" || name~"googlevideo.com" ) && (type="A") && (static=no) ] do={
:local tmpAddress [/ip dns cache get $i address];
:local cacheName [/ip dns cache get $i name] ;
:delay delay-time=20ms
:if ( ( [:len $tmpAddress] != 0) && ( [:len $cacheName] != 0) && !($cacheName~"instagram") ) do={
:if ( [/ip firewall address-list find where list="VPN" address=$tmpAddress] = "") do={
:log info ("added entry To VPN: \"$cacheName\" \"$tmpAddress\"");
:do {
/ip firewall address-list add address=$tmpAddress list="VPN" timeout="60d00:00:00" comment=$cacheName;
} on-error={}
}
}
}