Cisco Device Security - Network Management
Cisco Device Security - Network Management
○ R1(config)#line console 0
○ R1(config-line)#password Flackbox1
○ R1(config-line)#login
● Multiple administrators can connect at the same time. Lines are allocated on a
first come first served basis
● If all configured lines are in use then additional administrators will not be able
to login
R1(config)#line vty 0 15
R1(config-line)#password Flackbox2
R1(config-line)#login
Exec Timeout
● An administrator will be logged out after 10 minutes of inactivity by default.
This applies to both the console and VTY lines
● You can edit this value with the exec-timeout command
● no exec-timeout or exec-timeout 0 allows an administrator to stay logged in
indefinitely
R1(config)#line con 0
R1(config-line)#exec-timeout 15
R1(config)#line vty 0 15
R1(config-line)#exec-timeout 5 30
Securing VTY Lines with Access Lists
● You can apply an Access List to control access to the VTY lines
● This can be used to limit Telnet and SSH access to only your administrator
workstations
Enable Secret
Encrypting Passwords
Line level passwords can also be viewed in plain text in the running configuration by
default.
Service Password-Encryption
● The service password encryption command encrypts all passwords in the
running configuration
● It is best practice to enable this
R1(config)#service password-encryption
● By default, three levels of privilege are used - zero, user, and privileged. All
commands are at one of these three levels by default
● Zero-level access allows only five commands—logout, enable, disable, help,
and exit.
● User level (level 1) provides very limited read-only access to the router. When
you enter User Exec Mode you’re at Privilege Level 1 by default
● Privileged level (level 15) provides complete control over the router. When you
enter Privileged Exec Mode with the ‘enable’ command you’re at Level 15 by
default
Change command privilege level. Now also admin3 can execute show run conf
R1(config)#privilege exec level 5 show running-config
Enable SSH
● A digital certificate with a key length of at least 768 bits must be generated to
enable SSH encryption
Disable Telnet
● VTY lines are used for both Telnet and SSH connections
● Access is allowed for both by default
● A username is required for SSH access (line level passwords are not
supported)
R1(config)#username Flackbox secret Flackbox1
R1(config)#line vty 0 15
R1(config-line)#transport input ssh (telnet not added)
R1(config-line)#login local (use local usernames)
R1(config-line)#exit
R1(config)#ip ssh version 2 (limit SSH to v2)
AAA Server
● Configuring line level security or local usernames on each device has a
serious scalability limitation
● If a password has to be added, changed or removed it needs to be done on all
devices
● An external AAA server can be used to centralise this instead
● Multiple AAA servers can be implemented for redundancy
RADIUS/TACACS+ Configuration
R1(config)#aaa new-model
R1(config)#aaa new-model
R1(config)#aaa new-model
R1(config)#aaa new-model
R1(config)#tacacs server Server1
R1(config-server-tacacs)# address ipv4 10.10.10.10
R1(config-server-tacacs)# key Flackbox1
Best Practices
Syslog Format
The format of the messages is:
seq no:time stamp: %facility-severity-MNEMONIC:description
Example:
*Oct 3 00:44:12.627: %LINK-5-CHANGED: Interface FastEthernet0/0, changed
state to administratively down
Syslog Severity Levels
Logging Locations
● Syslog messages can be logged to various locations:
○ Console line - events will be shown in the CLI when you are logged in
over a console connection. All events logged by default
○ VTY Terminal lines - events will be shown in the CLI when you are
logged in over a Telnet or SSH session. Not enabled by default
○ The logging buffer – events saved in RAM memory, you can view
them with the ‘show logging’ command. All events logged by default
○ External Syslog servers
● You can specify the same or different severity levels to log for each location
● All messages of that severity level and higher will be logged
● For example, if you set a logging level of 3 for the console, events with
severity levels 0, 1, 2 and 3 will be logged there
● If you set a logging level of 7 for an external Syslog server, events from all
severity levels 0–7 will be logged there
Logging Synchronous
● When working in a CLI session, by default any syslog messages will be
printed into the middle of any commands you are currently typing
SNMP Versions
● Three significant versions of SNMP have been developed and deployed.
● SNMPv1 uses plain text authentication between the Manager and Agent using
matching Community strings.
● SNMPv2c also uses plain text Community strings. It supports bulk retrieval.
● SNMPv3 supports strong authentication and encryption. It is the preferred
version but is not supported on all devices.
SNMPv3 Configuration
● The SNMP Manager and Agent recognise each other through simple
unencrypted community strings in SNMP version 1 and 2
● SNMPv3 supports authentication and encryption
● The SNMPv3 security model works with users and groups
● A matching user account is set up on the NMS server and network device
● Settings are derived from the group the user is a member of