Autosec Switch
Autosec Switch
Using AutoSecure
This chapter describes how to use the AutoSecure function in Cisco IOS Software Release 12.2SX.
Release 12.2(33)SXH and later releases support the AutoSecure function.
Note For complete syntax and usage information for the commands used in this chapter, see the Cisco IOS
Software Releases 12.2SX Command References at this URL:
http://www.cisco.com/en/US/docs/ios/mcl/122sx_mcl.html
Understanding AutoSecure
You can easily secure the switch without understanding all the security capabilities of the switch by
using the AutoSecure feature. AutoSecure is a simple security configuration process that disables
nonessential system services and enables a basic set of recommended security policies to ensure secure
networking services.
Caution Although AutoSecure helps to secure a switch, it does not guarantee the complete security of the switch.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-1
Chapter 41 Using AutoSecure
Understanding AutoSecure
Benefits of AutoSecure
AutoSecure provides a variety of mechanisms to enhance security of the switch.
Caution If your device is managed by a network management (NM) application, securing the management plane
could turn off some services such as the HTTP server and disrupt the NM application support.
The following sections define how AutoSecure helps to secure the management plane:
• Disables Global Services, page 41-3
• Disables Per-Interface Services, page 41-3
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-2 OL-13013-02
Chapter 41 Using AutoSecure
Understanding AutoSecure
Note If you are using Security Device Manager (SDM), you must manually enable the HTTP server
using the ip http server command.
• Identification service—An unsecure protocol (defined in RFC 1413) that allows an external host to
query a TCP port for identification. An attacker can access private information about the user from
the ID server.
• CDP—If a large number of Cisco Discovery Protocol (CDP) packets are sent to the switch, the
available memory of the switch can be consumed, which causes the switch to crash.
Note NM applications that use CDP to discover network topology will not be able to perform
discovery.
• NTP—Without authentication or access control, Network Time Protocol (NTP) is insecure and can
be used by an attacker to send NTP packets to crash or overload the switch.
If you require NTP, you must configure NTP authentication using Message Digest 5 (MD5) and the
ntp access-group command. If NTP is enabled globally, disable it on all interfaces on which it is
not needed.
• Source routing—Source routing is provided only for debugging purposes, and should be disabled in
all other cases. Otherwise, packets may avoid some of the access control mechanisms of the switch.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-3
Chapter 41 Using AutoSecure
Understanding AutoSecure
• ICMP mask reply messages—Disabled on all interfaces. ICMP mask reply messages can give an
attacker the subnet mask for a particular subnetwork in the internetwork.
• Proxy-arp—Disabled on all interfaces. Proxy-arp requests are a known method for DoS attacks
because the available bandwidth and resources of the switch can be consumed in an attempt to
respond to the repeated requests sent by an attacker.
• Directed broadcast—Disabled on all interfaces. Potential cause of SMURF attacks for DoS.
• Maintenance Operations Protocol (MOP) service—Disabled on all interfaces.
Caution If your device is managed by an NM application, securing access to the switch could turn off vital
services and may disrupt the NM application support.
AutoSecure will make the following options available for securing access to the switch:
• If a text banner does not exist, you will be prompted to add a banner. This feature provides the
following sample banner:
Authorized access only
This system is the property of ABC Enterprise
Disconnect IMMEDIATELY if you are not an authorized user!
Contact [email protected] +1 408 5551212 for help.
• The login and password (preferably a secret password, if supported) are configured on the console,
AUX, vty, and tty lines. The transport input and transport output commands are also configured
on all of these lines. (Telnet and secure shell (SSH) are the only valid transport methods.) The
exec-timeout command is configured on the console and AUX as 10.
• When the image on the device is a crypto image, AutoSecure enables SSH and secure copy (SCP)
for access and file transfer to and from the switch. The timeout seconds and authentication-retries
integer options for the ip ssh command are configured to a minimum number. (Telnet and FTP are
not affected by this operation and remain operational.)
• If the user specifies that the switch does not use Simple Network Management Protocol (SNMP),
one of the following functionalities will occur:
– In interactive mode, the user is asked whether to disable SNMP regardless of the values of the
community strings, which act like passwords to regulate access to the agent on the switch.
– In noninteractive mode, SNMP will be disabled if the community string is public or private.
Note After AutoSecure has been enabled, tools that use SNMP to monitor or configure a device will
be unable to communicate with the device using SNMP.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-4 OL-13013-02
Chapter 41 Using AutoSecure
Understanding AutoSecure
• If strict Unicast Reverse Path Forwarding (uRPF) is available, it can be configured on the switch to
help mitigate problems that are caused by the introduction of forged (spoofed) IP source addresses.
uRPF discards IP packets that lack a verifiable IP source address.
• Hardware rate limiting—AutoSecure will enable hardware rate-limiting of the following types of
traffic without prompting the user:
– IP errors
– RPF failures
– ICMP no-route messages
– ICMP acl-drop messages
– IPv4 multicast FIB miss messages
– IPv4 multicast partially switch flow messages
AutoSecure will provide the option for hardware rate-limiting of the following types of traffic:
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-5
Chapter 41 Using AutoSecure
Configuring AutoSecure
– ICMP redirects
– TTL failures
– MTU failures
– IP unicast options
– IP multicast options
– Ingress and egress ACL bridged packets
Note Rate-limiting of ingress and egress ACL bridged packets can interfere with ACL logging and
can increase session setup rates for hardware accelerated features such as NAT, Layer 3
WCCP, and TCP intercept.
Configuring AutoSecure
These sections describe how to configure AutoSecure:
• Using the AutoSecure Command, page 41-6
• Configuring Additional Security, page 41-8
• Verifying AutoSecure, page 41-8
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-6 OL-13013-02
Chapter 41 Using AutoSecure
Configuring AutoSecure
This command also allows you to go through all noninteractive configuration portions of the session
before the interactive portions. The noninteractive portions of the session can be enabled by selecting
the optional no-interact keyword.
The AutoSecure session will request the following information from you:
• Is the device going to be connected to the Internet?
• How many interfaces are connected to the Internet?
• What are the names of the interfaces connected to the Internet?
• What will be your local username and password?
• What will be the switch hostname and domain name?
At any prompt you may enter a question mark (?) for help or Ctrl-C to abort the session.
In interactive mode, you will be asked at the end of the session whether to commit the generated
configuration to the running configuration of the switch. In noninteractive mode, the changes will be
automatically applied to the running configuration.
Note There is no undo command for configuration changes made by AutoSecure. You should always save the
running configuration before executing the auto secure command.
To execute the AutoSecure configuration process, beginning in privileged EXEC mode, perform this
task:
Command Purpose
Router# auto secure [management | forwarding] Executes the AutoSecure session for configuring one or
[no-interact | full] both planes of the switch.
• management—Only the management plane will be
secured.
• forwarding—Only the forwarding plane will be
secured.
• no-interact—The user will not be prompted for any
interactive configurations.
• full—The user will be prompted for all interactive
questions. This is the default.
For an example of the AutoSecure session, see the “AutoSecure Configuration Example” section on
page 41-9.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-7
Chapter 41 Using AutoSecure
Configuring AutoSecure
The following example shows how to configure the switch for a minimum password length of 10
characters and a threshold of 3 password failures in one minute. The example also shows how to set a
hidden local password.
Router# configure terminal
Router(config)# security passwords min-length 10
Router(config)# security authentication failure rate 3
Router(config)# enable password 7 elephant123
Verifying AutoSecure
To verify that the AutoSecure feature has executed successfully, perform this task:
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-8 OL-13013-02
Chapter 41 Using AutoSecure
AutoSecure Configuration Example
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-9
Chapter 41 Using AutoSecure
AutoSecure Configuration Example
Maximum time period for crossing the failed login attempts (in seconds): ?
% A decimal number between 1 and 32767.
Maximum time period for crossing the failed login attempts (in seconds): 5
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-10 OL-13013-02
Chapter 41 Using AutoSecure
AutoSecure Configuration Example
Would you like to enable the rate-limiters for Ingress/EgressACL bridged packets also?
NOTE: Enabling the ACL in/out rate-limiters can affect ACL logging
and session setup rate for hardware accelerated features such
as NAT, Layer 3 WCCP and TCP Intercept
mls rate-limit unicast acl input 100 10
mls rate-limit unicast acl output 100 10
no service finger
no service pad
no service udp-small-servers
no service tcp-small-servers
service password-encryption
service tcp-keepalives-in
service tcp-keepalives-out
no cdp run
no ip bootp server
no ip http server
no ip finger
no ip source-route
no ip gratuitous-arps
no ip identd
banner k
banner
k
security passwords min-length 6
security authentication failure rate 10 log
enable secret 5 $1$30kP$f.KDndYPz/Hv/.yTlJStN/
enable password 7 08204E4D0D48574446
username cisco password 7 08204E4D0D48574446
aaa new-model
aaa authentication login local_auth local
line console 0
login authentication local_auth
exec-timeout 5 0
transport output telnet
line vty 0 15
login authentication local_auth
transport input telnet
login block-for 5 attempts 3 within 5
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
logging facility local2
logging trap debugging
service sequence-numbers
logging console critical
logging buffered
int Vlan1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
int Vlan77
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 41-11
Chapter 41 Using AutoSecure
AutoSecure Configuration Example
no mop enabled
int GigabitEthernet6/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
int GigabitEthernet6/2
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
interface Vlan77
ip verify unicast source reachable-via rx
mls rate-limit unicast ip icmp redirect 100 10
mls rate-limit all ttl-failure 100 10
mls rate-limit all mtu-failure 100 10
mls rate-limit unicast ip options 100 10
mls rate-limit multicast ipv4 ip-options 100 10
!
end
Router#
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
41-12 OL-13013-02