terça-feira, 29 de novembro de 2016

Mikrotik - Disable and Enable Ethernet (Time Base)


Disable and Enable Ethernet By Time Scheduler
:log info "Ether2 Chaneged Name By HAMZA KHALIL"
interface ethernet
set [find default-name=ether2] name=ether2
:log info "Ether2 Added New Comment By HAMZA KHALIL"
set [ find default-name=ether2 ] comment="Time Base By HAMZA KHALIL"

/system script
add name=Disable policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    source=":log info \"Ether2 Disable By HAMZA KHALIL\"\r\
    \ninterface ethernet disable [find comment=\"Time Base By HAMZA KHALIL\"]"
add name=Enable policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    source=":log info \"Ether2 Enable By HAMZA KHALIL\"\r\
    \ninterface ethernet enable [find comment=\"Time Base By HAMZA KHALIL\"]"
/system scheduler
add interval=12h name="Ether2 Disable" on-event=Disable policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=feb/01/2016 \
    start-time=21:00:00
add interval=12h name="Ether2 Enable" on-event=Enable policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=feb/01/2016 \
    start-time=08:00:00
Download%20Full%20Script

fonte: http://www.itlearnweb.com

0 comentários: