terça-feira, 5 de janeiro de 2016

Mikrotik - Função do Safe Mode


Quantas vezes vc esta remotamente fazendo algo no seu MK e derrepente a conexão caiu e vc teve que ir lá na torre (ou na casa da miséria) pra desfazer a cagada ?? Com a chegada do MK 5.x existe um botão no winbox chamado safe-mode (modo seguro), sim, mas o que esta coisa faz ??
Bom, imagine que vc vai testar uma regra de bloqueio que pode derrubar vc mesmo como testar esta coisa?? Clique em safe mode e faça seu teste, se caso a conexão cair, ele voltará voltara ao estado anterior da configuração sem gravar nada.



E se vc estiver na linha de comando, digite control+x que habilita também.

Nas versões anteriores a 5.x você faz o seguinte:

Para habilitar: Abre uma janela de terminal, através do menu "New Terminal", e na janela nova você utiliza a combinação de teclas "Ctrl+X";

Para desabilitar: Na mesma janela de terminal onde você ativou o "Safe Mode" utilize novamente a combinação de teclas "Ctrl+X";

Atenção: A janela do terminal deve permanecer aberta por todo o tempo que você estiver se utilizando do "Safe Mode", pois se você fechar a janela do terminal onde ativou-o sem antes desativá-lo, através da combinação de teclas "Ctrl+X", o RouterOS irá desfazer todas as alterações que você efetuou, pois ele interpreta como se você tivesse perdido a conexão.

Ou pode apertas as teclas "Ctrl+D" para sair sem salvar.

No terminal deve aparecer algo assim:


[admin@MikroTik] ip route>[CTRL]+[X]
[Safe Mode taken]

[admin@MikroTik] ip route 
 
 
fonte: https://blog.bravi.org/?p=928
 

RouterOS: Understanding ‘Safe Mode’.

It is sometimes possible to change router configuration in a way that will make the router inaccessible from a remote connection and an access from the local console is needed to repair the mistake. Usually this is done by accident, but there is no way to undo last change when connection to router is already cut.
In RouterOS, Safe Mode can be used to minimize this risk. Safe Mode is entered by pressing the “Safe Mode” button in Winbox (on the Top-Left corner of the main GUI Screen) or by pressing [CTRL]+[X] while using Console.
To save changes and quit safe mode, it is enough to press the “Safe Mode” button or hit [CTRL]+[X] again in Console.
To exit without saving the made changes, hit [CTRL]+[D] in the Console.
[admin@MikroTik] ip route>[CTRL]+[X]
[Safe Mode taken]
[admin@MikroTik] ip route
Message “Safe Mode taken” is displayed and prompt changes to reflect that session is now in safe mode. All configuration changes that are made (also from other login sessions), while in Safe Mode, are automatically undone if safe mode session terminates abnormally. All changes that will be automatically undone will be tagged with an F flag in system history:
[admin@MikroTik] ip route>
[Safe Mode taken]
[admin@MikroTik] ip route add
[admin@MikroTik] ip route /system history print
Flags: U - undoable, R - redoable, F - floating-undo
  ACTION                    BY            POLICY
F route added               admin         write
If shell connection (or Winbox terminal) terminates abnormally (simply cut, for example), after a while (according to TCP Timeout, set to 9 minutes in the default configuration) all made changes while configuring in safe mode will be completely undone. Exiting session by [Ctrl]+[D] also undoes all safe mode changes, while /quit does not and store permanently the active configuration.
If another user tries to enter safe mode, the following message will be displayed in his terminal:
[admin@MikroTik] >
Hijacking Safe Mode from someone - unroll/release/don't take it [u/r/d]:
    [u] - undoes all safe mode changes, and puts the current session in safe mode.
    [r] - keeps all current safe mode changes, and puts current session in a safe mode.
          Previous owner of safe mode is notified about this: 
 
     [admin@MikroTik] ip firewall rule input
     [Safe mode released by another user]
 
    [d] - leaves everything as-is.
If too many changes are made in Safe Mode and there’s no room in history to hold them all the session is automatically put out of the safe mode and no change is automatically undone.
 
Reações:

0 comentários: