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 \
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 \

fonte: http://www.itlearnweb.com

0 comentários: