Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /system clock
- set time-zone-autodetect=no time-zone-name=Asia/Jakarta
- /system ntp client
- set enabled=yes primary-ntp=202.162.32.12 secondary-ntp=192.248.1.162
- /system routerboard settings
- set silent-boot=no
- /system scheduler
- add interval=2w6d name="Auto Send Backup Via Email" on-event=\
- "/system script run autobackup-email" policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
- start-date=oct/10/2018 start-time=03:00:00
- add interval=1w3d name="Auto Send Export Conf Via Email" on-event=\
- "/system script run auto-exportfile-viaemail" policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
- start-date=oct/10/2018 start-time=03:00:00
- /system script
- add name=autobackup-email owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
- Date-Declaration#\r\
- \n:local ds [/system clock get date]\r\
- \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
- \n\r\
- \n#Fix-Variable-Declaration#\r\
- \n:local routeridentity [/system identity get name]\r\
- \n:local mikrotiktype [/system resource get board-name]\r\
- \n\r\
- \n#Backup-Router-Configuration#\r\
- \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
- \"_\".\$dds.\".backup\")\r\
- \n/system backup save name=\$configbackup\r\
- \n:local emailsubject (\"Mikrotik Router Backup Configuration \".\$routeri\
- dentity)\r\
- \n:local emailbody (\"Please find out (attachment) the mikrotik router bac\
- kup configuration belong of \".\$routeridentity.\", this email created wit\
- h 1 day auto generate by the router itself and powered by Karyomendo Inter\
- net Access, thank you\")\r\
- \n\r\
- \n#Send-Email+Backup-Configuration#\r\
- \n:delay 3s\r\
- \n/tool e-mail send to=saputraazi98@gmail.com from=azi@karyomendo.com subj\
- ect=\$emailsubject body=\$emailbody file=\$configbackup\r\
- \n:log info \"Router baru saja mengirim backup file config....\"\r\
- \n:delay 3s\r\
- \n\r\
- \n#Menghapus-File-Config-Backup#\r\
- \n:log info \"Akan dilakukan penghapusan file backup dalam 20 detik kedepa\
- n.....\"\r\
- \n:delay 20s\r\
- \n/file remove \$configbackup\r\
- \n:delay 3s\r\
- \n:log info \"\$configbackup telah dihapus......\""
- add name=auto-clear/flush owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
- \_write by shaddana, shaddana@gmail.com +++++++++++\r\
- \n# thanks to Alloh SWT and my parents +++++++++++++++\r\
- \n# start of script +++++++++++++++++++++++++++++++++\r\
- \n:log info message=\"autoreset-flash: auto reset-flush will started.\"\r\
- \n:delay 3s;\r\
- \n# auto reset counters filter ----------\r\
- \n:log info message=\"autoreset-flush: try to reset counter firewall-filte\
- r, please wait...\"\r\
- \n/ip firewall filter reset-counters-all\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flash: reset counter firewall-filter is do\
- ne\"\r\
- \n:delay 3s;\r\
- \n# auto reset counters mangle ----------\r\
- \n:log info message=\"autoreset-flush: try to reset counter firewall-mangl\
- e, please wait...\"\r\
- \n/ip firewall mangle reset-counters-all\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flush: reset counter firewall-mangle is do\
- ne\"\r\
- \n:delay 3s;\r\
- \n# auto reset counters nat -------------\r\
- \n:log info message=\"autoreset-flush: try to reset counter firewall-nat, \
- please wait...\"\r\
- \n/ip firewall nat reset-counters-all\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flush: reset counter firewall-nat is done\
- \"\r\
- \n:delay 3s;\r\
- \n# auto reset counters queue tree ------\r\
- \n:log info message=\"autoreset-flush: try to reset counter queue tree, pl\
- ease wait...\"\r\
- \n/queue tree reset-counters-all\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flush: reset counter queue tree is done\"\
- \r\
- \n:delay 3s;\r\
- \n# auto reset counters simple queue ----\r\
- \n:log info message=\"autoreset-flush: try to reset counter simple queue, \
- please wait...\"\r\
- \n/queue simple reset-counters-all\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flush: reset counter simple queue is done\
- \"\r\
- \n:delay 3s;\r\
- \n# auto reset counters dns cache -------\r\
- \n:log info message=\"autoreset-flush: try to flush dns cache, please wait\
- ...\"\r\
- \n/ip dns cache flush\r\
- \n:delay 5s;\r\
- \n:log info message=\"autoreset-flush: flush dns cache is done\"\r\
- \n:delay 3s;\r\
- \n:log info message=\"autoreset-flush: all autoreset-flush process is comp\
- leted\"\r\
- \n# end of script +++++++++++++++++++++++++++++++++++"
- add name=sendmail owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
- Date-Declaration#\r\
- \n:local ds [/system clock get date]\r\
- \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
- \n\r\
- \n#Fix-Variable-Declaration#\r\
- \n:local routeridentity [/system identity get name]\r\
- \n:local mikrotiktype [/system resource get board-name]\r\
- \n\r\
- \n#Backup-Router-Configuration#\r\
- \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
- \"_\".\$dds.\".backup\")\r\
- \n/system backup save name=\$configbackup\r\
- \n:local emailsubject (\"Mikrotik Router Backup Configuration \".\$routeri\
- dentity)\r\
- \n:local emailbody (\"Please find out (attachment) the mikrotik router bac\
- kup configuration belong of \".\$routeridentity.\", this email created wit\
- h 1 day auto generate by the router itself and powered by ORBICOM Internet\
- \_Access, thank you\")\r\
- \n\r\
- \n#Send-Email+Backup-Configuration#\r\
- \n:delay 1s\r\
- \n/tool e-mail send to=hostmaster@gmail.com from=azi@karyomendo.com subjec\
- t=\$emailsubject body=\$emailbody file=\$configbackup\r\
- \n:log info \"Router baru saja mengirim backup file config....\"\r\
- \n:delay 3s\r\
- \n\r\
- \n#Menghapus-File-Config-Backup#\r\
- \n:log info \"Akan dilakukan penghapusan file backup dalam 20 detik kedepa\
- n.....\"\r\
- \n:delay 20s\r\
- \n/file remove \$configbackup\r\
- \n:delay 3s\r\
- \n:log info \"\$configbackup telah dihapus......\""
- add name=auto-exportfile-viaemail owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
- Date-Declaration#\r\
- \n:local ds [/system clock get date]\r\
- \n:local dds ([:pick \$ds 4 6].[pick \$ds 0 3].[:pick \$ds 7 11])\r\
- \n\r\
- \n#Fix-Variable-Declaration#\r\
- \n:local routeridentity [/system identity get name]\r\
- \n:local mikrotiktype [/system resource get board-name]\r\
- \n\r\
- \n#Export-Script-Router-Configuration#\r\
- \n:local configbackup (\"config_\".\$routeridentity.\"_\".\$mikrotiktype.\
- \"_\".\$dds.\".script\")\r\
- \n/export file=\$configbackup\r\
- \n:local emailsubject (\"Mikrotik Router File Script \".\$routeridentity)\
- \r\
- \n:local emailbody (\"Please find out (attachment) the mikrotik router scr\
- ipt configuration belong of \".\$routeridentity.\", this email created wit\
- h 1 day auto generate by the router itself and powered by Karyomendo Inter\
- net Access, thank you\")\r\
- \n\r\
- \n#Send-Email+Backup-Configuration#\r\
- \n:delay 3s\r\
- \n/tool e-mail send to=saputraazi98@gmail.com from=azi@karyomendo.com subj\
- ect=\$emailsubject body=\$emailbody file=\$configbackup\r\
- \n:log info \"Router baru saja mengirim script file config....\"\r\
- \n:delay 3s\r\
- \n\r\
- \n#Menghapus-File-Config-Backup#\r\
- \n:log info \"Akan dilakukan penghapusan file script dalam 20 detik kedepa\
- n.....\"\r\
- \n:delay 20s\r\
- \n/file remove \$configbackup\r\
- \n:delay 3s\r\
- \n:log info \"\$configbackup telah dihapus......\""
- add name=script1 owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
- foreach i in=[/ip dns cache find] do={ :if ([:find [/ip dns cache get \$i \
- name] \"rapidshare\"] > 0) do={ :log info (\"rapidshare: \" . [/ip dns cac\
- he get \$i name] . \" (ip address \" . [/ip dns cache get \$i address] . \
- \")\") /ip firewall address-list add address=[/ip dns cache get \$i addres\
- s] list=rapidshare disabled=no } }\r\
- \n"
- add name=dns owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
- "/ip dns cache flush"
- add name="SMS Gateway" owner=saputraaziii policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="/\
- tool sms send usb1 \"085778922135\" \\\r\
- \n message=\"Pelanggan Yth, Segeralah melakukan pembayaran Bulanan servi\
- ce anda. (Salam LebahNetworking) https://lebahnetworking.net \""
- /tool e-mail
- set address=smtp.gmail.com from=infomikrotikk@gmail.com password=74710879m \
- port=587 start-tls=yes user=infomikrotikk@gmail.com
- /tool romon
- set enabled=yes secrets=senennet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement