Lab - Securing The Router For Administrative Access: Integrantes
Lab - Securing The Router For Administrative Access: Integrantes
Lab - Securing The Router For Administrative Access: Integrantes
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 59
Lab - Securing the Router for Administrative Access
IP Addressing Table
Objectives
Part 1: Configure Basic Device Settings
Cable the network as shown in the topology.
Configure basic IP addressing for routers and PCs.
Configure OSPF routing.
Configure PC hosts.
Verify connectivity between hosts and routers.
Part 2: Control Administrative Access for Routers
Configure and encrypt all passwords.
Configure a login warning banner.
Configure enhanced username password security.
Configure an SSH server on a router.
Configure an SSH client and verify connectivity.
Configure an SCP server on a router.
Part 3: Configure Administrative Roles
Create multiple role views and grant varying privileges.
Verify and contrast views.
Part 4: Configure Cisco IOS Resilience and Management Reporting
Secure the Cisco IOS image and configuration files.
Configure SNMPv3 Security using an ACL.
Configure a router as a synchronized time source for other devices using NTP.
Configure Syslog support on a router.
Install a Syslog server on a PC and enable it.
Make changes to the router and monitor syslog results on the PC.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 59
Lab - Securing the Router for Administrative Access
Background / Scenario
The router is a critical component in any network. It controls the movement of data into and out of the network
and between devices within the network. It is particularly important to protect network routers because the
failure of a routing device could make sections of the network, or the entire network, inaccessible. Controlling
access to routers and enabling reporting on routers is critical to network security and should be part of a
comprehensive security policy.
In this lab, you will build a multi-router network and configure the routers and hosts. Use various CLI tools to
secure local and remote access to the routers, analyze potential vulnerabilities, and take steps to mitigate
them. Enable management reporting to monitor router configuration changes.
The router commands and output in this lab are from a Cisco 1941 router using Cisco IOS software, release
15.4(3)M2 (with a Security Technology Package license). Other routers and Cisco IOS versions can be used.
See the Router Interface Summary Table at the end of the lab to determine which interface identifiers to use
based on the equipment in the lab. Depending on the model of the router, the commands available and output
produced may vary from what is shown in this lab.
Note: Before you begin, ensure that the routers and the switches have been erased and have no startup
configurations.
Required Resources
3 Routers (Cisco 1941 with Cisco IOS Release 15.4(3)M2 image with a Security Technology Package
license)
2 Switches (Cisco 2960 or comparable) (Not Required)
2 PCs (Windows 7 or 8.1, SSH Client, Kiwi or Tftpd32 Syslog server)
Serial and Ethernet cables as shown in the topology
Console cables to configure Cisco networking devices
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 59
Lab - Securing the Router for Administrative Access
c. Configure a clock rate for routers with a DCE serial cable attached to their serial interface. R1 is shown
here as an example.
R1(config)# interface S0/0/0
R1(config-if)# clock rate 64000
d. To prevent the router from attempting to translate incorrectly entered commands as though they were
host names, disable DNS lookup. R1 is shown here as an example.
R1(config)# no ip domain-lookup
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 59
Lab - Securing the Router for Administrative Access
Step 3: Configure basic console, auxiliary port, and virtual access lines.
Note: Passwords in this task are set to a minimum of 10 characters but are relatively simple for the benefit of
performing the lab. More complex passwords are recommended in a production network.
a. Configure a console password and enable login for routers. For additional security, the exec-timeout
command causes the line to log out after 5 minutes of inactivity. The logging synchronous command
prevents console messages from interrupting command entry.
Note: To avoid repetitive logins during this lab, the exec-timeout command can be set to 0 0, which
prevents it from expiring. However, this is not considered a good security practice.
R1(config)# line console 0
R1(config-line)# password ciscocon
R1(config-line)# exec-timeout 5 0
R1(config-line)# login
R1(config-line)# logging synchronous
When you configured the password for the console line, what message was displayed?
______invalid password length – contain 10 to 25 characters. Password configuration
failed_____
b. Configure a new password of ciscoconpass for the console.
c. Configure a password for the AUX port for router R1.
R1(config)# line aux 0
R1(config-line)# password ciscoauxpass
R1(config-line)# exec-timeout 5 0
R1(config-line)# login
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 59
Lab - Securing the Router for Administrative Access
f. Enter privileged EXEC mode and issue the show run command. Can you read the enable secret
password? Explain.
No se visualiza la contraseña de enable, poruqe se ingreso el commando:
enable algorithm-type scrypt secret
Can you read the console, aux, and vty passwords? Explain.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 59
Lab - Securing the Router for Administrative Access
Si se visualiza, los password de console, vty y aux aún no se ha encriptado todas las
contraseñas, se puede utilizar el comando: service password encription
b. Issue the show run command. Can you read the console, aux, and vty passwords? Explain.
___No porque los password no se encuentran encriptados todavia______
At what level (number) is the default enable secret password encrypted? __5_____
At what level (number) are the other passwords encrypted? __7__
Which level of encryption is harder to crack and why?
__Se muestra 5 porque este algoritmo es mas fuerte que 7__
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 59
Lab - Securing the Router for Administrative Access
b. Set the vty lines to use the locally defined login accounts.
R1(config)# line vty 0 4
R1(config-line)# login local
c. From PC-A, telnet to R1 again.
PC-A> telnet 192.168.1.1
Were you prompted for a user account? Explain.
Si porque ya se configuran los commandos y lineas vty necesarios para iniciar un Telnet
d. Log in as user01 with a password of user01pass.
e. During the Telnet session to R1, access privileged EXEC mode with the enable command.
What password did you use?
__La clave secreta utilizada fue cisco12345___
f. For added security, set the AUX port to use the locally defined login accounts.
R1(config)# line aux 0
R1(config-line)# login local
g. End the Telnet session with the exit command.
Step 2: Configure a privileged user for login from the SSH client.
a. Use the username command to create the user ID with the highest possible privilege level and a secret
password.
R1(config)# username admin privilege 15 algorithm-type scrypt secret
cisco12345
Note: Usernames are not case sensitive by default. You will learn how to make usernames case sensitive
in Chapter 3.
b. Exit to the initial router login screen. Log in with the username admin and the associated password. What
was the router prompt after you entered the password?
_al utilizar un nivel de privilegio de 15 se activa el logging por defecto en el modo EXEC_
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 59
Lab - Securing the Router for Administrative Access
Step 5: Generate the RSA encryption key pair for the router.
The router uses the RSA key pair for authentication and encryption of transmitted SSH data.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 59
Lab - Securing the Router for Administrative Access
a. Configure the RSA keys with 1024 for the number of modulus bits. The default is 512, and the range is
from 360 to 2048.
R1(config)# crypto key generate rsa general-keys modulus 1024
The name for the keys will be: R1.ccnasecurity.com
R1(config)#
*Dec 16 21:24:16.175: %SSH-5-ENABLED: SSH 1.99 has been enabled
b. Issue the ip ssh version 2 command to force the use of SSH version 2.
R1(config)# ip ssh version 2
R1(config)# exit
Note: The details of encryption methods are covered in Chapter 7.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 59
Lab - Securing the Router for Administrative Access
Task 5: Research Terminal Emulation Client Software and Configure the SSH Client.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 59
Lab - Securing the Router for Administrative Access
d. Click Open.
e. In the PuTTY Security Alert window, click Yes.
f. Enter the admin username and password cisco12345 in the PuTTY window.
j. Open a PuTTY SSH session to the router from PC-A. Enter the user01 username and password
user01pass in the PuTTY window to try connecting for a user who does not have privilege level of 15.
If you were able to login, what was the prompt?
Si es possible establecer un logian a pesar que por defecto el Usuario 01 tiene un nivel
de privilegio de 1y no de 15
k. Use the enable command to enter privilege EXEC mode and enter the enable secret password
cisco12345.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 59
Lab - Securing the Router for Administrative Access
exit
Step 3: Use SCP command on R3 to pull the configuration file from R1.
a. Use SCP to copy the configuration file that you created in Step2a to R3.
R3# copy scp: flash:
Address or name of remote host []? 10.1.1.1
Source username [R3]? admin
Source filename []? R1-Config
Destination filename [R1-Config]? [Enter]
Password: cisco12345
!
2007 bytes copied in 9.056 secs (222 bytes/sec)
b. Verify that the file has been copied to R3’s flash.
R3# show flash
-#- --length-- -----date/time------ path
1 75551300 Feb 16 2015 15:21:38 +00:00 c1900-universalk9-mz.SPA.154-3.M2.bin
2 1338 Feb 16 2015 23:46:10 +00:00 pre_autosec.cfg
3 2007 Feb 17 2015 23:42:00 +00:00 R1-Config
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 17 of 59
Lab - Securing the Router for Administrative Access
Task 2: Create New Views for the Admin1, Admin2, and Tech Roles on R1 and R3.
Step 1: Create the admin1 view, establish a password, and assign privileges.
a. The admin1 user is the top-level user below root that is allowed to access this router. It has the most
authority. The admin1 user can use all show, config, and debug commands. Use the following
command to create the admin1 view while in the root view.
R1(config)# parser view admin1
R1(config-view)#
Note: To delete a view, use the command no parser view viewname.
b. Associate the admin1 view with an encrypted password.
R1(config-view)# secret admin1pass
R1(config-view)#
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 18 of 59
Lab - Securing the Router for Administrative Access
c. Review the commands that can be configured in the admin1 view. Use the commands ? command to
see available commands. The following is a partial listing of the available commands.
R1(config-view)# commands ?
RITE-profile Router IP traffic export profile command mode
RMI Node Config Resource Policy Node Config mode
RMI Resource Group Resource Group Config mode
RMI Resource Manager Resource Manager Config mode
RMI Resource Policy Resource Policy Config mode
SASL-profile SASL profile configuration mode
aaa-attr-list AAA attribute list config mode
aaa-user AAA user definition
accept-dialin VPDN group accept dialin configuration mode
accept-dialout VPDN group accept dialout configuration mode
address-family Address Family configuration mode
<output omitted>
d. Add all config, show, and debug commands to the admin1 view and then exit from view configuration
mode.
R1(config-view)# commands exec include all show
R1(config-view)# commands exec include all config terminal
R1(config-view)# commands exec include all debug
R1(config-view)# end
e. Verify the admin1 view.
R1# enable view admin1
Password: admin1pass
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 19 of 59
Lab - Securing the Router for Administrative Access
Step 2: Create the admin2 view, establish a password, and assign privileges.
a. The admin2 user is a junior administrator in training who is allowed to view all configurations but is not
allowed to configure the routers or use debug commands.
b. Use the enable view command to enable the root view, and enter the enable secret password
cisco12345.
R1# enable view
Password: cisco12345
c. Use the following command to create the admin2 view.
R1(config)# parser view admin2
R1(config-view)#
d. Associate the admin2 view with a password.
R1(config-view)# secret admin2pass
R1(config-view)#
e. Add all show commands to the view, and then exit from view configuration mode.
R1(config-view)# commands exec include all show
R1(config-view)# end
f. Verify the admin2 view.
R1# enable view admin2
Password: admin2pass
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 20 of 59
Lab - Securing the Router for Administrative Access
Step 3: Create the tech view, establish a password, and assign privileges.
a. The tech user typically installs end-user devices and cabling. Tech users are only allowed to use selected
show commands.
b. Use the enable view command to enable the root view, and enter the enable secret password
cisco12345.
R1# enable view
Password: cisco12345
c. Use the following command to create the tech view.
R1(config)# parser view tech
R1(config-view)#
d. Associate the tech view with a password.
R1(config-view)# secret techpasswd
R1(config-view)#
e. Add the following show commands to the view and then exit from view configuration mode.
R1(config-view)# commands exec include show version
R1(config-view)# commands exec include show interfaces
R1(config-view)# commands exec include show ip interface brief
R1(config-view)# commands exec include show parser view
R1(config-view)# end
f. Verify the tech view.
R1# enable view tech
Password: techpasswd
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 21 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 22 of 59
Lab - Securing the Router for Administrative Access
Task 1: Secure Cisco IOS Image and Configuration Files on R1 and R3.
The Cisco IOS resilient configuration feature enables a router to secure the running image and maintain a
working copy of the configuration. This ensures that those files can withstand malicious attempts to erase the
contents of persistent storage (NVRAM and flash). This feature secures the smallest working set of files to
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 23 of 59
Lab - Securing the Router for Administrative Access
preserve persistent storage space. No extra space is required to secure the primary Cisco IOS image file. In
this task, you configure the Cisco IOS Resilient Configuration feature.
Note: Cisco IOS resilient configuration feature is not available on the Cisco 1921 router.
Note: The output of the commands in this Task are for example purposes only. Your output will be different.
R1# dir
Directory of flash:/
Step 2: Secure the Cisco IOS image and archive a copy of the running configuration.
a. The secure boot-image command enables Cisco IOS image resilience, which hides the file from the dir
command and show commands. The file cannot be viewed, copied, modified, or removed using EXEC
mode commands. (It can be viewed in ROMMON mode.) When turned on for the first time, the running
image is secured.
R1(config)# secure boot-image
.Feb 11 25:40:13.170: %IOS_RESILIENCE-5-IMAGE_RESIL_ACTIVE: Successfully secured
running image
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 24 of 59
Lab - Securing the Router for Administrative Access
b. The secure boot-config command takes a snapshot of the router running configuration and securely
archives it in persistent storage (flash).
R1(config)# secure boot-config
.Feb 11 25:42:18.691: %IOS_RESILIENCE-5-CONFIG_RESIL_ACTIVE: Successfully secured
config archive [flash:.runcfg-20150211-224218.ar]
IOS image resilience version 15.4 activated at 25:40:13 UTC Wed Feb 11 2015
Secure archive flash: c1900-universalk9-mz.SPA.154-3.M2.bin type is image (elf)
[]
file size is 75551300 bytes, run size is 75730352 bytes
Runnable image, entry point 0x8000F000, run from ram
IOS configuration resilience version 15.4 activated at 25:42:18 UTC Wed Feb 11 2015
Secure archive flash:.runcfg-20150211-224218.ar type is config
configuration archive size 3293 bytes
What is the name of the archived running config file and on what is the name based?
_El archivo se llama runcfg-20190804-162506.ar_
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 25 of 59
Lab - Securing the Router for Administrative Access
Step 6: Verify that the Cisco IOS image is now visible in flash.
Use the show flash: command to display the files in flash.
R1# show flash:
-#- --length-- -----date/time------ path
1 75551300 Feb 5 2015 16:53:34 +00:00 c1900-universalk9-mz.SPA.154-3.M2.bin
2 0 Jan 6 2009 01:28:44 +00:00 ipsdir
3 334531 Jan 6 2009 01:35:40 +00:00 ipsdir/R1-sigdef-default.xml
4 461 Jan 6 2009 01:37:42 +00:00 ipsdir/R1-sigdef-delta.xml
5 8509 Jan 6 2009 01:33:42 +00:00 ipsdir/R1-sigdef-typedef.xml
6 38523 Jan 6 2009 01:33:46 +00:00 ipsdir/R1-sigdef-category.xml
7 304 Jan 6 2009 01:31:48 +00:00 ipsdir/R1-seap-delta.xml
8 491 Jan 6 2009 01:31:48 +00:00 ipsdir/R1-seap-typedef.xml
9 1410 Oct 26 2014 04:44:08 +00:00 pre_autosec.cfg
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 26 of 59
Lab - Securing the Router for Administrative Access
Step 1: Configure an ACL on R1 that will restrict access to SNMP on the 192.168.1.0 LAN.
a. Create a standard access-list named PERMIT-SNMP.
R1(config)# ip access-list standard PERMIT-SNMP
b. Add a permit statement to allow only packets on R1’s LAN.
R1(config-std-nacl)# permit 192.168.1.0 0.0.0.255
R1(config-std-nacl)# exit
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 27 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 28 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 29 of 59
Lab - Securing the Router for Administrative Access
b. Use the command show snmp user to view the SNMP user information.
Note: The snmp-server user command is hidden from view in the configuration for security reasons.
However, if you need to make changes to a SNMP user, you can issue the command no snmp-server
user to remove the user from the configuration, and then re-add the user with the new parameters.
R1# show snmp user
b. To set the time on the router, use the clock set time command.
R2# clock set 20:12:00 Dec 17 2014
R2#
*Dec 17 20:12:18.000: %SYS-6-CLOCKUPDATE: System clock has been updated from
01:20:26 UTC Mon Dec 15 2014 to 20:12:00 UTC Wed Dec 17 2014, configured from
console by admin on console.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 30 of 59
Lab - Securing the Router for Administrative Access
c. Configure NTP authentication by defining the authentication key number, hashing type, and password
that will be used for authentication. The password is case sensitive.
R2# config t
R2(config)# ntp authentication-key 1 md5 NTPpassword
d. Configure the trusted key that will be used for authentication on R2.
R2(config)# ntp trusted-key 1
e. Enable the NTP authentication feature on R2.
R2(config)# ntp authenticate
f. Configure R2 as the NTP master using the ntp master stratum-number command in global configuration
mode. The stratum number indicates the distance from the original source. For this lab, use a stratum
number of 3 on R2. When a device learns the time from an NTP source, its stratum number becomes one
greater than the stratum number of its source.
R2(config)# ntp master 3
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 31 of 59
Lab - Securing the Router for Administrative Access
f. Issue the debug ntp all command to see NTP activity on R1 as it synchronizes with R2.
R1# debug ntp all
NTP events debugging is on
NTP core messages debugging is on
NTP clock adjustments debugging is on
NTP reference clocks debugging is on
NTP packets debugging is on
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 32 of 59
Lab - Securing the Router for Administrative Access
Step 2: Configure R1 to log messages to the syslog server using the CLI.
a. Verify that you have connectivity between R1 and PC-A by pinging the R1 G0/1 interface IP address
192.168.1.1. If it is not successful, troubleshoot as necessary before continuing.
b. NTP was configured in Task 2 to synchronize the time on the network. Displaying the correct time and
date in syslog messages is vital when using syslog to monitor a network. If the correct time and date of a
message is not known, it can be difficult to determine what network event caused the message.
Verify that the timestamp service for logging is enabled on the router using the show run command. Use
the following command if the timestamp service is not enabled.
R1(config)# service timestamps log datetime msec
c. Configure the syslog service on the router to send syslog messages to the syslog server.
R1(config)# logging host 192.168.1.3
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 33 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 34 of 59
Lab - Securing the Router for Administrative Access
link up),
3 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
Logging to 192.168.1.3 (udp port 514, audit disabled,
link up),
3 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
Logging Source-Interface: VRF Name:
<output omitted>
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 35 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 36 of 59
Lab - Securing the Router for Administrative Access
b. Use the ip ospf authentication command to assign the key-chain to both serial interfaces on R2.
R2(config)# interface s0/0/0
R2(config-if)# ip ospf authentication key-chain NetAcad
R2(config)# interface serial 0/0/1
R2(config-if)# ip ospf authentication key-chain NetAcad
R2(config-if)#
Feb 17 21:36:25.114: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial0/0/0 from
LOADING to FULL, Loading Done
Feb 17 21:36:30.686: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on Serial0/0/1 from
LOADING to FULL, Loading Done
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 37 of 59
Lab - Securing the Router for Administrative Access
c. Issue the show ip route command to verify that all networks display in the routing table on all routers.
R3# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 38 of 59
Lab - Securing the Router for Administrative Access
b. Issue the auto secure command on R3 to lock down the router. R2 represents an ISP router, so assume
that R3 S0/0/1 is connected to the Internet when prompted by the AutoSecure questions. Respond to the
AutoSecure questions as shown in the following output. The responses are bolded.
R3# auto secure
--- AutoSecure Configuration ---
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 39 of 59
Lab - Securing the Router for Administrative Access
enterprise requirements.
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
Disabling mop on Ethernet interfaces
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 40 of 59
Lab - Securing the Router for Administrative Access
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 motd ^C Unaauthorized Access Prohibited ^C
security authentication failure rate 10 log
enable password 7 121A0C0411045A53727274
aaa new-model
aaa authentication login local_auth local
line console 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 2
login authentication local_auth
exec-timeout 15 0
login block-for 60 attempts 2 within 30
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 Embedded-Service-Engine0/0
no ip redirects
no ip proxy-arp
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 41 of 59
Lab - Securing the Router for Administrative Access
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
interface GigabitEthernet0/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
interface GigabitEthernet0/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
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
access-list 100 permit udp any any eq bootpc
interface Serial0/0/1
ip verify unicast source reachable-via rx allow-default 100
!
end
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 42 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 43 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 44 of 59
Lab - Securing the Router for Administrative Access
__
For each interface, the following were disabled:
No ip http server
No ip http secure.server
Reflection
1. Explain the importance of securing router access and monitoring network devices.
_Actualmente existe varias vulnerabilidades a las que los routers estan expuestasy este es
un tema importante y parte escencial del trabajo del administrador de la red _
2. What advantages does SSH have over Telnet?
_El uso de SSh es mas seguro que TELNET al momento de realizer un logging remoto_
3. How scalable is setting up usernames and using the local database for authentication?
_Al utilizar la base de datos del router local no se podria escalar a los otros dispositivos
debido a que seria necesario configurar los nombres de usuario en cada dispositivo, para lo
cual seria necesario la centralización del servidor _
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 45 of 59
Lab - Securing the Router for Administrative Access
4. Why it is better to have centralized logging servers rather than to have the routers only log locally?
_Una razon por la cual se podria centralizer un servidor para el logging seria la facilidad
para administrar y dar seguimiento a los eventos que podrian existir en la red, por ejemplo
en una gran empresa seria muy dificultoso dar un seguimiento individual a los routers __
5. What are some advantages to using AutoSecure?
_esta herramienta de seguridadnos puede ayudar a encontrar vulnerabilidades que los
administradores podrian no darse cuenta _
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
1800 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(F0/0) (F0/1)
1900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
2801 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
(F0/0) (F0/1)
2811 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(F0/0) (F0/1)
2900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An
example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be
used in Cisco IOS commands to represent the interface.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 46 of 59
Lab - Securing the Router for Administrative Access
ANEXOS
CONFIGURACION R1
R1#show run
Building configuration...
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 47 of 59
Lab - Securing the Router for Administrative Access
ethernet lmi ce
!
!
no ip domain lookup
ip domain name ccnasecurity.com
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
license udi pid CISCO2901/K9 sn FTX173780J9
license boot module c2900 technology-package securityk9
!
!
username user01 secret 9
$9$9UXWmfRlokvK7.$4i1F3KV4tNP1Ks4B/rsGZ6vWD4sflfKVaFvJoFw4Dqo
username admin privilege 15 secret 9
$9$ev2zznL0VcaHY.$pgJZ129//RmhYNEPxsS2rurflrNwLCdEKQRMfUUxPw2
secure boot-image
!
redundancy
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 48 of 59
Lab - Securing the Router for Administrative Access
!
interface Serial0/0/0
ip address 10.1.1.1 255.255.255.252
encapsulation ppp
clock rate 64000
!
interface Serial0/0/1
no ip address
clock rate 125000
!
router ospf 1
passive-interface GigabitEthernet0/1
network 10.1.1.0 0.0.0.3 area 0
network 192.168.1.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip ssh time-out 90
ip ssh authentication-retries 2
ip ssh version 2
ip scp server enable
!
ip access-list standard PERMIT-SNMP
permit 192.168.1.0 0.0.0.255
!
logging trap warnings
logging host 192.168.1.3
!
!
snmp-server group SNMP-G1 v3 priv read SNMP-RO access PERMIT-SNMP
snmp-server view SNMP-RO iso included
!
!
!
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 49 of 59
Lab - Securing the Router for Administrative Access
control-plane
!
!
banner motd ^CUnauthorized access strictly prohibited!^C
parser view admin1
secret 5 $1$kSAh$yet8uoSrWhIpTDJ/CnfYo0
commands exec include all configure terminal
commands exec include configure
commands exec include all show
commands exec include all debug
!
parser view admin2
secret 5 $1$Mrci$RhmkhnMC9MCEzj9zc4f/k/
commands exec include all show
!
parser view tech
secret 5 $1$nKXY$mz95m6/Yufrr5GqTxfP7F0
commands exec include show ip interface brief
commands exec include show ip interface
commands exec include show ip
commands exec include show version
commands exec include show parser view
commands exec include show parser
commands exec include show interfaces
commands exec include show
!
!
line con 0
password 7 060506324F410A160B0713181F
line aux 0
exec-timeout 5 0
password 7 05080F1C22434F1C0115160118
line 2
no activation-character
no exec
transport preferred none
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 50 of 59
Lab - Securing the Router for Administrative Access
stopbits 1
line vty 0 4
exec-timeout 5 0
privilege level 15
password 7 0822455D0A1613030B1B0D1739
transport input ssh
!
scheduler allocate 20000 1000
ntp authentication-key 1 md5 080F787E1918160405041E00 7
ntp authenticate
ntp trusted-key 1
ntp update-calendar
ntp server 10.1.1.2
!
end
CONFIGURACION R2
R2#show run
Building configuration...
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 51 of 59
Lab - Securing the Router for Administrative Access
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
cts logging verbose
!
license udi pid CISCO1941/K9 sn FTX154282PL
license boot module c1900 technology-package securityk9
!
!
username Branch3 password 0 cisco
username R3 password 0 cisco
!
redundancy
!
!
!
interface Loopback0
no ip address
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 200.126.13.103 255.255.255.128
duplex auto
speed auto
!
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 52 of 59
Lab - Securing the Router for Administrative Access
interface Serial0/0/0
description TO-R1
ip address 10.1.1.2 255.255.255.252
encapsulation ppp
ip ospf authentication key-chain NetAcad
!
interface Serial0/0/1
description TO-R3
ip address 10.2.2.2 255.255.255.252
encapsulation ppp
clock rate 64000
!
router ospf 1
redistribute static subnets
network 10.1.1.0 0.0.0.3 area 0
network 10.2.2.0 0.0.0.3 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 200.126.13.1
!
!
!
!
control-plane
!
!
banner exec ^C
!
line con 0
line aux 0
line 2
no activation-character
no exec
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 53 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 54 of 59
Lab - Securing the Router for Administrative Access
CONFIGURACION R3
R1#show run
Building configuration...
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 55 of 59
Lab - Securing the Router for Administrative Access
!
no ip domain lookup
ip domain name ccnasecurity.com
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
license udi pid CISCO2901/K9 sn FTX254785J4
license boot module c2900 technology-package securityk9
!
!
username user01 secret 9 $9$5KJYDTRjhdt7.$4i1F3KV4tNP1Ks4B/rsGZ6vWD4sflfKVaFvJoFw4Dqo
username admin privilege 15 secret 9
$9$ev2zznL0VcaHY.$pgJZ129//RmhYNEPxsS2rurflrNwLCdEKQRMfUUxPw2
secure boot-image
!
redundancy
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.3.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
description R2
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 56 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 57 of 59
Lab - Securing the Router for Administrative Access
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 58 of 59
Lab - Securing the Router for Administrative Access
password 7 0822455D0A1613030B1B0D1739
transport input ssh
!
scheduler allocate 20000 1000
ntp authentication-key 1 md5 080F787E1918160405041E00 7
ntp authenticate
ntp trusted-key 1
ntp update-calendar
ntp server 10.2.2.2
!
end
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 59 of 59