##
Device Hardening
Shrink the attack surface of every switch, router and host — and always pick the encrypted protocol.
// hardening checklist
- Change default credentials; enforce strong passwords + MFA
- Disable unused services (Telnet, HTTP) — use SSH / HTTPS
- Patch firmware & OS promptly
- Port security + 802.1X on access ports
- Enable DHCP snooping + Dynamic ARP Inspection
- Shut unused switchports; park them in a black-hole VLAN
- Protect the management plane (ACLs, CoPP, out-of-band)
- Centralize logging (Syslog) and time (NTP)
- Role-based access through AAA
service password-encryption
security passwords min-length 12
enable secret <strong-secret>
!
aaa new-model
username admin privilege 15 secret <strong-secret>
!
ip domain-name example.com
crypto key generate rsa modulus 2048
ip ssh version 2
!
line vty 0 4
transport input ssh
access-class MGMT in
exec-timeout 5 0
login authentication default
!
no ip http server
ip http secure-server
login block-for 60 attempts 3 within 30
banner login ^Authorized access only^ show ip ssh
show running-config | include service|aaa|login
show users
show ip access-lists MGMT