SCRIPT'S ÚTEIS E IMPORTANTES PARA MIKROTIK
Autor: digo3313 | Publicado: 2012-09-26T06:44:00-07:00

Galera venho através deste tópico disponibilizar com os compaheiros 
alguns script's úteis e até mesmo importantes, vi em um site e gostei, resolvi assim compartilhar:Algumas regras/script para mikrotik# fazer backup diários./system scriptadd name=backup_diario_cw policy=\&nbsp;&nbsp;&nbsp; ftp,reboot,read,write,policy,test,winbox,password source=\&nbsp;&nbsp;&nbsp; "/sy ba sav name=mk_cw.backup"&nbsp;&nbsp;&nbsp; # Uso em Mikrotik com Bridge, evita de passar aquele tráfego NetBIOS (compartilhamento do Windows):&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; ;;; Regras para Bloqueio de Tráfego NETBIOS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chain=forward mac-protocol=ip dst-port=135-139 ip-protocol=tcp action=drop &nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; chain=forward mac-protocol=ip dst-port=135-139 ip-protocol=udp action=drop &nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; chain=forward mac-protocol=ip dst-port=455 ip-protocol=tcp action=drop#&nbsp;
 Bloqueio geral de DHCP, evitar de algum espertinho espetar uma ap na 
sua rede e sair distribuindo DHCP, lembre-se, se vc usa DHCP, creio q 
vai dar pra usar somente se adaptar a regra.&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; ;;; Bloqueio Geral de DHCP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chain=forward protocol=udp src-port=68 dst-port=67 action=drop# Script para Backup&nbsp;&nbsp;&nbsp; /system script&nbsp;&nbsp;&nbsp; add name=Backup policy=\&nbsp;&nbsp;&nbsp; ftp,reboot,read,write,policy,test,winbox,password,sniff source=\&nbsp;&nbsp;&nbsp; "/system backup save name=Backup"&nbsp;&nbsp;&nbsp; add name=Email policy=ftp,reboot,read,write,policy,test,winbox,password,sniff \&nbsp;&nbsp;&nbsp; source="/tool e-mail send to=l2revolution-pe@hotmail.com subject=Backup_Mikr\&nbsp;&nbsp;&nbsp; otik file=Backup.backup"# Script para Agendamento&nbsp;&nbsp;&nbsp; /system scheduler&nbsp;&nbsp;&nbsp; add comment="" disabled=no interval=1d name=Backup on-event=Backup \&nbsp;&nbsp;&nbsp; start-date=apr/06/2006 start-time=00:00:00&nbsp;&nbsp;&nbsp; add comment="" disabled=no interval=1d name=Email on-event=Email start-date=\&nbsp;&nbsp;&nbsp; apr/06/2006 start-time=00:01:00# script para atualizar hora automática no mikrotik&nbsp;&nbsp;&nbsp; /system ntp client set enabled=yes mode=unicast primary-ntp=200.192.232.8# SCRIPT PARA REBOOTAR AUTOMATICAMENTE&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /system script add name="reboot" source="/system reboot" policy=ftp,reboot,read,write,policy,test,winbox,password# SCRIPT PARA BACKUP AUTOMÁTICO DO MIKROTIK&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 /system script add name="backup_diario" source="/sy ba sav 
name=mk_bkp.backup" 
policy=ftp,reboot,read,write,policy,test,winbox,password# SCRIPTS PARA HABILITAR E DESABILITAR TODA A BANDA# DESABILITA&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 /system script add name="queue_disable" source="/queue simple { disable
 [find name=LIBERA_TUDO] }" 
policy=ftp,reboot,read,write,policy,test,winbox,password# SCRIPTS PARA HABILITAR E DESABILITAR TODA A BANDA# HABILITA&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 /system script add name="queue_enable" source="/queue simple { enable 
[find name=LIBERA_TUDO] }" 
policy=ftp,reboot,read,write,policy,test,winbox,password## AGENDAMENTOS ### AGENDAMENTO PARA REBOOT DE 15 EM 15 DIAS&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 / system scheduler add name="reboot" on-event=reboot 
start-date=nov/15/2006 start-time=06:05:00 interval=2w1d comment="REBOOT
 DE 15 EM 15 DIAS" disabled=no# AGENDAMENTO PARA BACKUP AUTOMÁTICO DE 6 EM 6 HORAS&nbsp;&nbsp;&nbsp;
 / system scheduler add name="backup diario" on-event=backup_diario 
start-date=jan/16/2007 start-time=00:00:00 interval=6h comment="CRIA 
BACKUP DE 6 EM 6 HORAS" disabled=no