Site icon IP-NETWORK-BASICS

List of commands to implement hardening on cisco routers and switches.

Advertisements

Implementing hardening measures in Cisco switches and routers helps to enhance network security. Here is a list of steps with commands to implement basic hardening configurations:

1.Disable Unused Services:

switch(config)# no ip http server
switch(config)# no ip http secure-server
switch(config)# no ip telnet server
switch(config)# no ip ftp server
switch(config)# no snmp-server

 

2.Enable Secure Management Access:

switch(config)# ip domain-name <domain-name>
switch(config)# crypto key generate rsa modulus 2048
switch(config)# line vty 0 15
switch(config-line)# transport input ssh

 

  1. Implement Strong Passwords:

switch(config)# enable secret <password>

switch(config)# line console 0

switch(config-line)# password <password>

switch(config-line)# login

 

  1. Secure SNMP:

switch(config)# snmp-server group <group-name> v3 priv

switch(config)# snmp-server user <username> <group-name> v3 auth sha <auth-password> priv aes 128 <priv-password>

 

  1. Enable Access Control:

switch(config)# access-list 10 permit <source-ip> <destination-ip>

switch(config)# interface <interface>

switch(config-if)# ip access-group 10 in

 

  1. Disable CDP (Cisco Discovery Protocol):

switch(config)# no cdp run

  1. Enable Port Security:

switch(config)# interface <interface>

switch(config-if)# switchport port-security

 

  1. Enable DHCP Snooping:

switch(config)# ip dhcp snooping

switch(config)# interface <interface>

switch(config-if)# ip dhcp snooping trust

 

9.Enable STP Protection:

switch(config)# spanning-tree portfast bpduguard default

 

  1. Implement VLAN Segmentation:

switch(config)# vlan <vlan-id>

switch(config-vlan)# name <vlan-name>

switch(config)# interface <interface>

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan <vlan-id>

 

 11. Enable Logging and Monitoring:

switch(config)# logging host <syslog-server-ip>

switch(config)# logging trap <severity-level>

switch(config)# logging buffer <buffer-size>

 

  1. Regularly Update Firmware:

Remember to customize the commands according to your network requirements and device configurations. It’s also important to regularly review and update your security measures to stay protected against emerging threats.

 

Exit mobile version