Code: Select all
###### Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~"amazonaws") && (type="A") && (data!="240.0.0.1")] do={
:local tmpAddress [/ip dns cache get $i address];
delay delay-time=3000ms
# prevent script from using all cpu time #
:if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={
:local cacheName [/ip dns cache get $i name] ;
:log info ("added entry: $cacheName $tmpAddress");
/ip firewall address-list add address=$tmpAddress list=amazonaws-hosts; } }
#
###### Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~".bbcollab.com") && (type="A") && (data!="240.0.0.1")] do={
:local tmpAddress [/ip dns cache get $i address];
delay delay-time=3000ms
# prevent script from using all cpu time #
:if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={
:local cacheName [/ip dns cache get $i name] ;
:log info ("added entry: $cacheName $tmpAddress");
/ip firewall address-list add address=$tmpAddress list=blackboard-hosts; } }
#
###### Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~".bbcollabcloud.com") && (type="A") && (data!="240.0.0.1")] do={
:local tmpAddress [/ip dns cache get $i address];
delay delay-time=3000ms
# prevent script from using all cpu time #
:if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={
:local cacheName [/ip dns cache get $i name] ;
:log info ("added entry: $cacheName $tmpAddress");
/ip firewall address-list add address=$tmpAddress list=blackboard-hosts; } }
#
###### Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~".bbcollab.cloud") && (type="A") && (data!="240.0.0.1")] do={
:local tmpAddress [/ip dns cache get $i address];
delay delay-time=3000ms
# prevent script from using all cpu time #
:if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={
:local cacheName [/ip dns cache get $i name] ;
:log info ("added entry: $cacheName $tmpAddress");
/ip firewall address-list add address=$tmpAddress list=blackboard-hosts; } }
#
###### Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~"whatsapp") && (type="A") && (data!="240.0.0.1")] do={
:local tmpAddress [/ip dns cache get $i address];
delay delay-time=3000ms
# prevent script from using all cpu time #
:if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={
:local cacheName [/ip dns cache get $i name] ;
:log info ("added entry: $cacheName $tmpAddress");
/ip firewall address-list add address=$tmpAddress list=whatsapp-hosts; } }