Cheatography
https://cheatography.com
Cisco device configuration commands for security (SEC-160)
Login Enhancements
Command |
Function |
login block-for 120 attempts 3 within 30
|
blocks login attempts for 120 secs if 3 fail within 30 secs ( login local
must be configured) |
login quiet-mode access-class [acl-name | acl-number]
|
maps to an ACL so only authorized hosts can attempt to login |
|
wait-time between login attempts |
|
records successful logins |
|
records failed login attempts |
> Login enhancements don't apply to console connections
> login block-for
must be configured before any others
Role-Based CLI Views
Command |
Mode |
Function |
|
global |
enables AAA |
|
global |
creates a new view (must be in root view) |
|
view |
assigns view password (required) |
commands parser-mode [include|exclude] [command|interface]
|
view |
assigns command or interface to view |
|
priv. EXEC |
enters view (enable secret for root password) |
parser view view-name superview
|
global |
creates a new superview |
|
superview |
assigns superview password (required) |
|
superview |
assigns existing view to superview |
IPsec VPNs (Site-to-Site)
|
Command |
Mode |
----- Phase 1 ----- |
|
|
global |
|
|
global |
|
|
(config-isakmp) |
|
authentication pre-share
|
(-isakmp) |
|
|
(-isakmp) |
|
|
(-isakmp) |
|
|
(-isakmp) |
cry is key vpnpass add 10.2.2.2
|
crypto isakmp key [key] address [peer IP]
|
global |
----- Phase 2 ----- |
cry ip t VPN-SET esp-a 256 esp-sha-
|
crypto ipsec transform-set [tag] [encry.] [bits] [hash]
|
global |
|
crypto ipsec security-association lifetime seconds 1800
|
global |
|
crypto map [name] [seq #] ipsec-isakmp
|
global |
|
|
(-crypto-map) |
|
|
(-crypto-map) |
|
|
(-crypto-map) |
|
|
(-crypto-map) |
|
set security-association lifetime seconds [secs]
|
(-crypto-map) |
|
|
(-crypto-map) |
|
|
interface |
Line Config Mode
Command |
Line |
Function |
|
any unused |
disables EXEC mode for the line (outgoing connections only) |
|
all |
forces username/password authentication from local database |
|
all |
prevents logging from interrupting commands |
|
all |
logs out after 5 mins inactive |
Informational/Show Commands
Short Command |
Full Command |
What It Displays |
|
|
configured login settings |
|
|
details about login failures (src IP, count, time/date, etc) |
|
show crypto key mypubkey rsa
|
current RSA keys |
|
|
SSH configuration |
|
|
current SSH connections |
|
|
summary of all configured views (asterisk indicates superview) |
|
|
verification of the archive |
|
|
logging configuration & buffered syslog messages |
|
|
users connected to the device |
|
show crypto isakmp policy
|
ISAKMP policy configuration |
|
|
IPsec security association |
|
|
crypto map configuration |
Logging & Monitoring
Command |
Mode |
Function |
service timestamps log datetime msec
|
global |
enables timestamps service |
|
global |
specifies syslog server |
|
global |
sets log severity level |
logging source-interface ip-address
|
global |
identifies the device sending the log info |
|
global |
turns on logging |
Secure Bootset
Command |
Mode |
Function |
|
global |
secures IOS image & enables Cisco IOS image resilience |
|
global |
takes snapshot of running-config to save in persistent storage |
--- To Restore Secure Configuration --- |
|
|
ROMmon |
lists contents of device where secure bootset is stored |
|
ROMmon |
boots route with secure IOS image |
secure boot-config restore flash:filename
|
global |
restores secure config |
SSH Configuration
Command |
Function |
user Bob algorithm-type scrypt secret password
|
creates user in local database |
|
sets network domain name |
|
removes any existing RSA key pairs |
cry key gen rsa gen mod 1024
|
creates RSA encryption key (max: 4096 bits) |
|
enables SSH (line config, vty) |
|
sets SSH timeout length |
ip ssh authentication-retries 2
|
sets number of login attempts before user is disconnected |
|
sets SSH version to v2 |
Miscellaneous Configurations
Command |
Function |
license boot module c1900 technology-package securityk9
|
Adds security package to 1941 routers! |
no service password-recovery
|
prevents an attacker from recovering the router password |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by Tamaranth