Advertisement
saputraaziii

settingan router mikrotik senennet

Feb 11th, 2019
1,387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.14 KB | None | 0 0
  1. /system clock
  2. set time-zone-autodetect=no time-zone-name=Asia/Jakarta
  3. /system ntp client
  4. set enabled=yes primary-ntp=202.162.32.12 secondary-ntp=192.248.1.162
  5. /system routerboard settings
  6. set silent-boot=no
  7. /system scheduler
  8. add interval=2w6d name="Auto Send Backup Via Email" on-event=\
  9.     "/system script run autobackup-email" policy=\
  10.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
  11.     start-date=oct/10/2018 start-time=03:00:00
  12. add interval=1w3d name="Auto Send Export Conf Via Email" on-event=\
  13.     "/system script run auto-exportfile-viaemail" policy=\
  14.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
  15.     start-date=oct/10/2018 start-time=03:00:00
  16. /system script
  17. add name=autobackup-email owner=saputraaziii policy=\
  18.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
  19.    Date-Declaration#\r\
  20.    \n:local ds [/system clock get date]\r\
  21.    \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
  22.    \n\r\
  23.    \n#Fix-Variable-Declaration#\r\
  24.    \n:local routeridentity [/system identity get name]\r\
  25.    \n:local mikrotiktype [/system resource get board-name]\r\
  26.    \n\r\
  27.    \n#Backup-Router-Configuration#\r\
  28.    \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
  29.    \"_\".\$dds.\".backup\")\r\
  30.    \n/system backup save name=\$configbackup\r\
  31.    \n:local emailsubject (\"Mikrotik Router Backup Configuration \".\$routeri\
  32.    dentity)\r\
  33.    \n:local emailbody (\"Please find out (attachment) the mikrotik router bac\
  34.    kup configuration belong of \".\$routeridentity.\", this email created wit\
  35.    h 1 day auto generate by the router itself and powered by Karyomendo Inter\
  36.    net Access,  thank you\")\r\
  37.    \n\r\
  38.    \n#Send-Email+Backup-Configuration#\r\
  39.    \n:delay 3s\r\
  40.    \n/tool e-mail send to=saputraazi98@gmail.com from=azi@karyomendo.com subj\
  41.    ect=\$emailsubject body=\$emailbody file=\$configbackup\r\
  42.    \n:log info \"Router baru saja mengirim backup file config....\"\r\
  43.    \n:delay 3s\r\
  44.    \n\r\
  45.    \n#Menghapus-File-Config-Backup#\r\
  46.    \n:log info \"Akan dilakukan penghapusan file backup dalam 20 detik kedepa\
  47.    n.....\"\r\
  48.    \n:delay 20s\r\
  49.    \n/file remove \$configbackup\r\
  50.    \n:delay 3s\r\
  51.    \n:log info \"\$configbackup telah dihapus......\""
  52. add name=auto-clear/flush owner=saputraaziii policy=\
  53.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
  54.    \_write by shaddana, shaddana@gmail.com +++++++++++\r\
  55.    \n# thanks to Alloh SWT and my parents +++++++++++++++\r\
  56.    \n# start of script +++++++++++++++++++++++++++++++++\r\
  57.    \n:log info message=\"autoreset-flash: auto reset-flush will started.\"\r\
  58.    \n:delay 3s;\r\
  59.    \n# auto reset counters filter ----------\r\
  60.    \n:log info message=\"autoreset-flush: try to reset counter firewall-filte\
  61.    r, please wait...\"\r\
  62.    \n/ip firewall filter reset-counters-all\r\
  63.    \n:delay 5s;\r\
  64.    \n:log info message=\"autoreset-flash: reset counter firewall-filter is do\
  65.    ne\"\r\
  66.    \n:delay 3s;\r\
  67.    \n# auto reset counters mangle ----------\r\
  68.    \n:log info message=\"autoreset-flush: try to reset counter firewall-mangl\
  69.    e, please wait...\"\r\
  70.    \n/ip firewall mangle reset-counters-all\r\
  71.    \n:delay 5s;\r\
  72.    \n:log info message=\"autoreset-flush: reset counter firewall-mangle is do\
  73.    ne\"\r\
  74.    \n:delay 3s;\r\
  75.    \n# auto reset counters nat -------------\r\
  76.    \n:log info message=\"autoreset-flush: try to reset counter firewall-nat, \
  77.    please wait...\"\r\
  78.    \n/ip firewall nat reset-counters-all\r\
  79.    \n:delay 5s;\r\
  80.    \n:log info message=\"autoreset-flush: reset counter firewall-nat is done\
  81.    \"\r\
  82.    \n:delay 3s;\r\
  83.    \n# auto reset counters queue tree ------\r\
  84.    \n:log info message=\"autoreset-flush: try to reset counter queue tree, pl\
  85.    ease wait...\"\r\
  86.    \n/queue tree reset-counters-all\r\
  87.    \n:delay 5s;\r\
  88.    \n:log info message=\"autoreset-flush: reset counter queue tree is done\"\
  89.    \r\
  90.    \n:delay 3s;\r\
  91.    \n# auto reset counters simple queue ----\r\
  92.    \n:log info message=\"autoreset-flush: try to reset counter simple queue, \
  93.    please wait...\"\r\
  94.    \n/queue simple reset-counters-all\r\
  95.    \n:delay 5s;\r\
  96.    \n:log info message=\"autoreset-flush: reset counter simple queue is done\
  97.    \"\r\
  98.    \n:delay 3s;\r\
  99.    \n# auto reset counters dns cache -------\r\
  100.    \n:log info message=\"autoreset-flush: try to flush dns cache, please wait\
  101.    ...\"\r\
  102.    \n/ip dns cache flush\r\
  103.    \n:delay 5s;\r\
  104.    \n:log info message=\"autoreset-flush: flush dns cache is done\"\r\
  105.    \n:delay 3s;\r\
  106.    \n:log info message=\"autoreset-flush: all autoreset-flush process is comp\
  107.    leted\"\r\
  108.    \n# end of script +++++++++++++++++++++++++++++++++++"
  109. add name=sendmail owner=saputraaziii policy=\
  110.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
  111.    Date-Declaration#\r\
  112.    \n:local ds [/system clock get date]\r\
  113.    \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
  114.    \n\r\
  115.    \n#Fix-Variable-Declaration#\r\
  116.    \n:local routeridentity [/system identity get name]\r\
  117.    \n:local mikrotiktype [/system resource get board-name]\r\
  118.    \n\r\
  119.    \n#Backup-Router-Configuration#\r\
  120.    \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
  121.    \"_\".\$dds.\".backup\")\r\
  122.    \n/system backup save name=\$configbackup\r\
  123.    \n:local emailsubject (\"Mikrotik Router Backup Configuration \".\$routeri\
  124.    dentity)\r\
  125.    \n:local emailbody (\"Please find out (attachment) the mikrotik router bac\
  126.    kup configuration belong of \".\$routeridentity.\", this email created wit\
  127.    h 1 day auto generate by the router itself and powered by ORBICOM Internet\
  128.    \_Access, thank you\")\r\
  129.    \n\r\
  130.    \n#Send-Email+Backup-Configuration#\r\
  131.    \n:delay 1s\r\
  132.    \n/tool e-mail send to=hostmaster@gmail.com from=azi@karyomendo.com subjec\
  133.    t=\$emailsubject body=\$emailbody file=\$configbackup\r\
  134.    \n:log info \"Router baru saja mengirim backup file config....\"\r\
  135.    \n:delay 3s\r\
  136.    \n\r\
  137.    \n#Menghapus-File-Config-Backup#\r\
  138.    \n:log info \"Akan dilakukan penghapusan file backup dalam 20 detik kedepa\
  139.    n.....\"\r\
  140.    \n:delay 20s\r\
  141.    \n/file remove \$configbackup\r\
  142.    \n:delay 3s\r\
  143.    \n:log info \"\$configbackup telah dihapus......\""
  144. add name=auto-exportfile-viaemail owner=saputraaziii policy=\
  145.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
  146.    Date-Declaration#\r\
  147.    \n:local ds [/system clock get date]\r\
  148.    \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
  149.    \n\r\
  150.    \n#Fix-Variable-Declaration#\r\
  151.    \n:local routeridentity [/system identity get name]\r\
  152.    \n:local mikrotiktype [/system resource get board-name]\r\
  153.    \n\r\
  154.    \n#Export-Script-Router-Configuration#\r\
  155.    \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
  156.    \"_\".\$dds.\".script\")\r\
  157.    \n/export file=\$configbackup\r\
  158.    \n:local emailsubject (\"Mikrotik Router File Script \".\$routeridentity)\
  159.    \r\
  160.    \n:local emailbody (\"Please find out (attachment) the mikrotik router scr\
  161.    ipt configuration belong of \".\$routeridentity.\", this email created wit\
  162.    h 1 day auto generate by the router itself and powered by Karyomendo Inter\
  163.    net Access,  thank you\")\r\
  164.    \n\r\
  165.    \n#Send-Email+Backup-Configuration#\r\
  166.    \n:delay 3s\r\
  167.    \n/tool e-mail send to=saputraazi98@gmail.com from=azi@karyomendo.com subj\
  168.    ect=\$emailsubject body=\$emailbody file=\$configbackup\r\
  169.    \n:log info \"Router baru saja mengirim script file config....\"\r\
  170.    \n:delay 3s\r\
  171.    \n\r\
  172.    \n#Menghapus-File-Config-Backup#\r\
  173.    \n:log info \"Akan dilakukan penghapusan file script dalam 20 detik kedepa\
  174.    n.....\"\r\
  175.    \n:delay 20s\r\
  176.    \n/file remove \$configbackup\r\
  177.    \n:delay 3s\r\
  178.    \n:log info \"\$configbackup telah dihapus......\""
  179. add name=script1 owner=saputraaziii policy=\
  180.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
  181.    foreach i in=[/ip dns cache find] do={ :if ([:find [/ip dns cache get \$i \
  182.    name] \"rapidshare\"] > 0) do={ :log info (\"rapidshare: \" . [/ip dns cac\
  183.    he get \$i name] . \" (ip address \" . [/ip dns cache get \$i address] . \
  184.    \")\") /ip firewall address-list add address=[/ip dns cache get \$i addres\
  185.    s] list=rapidshare disabled=no } }\r\
  186.    \n"
  187. add name=dns owner=saputraaziii policy=\
  188.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
  189.     "/ip dns cache flush"
  190. add name="SMS Gateway" owner=saputraaziii policy=\
  191.     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="/\
  192.    tool sms send usb1 \"085778922135\" \\\r\
  193.    \n   message=\"Pelanggan Yth, Segeralah melakukan pembayaran Bulanan servi\
  194.    ce anda. (Salam LebahNetworking) https://lebahnetworking.net \""
  195. /tool e-mail
  196. set address=smtp.gmail.com from=infomikrotikk@gmail.com password=74710879m \
  197.     port=587 start-tls=yes user=infomikrotikk@gmail.com
  198. /tool romon
  199. set enabled=yes secrets=senennet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement