Cisco Device Security Flashcards
IOS Security
When a Cisco router/switch is received from the factory, no security is configured
You can access the command line via console cable with no password required
One of the first tasks is to configure security to ensure that only authorized admins can access the device
Basic Line Level Security
Minimal password security can be configured via use of static, locally defined passwords at three different levels:
Console line
–Accessing user exec mode when connecting via console cable
Virtual terminal VTY line
–Accessing user exec mode when connecting remotely via telnet/ssh
Privileged exec mode
–Entering the “enable” command
The levels can be used independently or in combo with each other
They can use the same or different passwords
Basic Console Security
Only one admin can connect over console cable at a time so the line number is always 0
“Login” with no following keywords requires the admin to enter the password configured at the line level to log in
Command: Set “Flackbox1” as the password in the console line
line console 0
password Flackbox1
login
Basic Telnet Security
An admin can use telnet to connect to the CLI of a router/switch over an IP connection
IOS devices do NOT accept incoming telnet sessions by default
An IP address and virtual terminal VTY line access must be configured
Multiple admins can connect at the same time
–Lines are allocated on a first come first serve basis
–Total of 16 lines supported typically (0-15)
If all configured lines are in use then additional admins will not be able to login
Command: Telnet Switch Configuration
IP: 192.168.0.10/24
Gateway: 192.168.0.1
interface vlan 1
ip address 192.168.0.10 255.255.255.0
no shutdown
exit
ip default-gateway 192.168.0.1
Command: Configure VTY password of “Flackbox2” on all lines
line vty 0 15 –> configures lines 0 through 15
password Flackbox2
login
Console & VTY Lines: Exec Timeout
(And command to set or remove)
An admin will be logged out after 10 minutes of inactivity by default
–Applies to both console & VTY lines
You can edit this value with the exec-timeout command
–No exec-timeout OR exec-timeout 0
—-Allows admin to stay logged in indefinitely
Command: Change line console exec timeout to 15 minutes
line console 0
exec-timeout 15
Command: Change VTY exec timeout to [5 minutes, 30 seconds] on all lines
line vty 0 15
exec-timeout 5 30
Command: Configure ACL permissions for host 10.0.0.10 to access all VTY lines
VTY password: Flackbox3
access-list 1 permit host 10.0.0.10
line vty 0 15
login
password Flackbox3
access-class 1 in
Command: Configure a login message on VTY
banner login “
Command: Create an enable password of Flackbox3
enable password Flackbox3
(not encrypted)
Command: Create an enable secret of Flackbox3
enable secret Flackbox3
(Shows as encrypted in running config)
Command: Encrypt all passwords in the running config
service password-encryption
Command: Create two users (Admin1 & Admin2) with encrypted passwords (Flackbox1 & Flackbox2)
And then add them to VTY and Console Lines
(From global config)
username admin1 secret Flackbox1
username admin2 secret Flackbox2
line console 0
login local
line vty 0 15
login local