Identificando mudanças na configuração e restaurando backup

Dando continuidade ao post sobre o comando archive vamos ver agora como armazenar logs com as configurações realizadas, inclusive identificando qual foi o usuário utilizado. Claro que para esta funcionalidade ter utilidade cada usuário deverá ter um username (no roteador ou base de autenticação externa).

No modo de configuração archive, escolha a opção log config, e então digite logging enable. Com isto toda alteração na configuração será logada.

Habilitando o Log Config

LAB_2811#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
LAB_2811(config)#archive
LAB_2811(config-archive)#log config
LAB_2811(config-archive-log-cfg)#logging enable
LAB_2811(config-archive-log-cfg)#end
LAB_2811#

Verificando quem fez mundaças na configuração do roteador

Brain_RT01#show archive log config all
idx   sess           user@line      Logged command
1     1          cisco@vty0     |  logging enable
2     1          cisco@vty0     |  notify syslog
3     1          cisco@vty0     |  record rc
4     2          cisco@vty0     |  hostname Brain_RT01
5     3          cisco@vty0     |  username brainwork privilege 15 secret cisco
6     3          cisco@vty0     |  !config: USER TABLE MODIFIED
7     5          cisco@vty0     |  archive
8     5          cisco@vty0     |   log config
9     5          cisco@vty0     |   no notify syslog contenttype plaintext
10     5          cisco@vty0     |  no record rc
11     6      brainwork@vty1   | enable password cisco
12     6      brainwork@vty1   | enable secret cisco
13     6      brainwork@vty1   | username 123 password cisco
14     6      brainwork@vty1   | !config: USER TABLE MODIFIED

Um detalhe importante é que após o roteador ser desligado os logs serão apagado. Enfim, não é um TACACS Server mas já ajuda.

Fazendo o rollback

Então você fez uma alteração na configuração e parecia tudo bem… porém, no dia seguinte, nada mais estava funcionando. Ainda bem que com o archive e o configure replace é possível fazer um rollback.

O configure replace está disponível nos IOS a partir da versão 12.3(7)T, e com ele é possível substituir a running-config por um arquivo de configuração (salvo com o comando archive, por exemplo).

Restaurando a configuração anterior (neste exemplo o arquivo backup_config já estava na flash)

Brain_RT01#configure replace flash:/backup_config/Brain_RT01-0
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: yes
Total number of passes: 1
Rollback Done

The following commands are failed to apply to the IOS image.
********
ip dhcp pool ITS
network 192.168.20.0 255.255.255.0
option 150 ip 192.168.20.1
default-router 192.168.20.1
********

Brain_RT01#

Observe que alguns comando não puderam ser restaurados (parte em laranja). Mesmo assim, sabendo quais são os comando, você pode ir lá e configurar manualmente.

Mais detalhes sobre o comando configure replace neste link.

Até a próxima.

About Us

Luckily friends do ashamed to do suppose. Tried meant mr smile so. Exquisite behaviour as to middleton perfectly. Chicken no wishing waiting am. Say concerns dwelling graceful.

Services

Most Recent Posts

  • All Post
  • Branding
  • Certificação
  • Cisco
  • Cloud
  • Configuração
  • Configuração Básica
  • Development
  • Geral
  • Informação
  • Leadership
  • Linux
  • Management
  • Microsoft
  • Network
  • Security
  • UC
  • Virtualização
  • Wireless

Company Info

She wholly fat who window extent either formal. Removing welcomed.

Your Business Potential with Our Proven Strategies

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Company

About Us

Contact Us

Products

Services

Blog

Features

Analytics

Engagement

Builder

Publisher

Help

Privacy Policy

Terms

Conditions

Product

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
You have been successfully Subscribed! Ops! Something went wrong, please try again.
© 2023 Created with Royal Elementor Addons