PermitANY
Cisco NX-OSConfig537 downloads

Cisco NX-OS Security Hardening

Security hardening for Cisco Nexus: AAA, SSH hardening, role-based access, CoPP, disable unnecessary services, and management plane protection.

↓ example.txt

What is it?

NX-OS security hardening follows many of the same principles as IOS hardening, but leverages NX-OS's role-based access control (RBAC) and feature-based architecture. NX-OS has built-in roles (network-admin, network-operator, vdc-admin) that control what commands each user can run. The feature model is an advantage: services not enabled with 'feature' simply don't exist on the switch. NX-OS also has 'Control Plane Policing (CoPP)' pre-configured by default — protecting the switch CPU from traffic flooding attacks.

When to use

  • ·Before deploying any Nexus switch to production
  • ·After a security audit or compliance review
  • ·For PCI-DSS, SOC 2, or HIPAA compliance in data center environments
  • ·When establishing a security baseline for a new data center deployment

When NOT to use

  • ·In a lab environment where rapid config changes are needed — strict exec timeouts slow troubleshooting. Use separate lab and production configs.
  • ·Disabling 'feature dhcp' when Nexus is acting as a DHCP relay — verify first with 'show run | inc dhcp'

How it compares

vs Cisco IOS hardeningNX-OS has RBAC (roles) built in — you assign users to roles, not privilege levels. NX-OS 'feature' model means services don't exist if not enabled (more secure by default). IOS has more granular CoPP configuration.
vs CIS Benchmark for NX-OSCIS publishes specific benchmarks for NX-OS. This template covers the most impactful controls. The full CIS benchmark includes additional checks like image signing verification, VDC security, and AAA timeout settings.

Prerequisites

  • →TACACS+ server configured and reachable from mgmt0 before applying AAA config
  • →Management ACL must include your actual management source IPs — wrong IPs cause lockout
  • →Verify which features are in use before disabling them: 'show feature' to see enabled features
  • →Test console access before restricting VTY lines — console is not affected by VTY ACLs

Config Generator

Verification commands

show ip ssh

Verify SSH is enabled on the switch

ExpectedSSH Enabled - version 2.0

show aaa authentication

Show AAA authentication configuration and status

ExpectedLists authentication methods for login and console. TACACS+ should be primary with local as fallback.

show role

Show available RBAC roles and their permissions

ExpectedLists built-in roles (network-admin, network-operator) and any custom roles

show users

Show currently logged-in users and their source

ExpectedLists username, access method (ssh), source IP, and assigned role

Debug commands

show aaa accounting log last 20

Show recent AAA accounting events (commands entered)

Common mistakes & fixes

SymptomLocked out after applying management ACL
CauseManagement ACL has wrong source network or does not include your management IP
FixUse console access (not restricted by VTY ACL). Modify the ACL to include your management subnet.
SymptomTACACS+ authentication failing
CauseTACACS+ server unreachable from mgmt VRF, or wrong shared key
FixTest: 'test aaa group tacacs+ <user> <pass>'. Verify server is reachable: 'ping <tacacs-ip> vrf management'. Local fallback should keep you in if TACACS+ fails.
SymptomUser cannot run certain commands after role assignment
CauseUser assigned to 'network-operator' role which is read-only by default
FixCreate a custom role with specific command permissions, or change user to 'network-admin' role for full access.

Further learning

Recommended books to go deeper on this topic.

Network Security Architectures

Sean Convery · Cisco Press · Defense-in-depth, CoPP, control plane hardening, AAA design

CCNP Enterprise Core ENCOR 350-401 Official Cert Guide

Brad Edgeworth et al. · Cisco Press · AAA, RADIUS, TACACS+, device hardening best practices

Related configs