Lab 5.2 Securing A Router With Cisco Autosecure: Learning Objectives
Lab 5.2 Securing A Router With Cisco Autosecure: Learning Objectives
Lab 5.2 Securing A Router With Cisco Autosecure: Learning Objectives
Topology Diagram
Scenario
Configure the R1 physical interface using the IP address shown in the topology
diagram. You can force the interface into an “always up” state using the
interface-level no keepalive command. Then use the no shutdown command
to bring the interface up. Because you disabled keepalives, the interface status
will display as link state (Layer 1) and line protocols state (Layer 2) “up,” even if
it is not connected to an external device.
R1(config)# interface fastethernet0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no keepalive
R1(config-if)# no shutdown
Normally, you would not use the no keepalive command on a routed interface.
At the privileged EXEC prompt, issue the auto secure command to start
AutoSecure. You may notice that this command is hidden from the Cisco IOS
in-line help system. It is hidden because AutoSecure can lock out network
1-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
administrators if executed by a user who has gained unauthorized access to a
router. AutoSecure is a command-line wizard that enables a set of features in
the router’s configuration. Its function is similar to SDM one-step lockdown;
however, its functionality is text-based and more interactive.
R1# auto secure
--- AutoSecure Configuration ---
Use the default of no to answer the question “Is this router connected to
internet?” To enter in a default (the value in the square brackets), press Enter
on your keyboard. After Enter is pressed, AutoSecure executes some
prepackaged security precaution commands. These are commands that disable
services that are typically not needed. AutoSecure also enables several
security features.
Is this router connected to internet? [no]: no
What is the function of each of the following system services and IP servers?
1. Finger
2-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
3. UDP small servers
4. Password encryption
5. TCP keepalives
6. CDP
7. BOOTP Server
8. HTTP Server
9. Gratuitous ARP
The following prompt appears, requesting that you create a security banner:
Here is a sample Security Banner to be shown
at every access to device. Modify it to suit your
enterprise requirements.
3-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
in the field, the message context will terminate. In the example below, the tilde
character (~) is used as the delimiter.
If you have not previously configured enable passwords and enable secrets, or
if both the enable pass and the enable secret password are the same,
AutoSecure will force you to create them. AutoSecure also enforces a 6-
character minimum length on passwords, so create them based on that
requirement. This lab will use “password” for the enable password and “secret”
for the enable secret to meet the minimum length practices.
Enable secret is either not configured or
is the same as enable password
Enter the new enable secret: secret
Confirm the enable secret : secret
Enter the new enable password: password
Confirm the enable password: password
Create a new user in the local user database, because AutoSecure enables
AAA and uses local authentication. Use a username and password of
“ciscouser”.
Configuration of local user database
Enter the username: ciscouser
Enter the password: ciscouser
Confirm the password: ciscouser
Configuring AAA local authentication
Configuring Console, Aux and VTY lines for
local authentication, exec-timeout, and transport
The router will also enable some login enhancements, which it will need some
parameters for. Use a blocking period of 10 seconds, a maximum failure
number of 5, and a maximum time period for crossing failed login attempts of
10.
Securing device against Login Attacks
Configure the following parameters
The router will configure a Secure Shell (SSH) server, which will require a
domain name. Use “cisco.com” as the domain name.
Configure SSH server? [yes]: yes
Enter the domain-name: cisco.com
4-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
AutoSecure disables some unneeded or potentially vulnerable services on each
physical interface. You are prompted to enable Context-Based Access Control
and TCP intercept. For this lab, type no to not configure these services.
Configuring interface specific AutoSecure services
Disabling the following ip services on all interfaces:
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
Disabling mop on Ethernet interfaces
Enabling CEF (This might impact the memory requirements for your platform)
Enabling unicast rpf on all interfaces connected
to internet
From your reading, what function does “enabling unicast rpf on all interfaces
connected to the internet” serve?
The last step AutoSecure does is verify the configuration that it is going to add.
After AutoSecure shows you the running configuration it has generated,
AutoSecure asks you to verify that you want to apply the running configuration.
Use the default of yes.
This is the configuration generated:
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
5-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
no ip finger
no ip source-route
no ip gratuitous-arps
no ip identd
banner motd ^CCCNP Router
UNAUTHORIZED ACCESS PROHIBITED^C
security passwords min-length 6
security authentication failure rate 10 log
enable secret 5 $1$d7wX$kb5JYyFOQmSRWVpW8iitA.
enable password 7 095C4F1A0A1218000F
username ciscouser password 7 02050D4808091A32495C
aaa new-model
aaa authentication login local_auth local
line con 0
login authentication local_auth
exec-timeout 5 0
transport output telnet
line aux 0
login authentication local_auth
exec-timeout 10 0
transport output telnet
line vty 0 4
login authentication local_auth
transport input telnet
line tty 1
login authentication local_auth
exec-timeout 15 0
login block-for 10 attempts 5 within 10
ip domain-name cisco.com
crypto key generate rsa general-keys modulus 1024
ip ssh time-out 60
ip ssh authentication-retries 2
line vty 0 4
transport input ssh telnet
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
interface FastEthernet0/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
interface FastEthernet0/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
interface Serial0/0/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
interface Serial0/0/1
no ip redirects
6-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
interface Serial0/1/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
interface Serial0/1/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
ip cef
access-list 100 permit udp any any eq bootpc
!
end
When the router asks you to accept this configuration so it can be applied to the
router, answer yes.
Apply this configuration to running-config? [yes]: yes
How does the router generate the name for the public crypto keys shown in the
preceding configuration text?
Final Configuration
R1# show run
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname R1
!
security authentication failure rate 10 log
security passwords min-length 6
logging buffered 4096 debugging
logging console critical
7-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc
enable secret 5 $1$d7wX$kb5JYyFOQmSRWVpW8iitA.
enable password 7 095C4F1A0A1218000F
!
aaa new-model
!
aaa authentication login local_auth local
!
no ip source-route
no ip gratuitous-arps
!
ip cef
!
no ip bootp server
ip domain name cisco.com
ip ssh time-out 60
ip ssh authentication-retries 2
login block-for 10 attempts 5 within 10
!
username ciscouser password 7 02050D4808091A32495C
archive
log config
logging enable
!
interface FastEthernet0/0
ip address 192.168.10.1 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
no keepalive
no mop enabled
no shutdown
!
no ip http server
no ip http secure-server
!
logging trap debugging
logging facility local2
access-list 100 permit udp any any eq bootpc
no cdp run
!
banner motd ^CCCNP Router
UNAUTHORIZED ACCESS PROHIBITED^C
!
line con 0
exec-timeout 5 0
login authentication local_auth
transport output telnet
line aux 0
exec-timeout 15 0
login authentication local_auth
transport output telnet
line vty 0 4
login authentication local_auth
transport input telnet ssh
end
8-8 CCNP: Implementing Secure Converged Wide-area Networks v5.0 - Lab 5-2 Copyright © 2007, Cisco Systems, Inc