kiedtink

Mikrotik Script Import nice.rsc 2021

Dec 13th, 2020 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.47 KB | None | 0 0
  1. ## update-nice
  2.  
  3. :log error "Proses Update Nice IP..."
  4. /sys log disable [find name=info];
  5. :if ([:len [/file find name=nice.rsc]] > 0) do={/file remove nice.rsc }; /tool fetch url=http://ixp.mikrotik.co.id/download/nice.rsc; /ip firewall address-list remove [find list=nice];
  6. :delay 10s
  7. /import nice.rsc;
  8. :delay 5s
  9. /system note set show-at-login=no;
  10. /system script run nice-extra;
  11. /system script run remove-from-nice;
  12. /sys log enable [find name=info];
  13. :log e
  14.  
  15. ## nice-extra
  16.  
  17. /ip firewall address-list;
  18. add address=192.168.7.0/24 disabled=no list=nice comment=LOKAL;
  19. add address=192.168.8.0/21 disabled=no list=nice comment=LOKAL;
  20. add address=10.20.30.0/23 disabled=no list=nice comment=LOKAL;
  21. add address=10.31.32.0/20 disabled=no list=nice comment=LOKAL;
  22. add address=10.10.10.0/24 disabled=no list=nice comment=LOKAL;
  23.  
  24. ## remove-from-nice
  25.  
  26. # detik.com
  27. /ip firewall address-list remove [/ip firewall address-list find address=103.49.220.0/22];
  28. /ip firewall address-list remove [/ip firewall address-list find address=203.190.240.0/21];
  29.  
  30. # ggc telkom
  31. /ip firewall address-list remove [/ip firewall address-list find address=118.98.0.0/17];
  32. /ip firewall address-list remove [/ip firewall address-list find address=118.96.0.0/16];
  33.  
  34. ### run script shcedule jam 3 pagi ###
  35. /system scheduler
  36. add interval=1d name=update-nice on-event=update-nice policy=\
  37.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
  38.     start-date=dec/13/2020 start-time=03:00:00
  39.  
Add Comment
Please, Sign In to add comment