Module 6 Securing Network Devices
Module 6 Securing Network Devices
Port Security
LinkedIn: https://fr.linkedin.com/in/ccie35565
Blog : http://www.connectic.net/blog
Anyone can connect to the network!
Secure Unused Ports
You’re in!!
• By default, routers and switches do not
perform security checks against any device
that connects to them.
• By default, routers and switches will forward
any frame/packet received on an interface if:
§ The appropriate protocol is enabled on the ingress
interface
§ The appropriate forwarding tables or trees exist
Limiting Switch Access
§ The MAC addresses of legitimate devices are allowed access, while
other MAC addresses are denied.
§ Any additional attempts to connect by unknown MAC addresses
generate a security violation.
§ Secure MAC addresses can be configured in a number of ways:
§ Static secure MAC addresses – manually configured and added to
running configuration - switchport port-security mac-
address mac-address
§ Dynamic secure MAC addresses – removed when switch restarts
§ Sticky secure MAC addresses – added to running configuration and
learned dynamically - switchport port-security mac-
address sticky interface configuration mode command
Port-Security Violations Modes
§ IOS considers a security violation when:
§ The maximum number of secure MAC addresses for that interface have
been added to the CAM, and a station whose MAC address is not in the
address table attempts to access the interface.
§ There are three possible actions to take when a violation is
detected:
§ Protect – no notification received
§ Restrict – notification received of security violation
§ Shutdown
§ switchport port-security
violation {protect | restrict |shutdown} interface
configuration mode command
Port-Security Violations Modes
Port Security: Configuring
Port Security: Verifying
Port Security: Verifying
Ports in Error Disabled State
§ A port security violation can put a switch in error disabled state.
§ A port in error disabled is effectively shutdown.
§ The switch communicates these events through console messages.
Ports in Error Disabled State
A shutdown or no shutdown
interface configuration mode
command must be issued to re-
enable the port.
Module 6: SECURING NETWORK DEVICES
Switch Security
LinkedIn: https://fr.linkedin.com/in/ccie35565
Blog : http://www.connectic.net/blog
Vlan Hopping Attack
• A vlan hopping attack can be launched by spoofing DTP
messages from the attacking host to cause the switch
to enter in trunking mode
Double-Tagging Attack
• Double-tagging attack takes advantage of the way that
hardware on most switches de-encapsulate 802.1Q tags.
• Most switches perform only one level of 802.1Q de-
encapsulation, allowing an attacker to embed a second,
unauthorized attack header in the frame.
• After removing the first and legit 802.1Q header, the switch
forwards the frame to the VLAN specified in the
unauthorized 802.1Q header.
• The best approach to mitigating double-tagging attacks is to
ensure that the native VLAN of the trunk ports is different
from the VLAN of any user ports.
Double-Tagging Attack
Design Best Practices for VLANs
• Move all ports from VLAN 1 and assign them to a not-in-use VLAN
• Shut down all unused switch ports.
• Separate management and user data traffic.
• Change the management VLAN to a VLAN other than VLAN 1. (The
same goes to the native VLAN.)
• Ensure that only devices in the management VLAN can connect to
the switches.
• The switch should only accept SSH connections.
• Disable auto negotiation on trunk ports.
• Do not use the auto or desirable switch port modes.
Module 6: SECURING NETWORK DEVICES
DHCP SNOOPING
LinkedIn: https://fr.linkedin.com/in/ccie35565
Blog : http://www.connectic.net/blog
DHCP Snooping
DHCP Snooping Terminology
DHCP Snooping Operation
• DHCP Client messages only allowed from Untrusted to
Trusted ports
§ DHCP Discover
§ DHCP Request / Inform
§ DHCP Decline
§ DHCP Release
LinkedIn: https://fr.linkedin.com/in/ccie35565
Blog : http://www.connectic.net/blog
What is AAA?
• Authentication, Authorization, & Accounting
• Bundles Authentication/Authorization
AAA IOS Configuration Guidelines
• AAA is not enabled by default for any Cisco IOS
features.
• NAS (router, switch, AP) is considered as a
Client of the AAA Server
§ Password (key) used to validate NAS to AAA Server
NAS(config)#aaa new-model
NAS(config)#tacacs-server host 5.5.5.5 key XXX
or…
NAS(config)#radius-server host 5.5.5.5 key XXX
NAS(config)#aaa new-model
NAS(config)#radius-server host 5.5.5.5
NAS(config)#radius-server host 7.7.7.7
NAS(config)#radius-server key XXX
NAS-to-Server: Initial IOS Configuration
LinkedIn: https://fr.linkedin.com/in/ccie35565
Blog : http://www.connectic.net/blog
Access-List Overview
• Packet identification mechanism
• Extended ACL
• Named ACL
§ Standard Named
§ Extended Named
Standard ACL
• Identifies traffic based on Layer-3 header
• Verification commands
§ Router# show ip access-list
§ Router# show run | inc access-list
Pairing ACLs with IP Access-Groups
• IP Access-Group
§ Interface-level Security feature
• Configuration command
§ Router(config-if)# ip access-group <ACL id> <in | out>
Extended ACL
• Filters traffic based on Layer-3 and 4 header
• Verification commands
§ Router# show ip access-list
§ Router# show run | inc access-list
Named ACL
• Individual statements can be edited, unlike
numbered ACLs
• Can be used with naming convention
• Applying configuration
§ Router(config-if)# ip access-group <name> <in | out>
Configuring Extended Named ACL
• Configuration commands
§ Router(config)# ip access-list extended
<name>
§ Router(config-ext-acl)#<permit | deny>
<protocol> source-address> <wildcard mask>
<destination-address> wildcard mask>
• Applying configuration
§ Router(config-if)# ip access-group <name>
<in | out>
IPv6 Access-Lists
• When used for traffic filtering, IPv6 Access
Control Lists (ACL) offers the following
functions:
§ Can filter traffic based on source and destination
address.
§ Can filter traffic inbound or outbound on a specific
interface.
§ Can re-order sequences of ACEs