AKZN Notes

Archives for My Lazy and Forgetful Mind

Mikrotik Auto Update Nice

Make a scheduler to run this script below

#google 

:if ([:len [/file find name=google_ip.rsc]] > 0) do={ 
    /file remove google_ip.rsc 
};

/tool fetch "https://raw.githubusercontent.com/im-sm/Mikrotik-IP-List/main/GOOGLE/mikrotik_terminal.rsc" dst-path=/google_ip.rsc mode=https;

/ip firewall address-list remove [find list=GOOGLE]

/import google_ip.rsc;

/ip firewall address-list remove [find comment=GOOGLE_im_sm]

/ip firewall address-list set [find list=GOOGLE] list=IP_LB_LIST comment=GOOGLE_im_sm

#facebook agregate

:if ([:len [/file find name=facebook_ip.rsc]] > 0) do={ 
    /file remove facebook_ip.rsc 
};

/tool fetch "https://raw.githubusercontent.com/im-sm/Mikrotik-IP-List/main/FACEBOOK/AGGREGATE/mikrotik_terminal.rsc" dst-path=/facebook_ip.rsc mode=https;

/ip firewall address-list remove [find list=FACEBOOK]

/import facebook_ip.rsc;

/ip firewall address-list remove [find comment=FACEBOOK_im_sm]

/ip firewall address-list set [find list=FACEBOOK] list=IP_LB_LIST comment=FACEBOOK_im_sm

#CLOUDFLARE

:if ([:len [/file find name=cloudflare_ip.rsc]] > 0) do={ 
    /file remove cloudflare_ip.rsc 
};

/tool fetch "https://raw.githubusercontent.com/im-sm/Mikrotik-IP-List/main/CLOUDFLARE/mikrotik_terminal.rsc" dst-path=/cloudflare_ip.rsc mode=https;

/ip firewall address-list remove [find list=CLOUDFLARE]

/import cloudflare_ip.rsc;

/ip firewall address-list remove [find comment=CLOUDFLARE_im_sm]

/ip firewall address-list set [find list=CLOUDFLARE] list=IP_LB_LIST comment=CLOUDFLARE_im_sm

Leave a Reply

Your email address will not be published.