Configure Cisco Routers: Syslog, NTP, SSH
Configure Cisco Routers: Syslog, NTP, SSH
Addressing Table
Objectives
• Configure OSPF MOS authentication.
• Configure NTP.
1|Page
• Configure routers to log messages to the syslog server.
Background / Scenario
In this activity, you will configure OSPF MOS authentication for secure routing updates.
The NTP Server is the master NTP server in this activity. You will configure
authentication on the NTP server and the routers. You will configure the routers to
allow the software clock to be synchronized by NTP to the time server. Also, you
will configure the routers to periodically update the hardware clock with the time
learned from NTP.
The Syslog Server will provide message logging in this activity. You will configure
the routers to identify the remote host (Syslog server) that will receive logging
messages.
You will need to configure timestamp service for logging on the routers.
Displaying the correct time and date in Syslog messages is vital when using
Syslog to monitor a network.
You will configure R3 to be managed securely using SSH instead of Telnet. The
servers have been preconfigured for NTP and Syslog services respectively. NTP
will not require authentication. The routers have been pre-configured with the
following passwords:
Note: Note: MD5 is the strongest encryption supported in the version of Packet Tracer
used to develop this activity (v6.2). Although MD5 has known vulnerabilities, you
should use the encryption that meets the security requirements of your organization.
In this activity, the security requirement specifies MD5.
Part 1: Configure OSPF MD5 Authentication
Step 1: Test connectivity. All devices should be able to ping all other IP
2|Page
addresses.
Step 2: Configure OSPF MDS authentication for all the routers in area 0.
Configure OSPF MD5 authentication for all the routers in area 0.
Step 3: Configure the MDS key for all the routers in area 0. Configure an MD5 key
on the serial interfaces on R1, R2 and R3. Use the password MD5pa55 for key 1.
Rl(config)# interface s0/0/0
Rl(config-if)# ip ospf message-digest-key 1 md5 MD5pa55
a. Verify the MD5 authentication configurations using the commands show ip ospf interface
a. On PC-A, click NTP under the Services tab to verify NTP service is enabled.
b. To configure NTP authentication, click Enable under Authentication. Use key 1 and
password NTPpa55
for authentication.
3|Page
Step 2: Configure R1, R2, and R3 as NTP clients.
Rl(config)# ntp server [Link]
Exit global configuration and verify that the hardware clock was updated using the command
show clock.
Step 4: Configure NTP authentication on the routers. Configure NTP
authentication on R1, R2, and R3 using key 1 and password NTPpa55.
Rl(config)# ntp authenticate
4|Page
routers. Rl(config)# service timestamps
log datetime msec R2(config)# service
timestamps log datetime msec
R3(config)# service timestamps log datetime msec
Step 1: Configure the routers to identify the remote host (Syslog Server) that will
receive logging messages.
Rl(config)# logging host
[Link] R2(config)#
logging host [Link]
R3(config)# logging host
[Link]
The router console will display a message that logging has started.
5|Page
R3(config)# ip domain-name [Link]
Create a user ID of SSHadmin with the highest possible privilege level and a secret
password of
ciscosshpa55.
R3(config)# username SSHadmin privilege 15 secret ciscosshpa55
Step 3: Configure the incoming vty lines on R3. Use the local user
accounts for mandatory login and validation. Accept only SSH
connections.
R3(config)# line vty O 4
R3(config-line)# login local
R3(config-line)# transport input ssh
Note: If no keys exist, you might receive this message: % No Signature RSA
Keys found in configuration.
The router uses the RSA key pair for authentication and encryption of transmitted
SSH data. Configure the RSA keys with a modulus of 1024. The default is 512,
and the range is from 360 to 2048.
R3(config)# crypto key generate rsa
The name for the keys will be: [Link]
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than
512 may take a few minutes.
Note: The command to generate RSA encryption key pairs for R3 in Packet
6|Page
Tracer differs from those used in the lab.
Use the show ip ssh command to see the current settings. Verify that the
authentication timeout and retries are at their default values of 120 and 3.
Issue the show ip ssh command again to confirm that the values have been changed.
Open the Desktop of PC-C. Select the Command Prompt icon. From PC-C, enter the
command to connect to
R3 via Telnet.
PC> telnet [Link]
This connection should fail because R3 has been configured to accept only SSH
connections on the virtual terminal lines.
Open the Desktop of PC-C. Select the Command Prompt icon. From PC-C, enter
the command to connect to R3 via SSH. When prompted for the password, enter
the password configured for the administrator ciscosshpa55.
PC> ssh -1 SSHadmin [Link]
To troubleshoot and maintain R3, the administrator at the ISP must use SSH to
access the router CU. From the CU of R2, enter the command to connect to R3
7|Page
via SSH version 2 using the SSHadmin user account. When prompted for the
password, enter the password configured for the administrator: ciscosshpa55.
R2# ssh -v 2 -1 SSHadmin [Link]
Your completion percentage should be 100%. Click Check Results to view the
feedback and verification of which required components have been completed.
8|Page
Practical 2:
Configure AAA Authentication on Cisco
Routers
Topology
9|Page
Addressing Table
Objectives
.Configure a local user account on R1 and configure authenticate on the
console and vty lines using local
AAA.
.
Verify local AAA authentication from the R1 console and the PC-A client.
Background / Scenario
The network topology shows routers R1, R2 and R3. Currently, all administrative
security is based on knowledge of the enable secret password. Your task is to
10 | P a g e
configure and test local and server-based AAA solutions.
You will create a local user account and configure local AAA on router R1 to test the
console and vty logins.
Finally, you will configure router R3 to support server-based authentication using the
RADIUS protocol. The RADIUS server has been pre-configured with the following:
Note: The console and vty lines have not been pre-configured.
Note: IOS version 15.3 uses SCRYPT as a secure encryption hashing algorithm;
however, the IOS version that is currently supported in Packet Tracer uses MD5.
Always use the most secure option available on your equipment.
11 | P a g e
• Ping from PC-B to PC-C.
Enable AAA on R1 and configure AAA authentication for the console login to use the local
database.
Rl(config)# aaa new-model
Step 4: Configure the line console to use the defined AAA authentication method.
Enable AAA on R1 and configure AAA authentication for the console login to
use the default method list.
Rl(config)# line console 0
Rl(config-line)# login authentication default
Rl con0 is now
available Press
RETURN to get
started.
************ AUTHORIZED ACCESS
ONLY************* UNAUTHORIZED ACCESS
TO THIS DEVICE IS PROHIBITED.
12 | P a g e
Part 2: Configure Local AAA Authentication for vty Lines on R1
Step 1: Configure domain name and crypto key for use with SSH.
Step 2: Configure a named list AAA authentication method for the vty
lines on R1.
Configure a named list called SSH-LOGIN to authenticate logins using local AAA.
Step 3: Configure the vty lines to use the defined AAA authentication method.
Configure the vty lines to use the named AAA method and only allow SSH for remote
access.
Rl(config)# line vty 0 4
Rl(config-line)# login authentication
SSH-LOGIN Rl(config-line)# transport
input ssh Rl(config-line)# end
Verify the SSH configuration SSH to R1 from the command prompt of PC-A..
PC> ssh -1 Adminl [Link]
Oen
Password: adminlpa55
13 | P a g e
For backup purposes, configure a local username of Admin2 and a secret password of
admin2pa55.
R2(config)# username Admin2 secret admin2pa55
Click the TACACS+ Server. On the Services tab, click AAA. Notice that there
is a Network configuration entry for R2 and a User Setup entry for Admin2.
Configure the AAA TACACS server IP address and secret key on R2.
Note: The commands tacacs-server host and tacacs-server key are deprecated.
Currently, Packet Tracer does not support the new command tacacs server.
R2(config)# tacacs-server host [Link]
R2(config)# tacacs-server key tacacspa55
Enable AAA on R2 and configure all logins to authenticate using the AAA
TACACS+ server. If it is not available, then use the local database.
Step 5: Configure the line console to use the defined AAA authentication method.
Configure AAA authentication for console login to use the default AAA authentication
method.
R2(config)# line console 0
R2(config-line)# login authentication default
Verify the user EXEC login using the AAA TACACS+ server.
14 | P a g e
R2(config-line)# end
%SYS-5-CONFIG I: Configured from
console by console R2# exit
R2 con0 is now
available Press
RETURN to get
started.
************ AUTHORIZED ACCESS
ONLY************* UNAUTHORIZED ACCESS
TO THIS DEVICE IS PROHIBITED.
For backup purposes, configure a local username of Admin3 and a secret password of
admin3pa55.
R3(config)# username Admin3 secret admin3pa55
Click the RADIUS Server. On the Services tab, click AAA. Notice that there is
a Network configuration entry for R3 and a User Setup entry for Admin3.
Configure the AAA RADIUS server IP address and secret key on R3.
Note: The commands radius-server host and radius-server key are deprecated.
Currently Packet Tracer does not support the new command radius server.
R3(config)# radius-server host [Link]
R3(config)# radius-server key radiuspa55
Enable AAA on R3 and configure all logins to authenticate using the AAA
15 | P a g e
RADIUS server. If it is not available, then use the local database.
R3(config)# aaa new-model
R3(config)# aaa authentication login default group radius local
Step 5: Configure the line console to use the defined AAA authentication method.
Configure AAA authentication for console login to use the default AAA authentication
method.
R3(config)# line console 0
Your completion percentage should be 100%. Click Check Results to see feedback
and verification of which required components have been completed.
16 | P a g e
!!!Script for R1
!!!Part 1 config t username Adminl
secret adminlpaSS
aaa new-model aaa
authentication login default local line console 0
login authentication default
! ! !Part 2
ip domain-name [Link]
crypto key generate rsa
1024
aaa authentication login SSH-LOGIN local line vty 0 4
loginauthenticationSSHtransut ssli
conf t
username Admin2 secret admin2pa55
tacacs-server host [Link]
tacacs-server key tacacspa55 aaa new-model
aaa authentication login default group tacacs+ local
line console 0 login authentication default
!!!!Script for R3
conf t username Admin3 secret admin3pa55 radius- server host
[Link]
radius-server key radiuspa55 aaa new-model aaa authentication login
default group radius local line console O login authentication
default
17 | P a g e
Practical 3:
Configuring Extended ACLs
Topology
Addressing Table
Objectives
Part 1: Configure, Apply and Verify an Extended Numbered ACL
Background / Scenario
Two employees need access to services provided by the server. PC1 needs
only FTP access while PC2
18 | P a g e
needs only web access. Both computers are able to ping the server, but not
each other.
d. This ACL permits FTP and ICMP. ICMP is listed above, but FTP is
not, because FTP uses TCP.
Therefore. enter tcp to further refine the AGL help.
Rl(config)# access-list 100 permit tcp?
A.B.C.D Source
address any Any
source host host
A single source
host
e. Notice that we could filter just for PC1 by using the host keyword or we could
allow any host. In this case, any device is allowed that has an address belonging to
the [Link]/27 network. Enter the network address, followed by a question
mark.
19 | P a g e
Rl(config)# access-list 100 permit tcp [Link]?
A.B.C.D Source wildcard bits
f. Calculate the wildcard mask determining the binary opposite of a subnet mask.
[Link].11111111.11100000 [Link]
00000000.00000000.00000000.00011111 [Link]
20 | P a g e
h. Configure the destination address. In this scenario, we are filtering
traffic for a single destination, which is
the server. Enter the host keyword followed by the server's IP address.
Rl(config)# access-list 100 permit tcp [Link] [Link] host
[Link]
?
Dscp Match packets with given dscp value eq Match only packets
on a given port number established established gt Match only
packets with a greaterort number lt number neq
Match only packets with a lower port Match only packets not on
a given port number precedence Match packets with given precedence
value range Match only packets in the range of port numbers
er>
i. Notice that one of the options is <er> (carriage return). In other words, you can
press Enter and the statement would permit all TCP traffic. However, we are
only permitting FTP traffic; therefore, enter the eq keyword, followed by a
question mark to display the available options. Then, enter ftp and press Enter.
Rl(config)# access-list 100 permit tcp [Link] [Link] host
[Link] eq?
<0-65535> Port number ftp File Transfer Protocol (21) pop3
Post Office Protocol v3 (110) smtp Simple Mail Transport Protocol
(25)telnet Telnet (23)WWW World Wide Web (HTTP, 80)
j. Create a second access list statement to permit ICMP (ping, etc.) traffic from
PC1 to Server. Note that the access list number remains the same and no
particular type of ICMP traffic needs to be specified.
Rl(config)# access-list 100 permit icmp [Link] [Link] host
[Link]
From R1's perspective, the traffic that ACL 100 applies to is inbound from the
network connected to Gigabit Ethernet 0/0 interface. Enter interface configuration
mode and apply the ACL.
21 | P a g e
Rl(config)# interface gigabitEthernet 0/0 Rl(config-if) # ip
a. Ping from PC1 to Server. If the pings are unsuccessful, verify the IP addresses before
continuing.
b. FTP from PC1 to Server. The username and password are both cisco.
PC> ftp [Link]
ftp> quit
d. Ping from PC1 to PC2. The destination host should be unreachable, because the
traffic was not explicitly permitted.
a. Named ACLs start with the ip keyword. From global configuration mode
of R1, enter the following command, followed by a question mark.
Rl(config)# ip access-list?extended Extended Access List
standard Standard Access List
b. You can configure named standard and extended ACLs. This access list filters
both source and destination IP addresses; therefore, it must be extended. Enter
HTTP_ONLY as the name. (For Packet Tracer scoring, the name is case-
sensitive.)
Rl(config)# ip access-list extended HTTP_ONLY
c. The prompt changes. You are now in extended named ACL configuration mode. All devices
on the PC2
LAN need TCP access. Enter the network address, followed by a question mark.
Rl(config-ext-nacl)# permit tcp [Link]?
A.B.C.D Source wildcard bits
22 | P a g e
[Link]
- [Link]
0. 0. 0. 15
Rl(config-ext-nacl)# permit tcp [Link] [Link]?
e. Finish the statement by specifying the server address as you did in Part 1 and filtering www
traffic.
Rl(config-ext-nacl)# permit tcp [Link] [Link] host [Link] eq
www
f. Create a second access list statement to permit ICMP (ping, etc.) traffic from
PC2 to Server. Note: The prompt remains the same and a specific type of
ICMP traffic does not need to be specified.
Rl(config-ext-nacl)# permit icmp [Link] [Link] host [Link]
g. All other traffic is denied, by default. Exit out of extended named ACL configuration mode.
From R1's perspective, the traffic that access list HTTP_ONLY applies to is inbound
from the network connected to Gigabit Ethernet 0/1 interface. Enter the interface
configuration mode and apply the ACL.
Rl(config)# interface gigabitEthernet 0/1
Rl(config-if)# ip access-group HTTP
ONLY in
c. Open the web browser on PC2 and enter the IP address of Server as the URL. The
connection should be successful.
23 | P a g e
Practical 4:
Configure IP ACLs to Mitigate Attacks
Topology
Addressing Table
Objectives
Verify connectivity among devices before firewall configuration.
Use ACLs to ensure remote access to the routers is available only from
management station PC-C. Configure ACLs on R1 and R3 to mitigate attacks.
• Verify ACL functionality.
24 | P a g e
Background/Scenario
Access to routers R1, R2, and R3 should only be permitted from PC-C, the
management station. PC-C is also used for connectivity testing to PC-A, which is a
server providing DNS, SMTP, FTP, and HTTPS services.
o Enable password:
ciscoenpa55
o Password for
console:
ciscoconpa55
o SSH logon username and password:
SSHadmin/ciscosshpa55
o IP addressing o Static
routing
25 | P a g e
Step 2: From PC-C, verify connectivity to PC-A and R2.
c. Open a web browser to the PC-A server ([Link]) to display the web page.
Close the browser when done.
Step 1: Configure ACL 10 to block all remote access to the routers except
from PC-C. Use the access-list command to create a numbered IP ACL on
R1, R2, and R3.
Rl(config)# access-list 10 permit host
[Link] R2(config)# access-list
10 permit host [Link] R3(config)#
access-list 10 permit host [Link]
Step 2: Apply ACL 10 to ingress traffic on the VTY lines. Use the access-class
command to apply the access list to incoming traffic on the VTY lines.
Rl(config-line)#
access-class 10 in
R2(config-line)#
access-class 10 in
R3(config-line)#
access-class 10 in
26 | P a g e
Part 3: Create a Numbered IP ACL 120 on R1
Create an IP ACL numbered 120 with the following rules:
o Permit any outside host to access DNS, SMTP, and FTP services on server
PC-A.
Step 1: Verify that PC-C can access the PC-A via HTTPS using the web browser.
27 | P a g e
Rl(config)# interface s0/0/0
Rl(config-if)# ip access-group 120 in
Step 4: Verify that PC-C cannot access PC-A via HTTPS using the
web browser. Part 4: Modify an Existing ACL on R1
Permit ICMP echo replies and destination unreachable messages from the outside network
(relative to R1).
Deny all other incoming ICMP packets.
Step 1: Verify that PC-A cannot successfully ping the loopback interface on R2.
Step 2: Make any necessary changes to ACL 120 to permit and deny the
specified traffic. Use the access-list command to create a numbered IP ACL.
Rl(config)# access-list 120 permit icmp any any
echo-reply Rl(config)# access-list 120 permit icmp
any any unreachable Rl(config)# access-list 120
deny icmp any any
Rl(config)# access-list 120 permit ip any any
on R3
Deny all outbound packets with source address outside the range of internal IP addresses on R3.
28 | P a g e
On R3, block all packets containing the source IP address from the following
pool of addresses: any RFC 1918 private addresses, [Link]/8, and any IP
multicast address. Since PC-C is being used for remote administration, permit
SSH traffic from the [Link]/8 network to return to the host PC-C.
Step 1: Configure ACL 100 to block all specified traffic from the outside network.
You should also block traffic sourced from your own internal address space if it is
not an RFC 1918 address. In this activity, your internal address space is part of the
private address space specified in RFC 1918. Use the access-list command to create
a numbered IP AGL. access-list 100 permit tcp 10. o. o. o
R3(config)#
[Link] eq 22 host
[Link]
R3(config)# access-list 100 deny ip [Link]
[Link] any R3(config)# access-list 100 deny ip
[Link] [Link] any R3(config)# access-list 100
deny ip [Link] [Link] any R3(config)# access-
list 100 deny ip [Link] [Link] any
R3(config)# access-list 100 deny ip [Link] [Link] any
R3(config)#
access-list 100 permit ip any any
Step 2: Apply the ACL to interface Serial 0/0/1. Use the ip access-group
command to apply the access list to incoming traffic on interface Serial 0/0/1.
R3(config)# interface s0/0/1
R3(config-if)# ip access-group 100 in
Step 3: Confirm that the specified traffic entering interface Serial 0/0/1 is handled
correctly.
a. From the PC-C command prompt, ping the PC-A server. The ICMP echo
replies are blocked by the ACL since they are sourced from the
[Link]/16 address space.
29 | P a g e
Your completion percentage should be 100%. Click Check Results to see feedback
and verification of which required components have been completed.
!!!Script for R1
access-list 10 permit host
[Link] line vty 0 4
access-class 10 in
access-list 120 permit udp any host
[Link] eq domain access-list 120 permit
tcp any host [Link] eq smtp
access-list 120 permit tcp any host [Link] eq
ftp access- list 120 deny tcp any host [Link]
eq 443 access-list 120 permit tcp host [Link]
host [Link] eq 22 interface s0/0/0 ip access-
group 120 in
access-list 120 permit icmp any any
echo-reply access-list 120 permit
icmp any any unreachable access-
list 120 deny icmp any any access-
list 120 permit ip any any
!!!Script for R2
access-list 10 permit host [Link] line vty 0 4 access-class 10
in
!!!Script for R3
access-list 10 permit host [Link] line vty 0 4
access-class 10 in
access-list 100 permit tcp [Link] [Link] eq 22 host
[Link] access-list 100 deny ip [Link] [Link] any
access-list
100 deny ip [Link] [Link] any access-list 100 deny
ip [Link] [Link] any access-list 100 deny ip
[Link] [Link] any access-list 100 deny ip [Link]
[Link] any
access-list 100 permit ip any any interface s0/0/1 ip access-
group 100 in
access-list 110 permit ip [Link] [Link] any interface
g0/1 ip access-group 110 in
30 | P a g e
Practical 4 D)
Configuring 1Pv6 ACLs
Topology
Addressing Table
Objectives
Step 1: Configure an ACL that will block HTTP and HTTPS access.
31 | P a g e
a. Block HTTP and HTTPS traffic from reaching
Server3.
Rl(config)# deny tcp any host 2001:DBB:l:30::30 eq www
Rl(config)# deny tcp any host 2001:DBB:l:30::30 eq 443
Verify that the AGL is operating as intended by conducting the following tests:
32 | P a g e
a. Block all ICMP traffic from any hosts to any
destination.
R3(config)# deny icmp any any
In this case, ICMP traffic can come from any source. To ensure that ICMP traffic
is blocked, regardless of its source or any changes that occur to the network
topology, apply the AGL closest to the destination.
R3(config)# interface GigabitEthernet0/0
R3(config-if)# ipv6 traffic-filter BLOCK_ICMP out
33 | P a g e
Practical 5:
Configuring a Zone-Based Policy Firewall (ZPF)
Topology
Addressing Table
Objectives
Verify connectivity among devices before firewall configuration.
Background/Scenario
ZPFs are the latest development in the evolution of Cisco firewall technologies. In
34 | P a g e
this activity, you will configure a basic ZPF on an edge router R3 that allows internal
hosts access to external resources and blocks external hosts from accessing internal
resources. You will then verify firewall functionality from internal and external
hosts.
o Console password:
ciscoconpa55
o Password for vty lines: ciscovtypa55
o Enable password: ciscoenpa55
Local username and password:
o Admin / Adminpa55
o Static routing
a. From the PC-C command prompt, SSH to the S0/0/1 interface on R2 at [Link]. Use the
username
Admin and password Adminpa55 to log in.
PC> ssh -1 Admin [Link]
a. Click the Desktop tab and then click the Web Browser application. Enter the PC-A IP address
[Link] as the URL. The Packet Tracer welcome page from the web server should be
35 | P a g e
displayed. b.
a. On R3, issue the show version command to view the Technology Package license
information.
b. If the Security Technology package has not been enabled, use the following
command to enable the package.
d. Save the running-config and reload the router to enable the security license.
e. Verify that the Security Technology package has been enabled by using the show version
command.
36 | P a g e
R3(config-sec- zone)# exit
Use the access-list command to create extended ACL 101 to permit all IP protocols from the
[Link]/24
source network to any destination.
R3(config)# access-list 101 permit ip [Link] [Link] any
Use the class-map type inspect command with the match-all option to create
a class map named IN- NETCLASS-MAP. Use the match access-group
command to match ACL 101.
R3(config)# class-map type inspect match-all IN-NET-CLASS-MAP
R3(config-cmap)# match access-group 101
R3(config-cmap)# exit
Step 1: Create a policy map to determine what to do with matched traffic. Use the
policy-map type inspect command and create a policy map named IN-2-OUT-PMAP.
Step 2: Specify a class type of inspect and reference class map IN-NET-CLASS-MAP.
R3(config-pmap)# class type inspect IN-NET-CLASS-MAP
The use of the inspect command invokes context-based access control (other
options include pass and drop).
R3(config-pmap-c)# inspect
37 | P a g e
be inspected.
Issue the exit command twice to leave config-pmap-c mode and
return to config mode.
R3(config-pmap-c)# exit
R3(config-pmap)# exit
Using the zone-pair security command, create a zone pair named IN-2-OUT-
ZPAIR. Specify the source and destination zones that were created in Task 1.
Step 2: Specify the policy map for handling the traffic between the two zones.
Attach a policy-map and its associated actions to the zone pair using the service-policy type
inspect
command and reference the policy map previously created, IN-2-OUT-PMAP.
38 | P a g e
Part 6: Test Firewall Functionality from IN-ZONE to OUT-ZONE
Verify that internal hosts can still access external resources after configuring the ZPF.
From the PC-C command prompt, ping PC-A at [Link]. The ping should succeed.
a. From the PC-C command prompt, SSH to R2 at [Link]. Use the username Admin and the
password
Adminpa55 to access R2. The SSH session should succeed.
b. While the SSH session is active, issue the command show policy-map
type inspect zone-pair sessions on R3 to view established sessions.
R3# show policy-map type inspect zone-pair sessions
policy exists on zp IN-2-OUT-ZPAIR Zone-pair: IN-2-OUT-ZPAIR
Service-policy inspect : IN-2-OUT-PMAP
Class-map: IN-NET-CLASS-MAP (match-all) Match: access-group 101
Inspect
Number of Established Sessions= 1 Established Sessions
Session 175216232 ([Link]:1028)=>([Link]:22) tcp
SIS_OPEN/TCP_ESTAB
Created 00:00:25, Last heard 00:00:20
Bytes sent (initiator:responder) [1195:1256] Class-map: class-default
(match-any)
Match: any
Drop (default action) 0 packets, 0 bytes
39 | P a g e
Enter the server IP address [Link] in the browser URL field, and click Go. The
HTTP session should succeed. While the HTTP session is active, issue the command
show policy-map type inspect zone-pair sessions on R3 to view established
sessions.
Note: If the HTTP session times out before you execute the command on R3, you will have to
click the Go
button on PC-C to generate a session between PC-C and PC-A.
R3# show policy-map type inspect zone-pair sessions
From the PC-A command prompt, ping PC-C at [Link]. The ping should fail.
40 | P a g e
Step 3: Check results.
Your completion percentage should be 100%. Click Check Results to see feedback
and verification of which required components have been completed.
41 | P a g e
Practical 6:
Configure IOS Intrusion Prevention System (IPS)
Using the CLI
Topology
Addressing Table
Objectives
.Enable IOS IPS. Configure logging.
Modify an IPS signature.
Verify IPS.
42 | P a g e
Background / Scenario
The server labeled Syslog is used to log IPS messages. You must configure the
router to identify the syslog server to receive logging messages. Displaying
the correct time and date in syslog messages is vital when using syslog to
monitor the network. Set the clock and configure the timestamp service for
logging on the routers. Finally, enable IPS to produce an alert and drop ICMP
echo reply packets inline.
The server and PCs have been preconfigured. The routers have also been
preconfigured with the following:
a. On R1, issue the show version command to view the Technology Package license
information.
b. If the Security Technology package has not been enabled, use the following
command to enable the package.
Rl(config)# license boot module cl900 technology-package securityk9
43 | P a g e
c. Accept the end user license agreement.
d. Save the running-config and reload the router to enable the security license.
e. Verify that the Security Technology package has been enabled by using the show version
command.
On R1, create an IPS rule name using the ip ips name name command in global
configuration mode. Name the IPS rule iosips.
Rl(config)# ip ips name iosips
IOS IPS supports the use of syslog to send event notification. Syslog notification is
enabled by default. If logging console is enabled, IPS syslog messages display.
44 | P a g e
b. If necessary, use the clock set command from privileged EXEC mode to reset the clock.
Rl#
c. Verify that the timestamp service for logging is enabled on the router using the show run
command.
Enable the timestamp service if it is not enabled.
Rl(config)# service timestamps log datetirne rnsec
Retire the all signature category with the retired true command (all signatures
within the signature release). Unretire the I0S_IPS Basic category with the retired
false command.
Rl(config)# ip ips signature- category
Rl(config-ips-category)#
category all Rl(config-ips-
category-action)# retired true
Rl(config-ips-category-action)#
exit
Rl(config-ips-category)# category
ios_ips basic Rl(config-ips-
category-action)# retired false
Rl(config-ips-category-action)#
exit
Rl(config-ips-cateogry)# exit
Do you want to accept these changes? [confirm) <Enter>
Apply the IPS rule to an interface with the ip ips name direction command in
interface configuration mode. Apply the rule outbound on the G0/1 interface of R1.
After you enable IPS, some log messages will be sent to the console line indicating
that the IPS engines are being initialized.
45 | P a g e
Note: The direction in means that IPS inspects only traffic going into the interface.
Similarly, out means that IPS inspects only traffic going out of the interface.
Rl(config)# interface g0/1
Un-retire the echo request signature (signature 2004, subsig ID 0), enable it, and
change the signature action to alert and drop.
Rl(config)# ip ips
signature-definition
Rl(config-sigdef)#
signature 2004 0 Rl(config-
sigdef-sig)# status
Rl(config-sigdef-sig-status)#
retired false Rl(config-sigdef-
sig-status)# enabled true
Rl(config-sigdef-sig-status)#
exit
Rl(config-sigdef-sig)# engine
Rl(config-sigdef-sig-engine)# event-action produce-alert
Rl(config-sigdef- sig-engine)# event-action deny-packet-inline
Rl(config-sigdef-sig-
engine)# exit
Rl(config-sigdef-sig)#
exit Rl(config-
sigdef)# exit
Do you want to accept these changes? [confirm) <Enter>
46 | P a g e
Step 3: Verify that IPS is working properly.
a. From PC-C, attempt to ping PC-A. Were the pings successful? Explain.
The pings should fail. This is because the IPS rule for event-action of an echo request was set
packet- inline".
to "deny-
b. From PC-A, attempt to ping PC-C. Were the pings successful? Explain.
The ping should be successful. This is because the IPS rule does not cover echo reply. When
PC-A pings
Step 4: View the syslog messages.
c. In the left navigation menu, select SYSLOG to view the log file.
Your completion percentage should be 100%. Click Check Results to see feedback
and verification of which required components have been completed.
!!!Script for R1
clock set 10:20:00 10 january
2014 mkdir ipsdir
config
47 | P a g e
ips basic retired
48 | P a g e
Practical 7:
Layer 2 Security
Topology
Objectives
Assign the Central switch as the root bridge.
Background / Scenario
There have been a number of attacks on the network recently. For this reason, the
network administrator has assigned you the task of configuring Layer 2 security.
For optimum performance and security, the administrator would like to ensure that the
49 | P a g e
root bridge is the 3560 Central switch. To prevent spanning-tree manipulation attacks,
the administrator wants to ensure that the STP parameters are secure. To prevent
against CAM table overflow attacks, the network administrator has decided to
configure port security to limit the number of MAC addresses each switch port can
learn. If the number of MAC addresses exceeds the set limit, the administrator would
like the port to be shutdown. All switch devices have been preconfigured with the
following:
ciscoconpa55
From Central, issue the show spanning- tree command to determine the current
root bridge, to see the ports in use, and to see their status.
Based on the current root bridge, what is the resulting spanning tree? (Draw the spanning-tree
topology.)
Step 2: Assign Central as the primary root bridge. Using the spanning-
tree vlan 1 root primary command, and assign Central as the root
bridge.
50 | P a g e
Central(config)# spanning-tree vlan 1 root primary
Based on the new root-bridge, what is the resulting spanning tree? (Draw the spanning-tree
topology.)
51 | P a g e
Step 2: Enable BPDU guard on all access ports.
BPDU guard is a feature that can help prevent rogue switches and spoofing on
access ports. Enable BPDU guard on SW-A and SW-B access ports.
SW-A(config)# interface range f0/1 - 4
SW-A(config-if-range)# spanning-tree bpduguard enable
Root guard can be enabled on all ports on a switch that are not root ports. It is best
deployed on ports that connect to other non-root switches. Use the show
spanning-tree command to determine the location of the root port on each switch.
On SW-1, enable root guard on ports F0/23 and F0/24. On SW-2, enable root
guard on ports F0/23 and F0/24.
SW-l(config)# interface range f0/23 - 24
SW-l(config-if-range)# spanning-tree guard root
Step 1: Configure basic port security on all ports connected to host devices.
This procedure should be performed on all access ports on SW-A and SW-B. Set
the maximum number of learned MAC addresses to 2, allow the MAC address to
52 | P a g e
be learned dynamically, and set the violation to shutdown. Note: A switch port
must be configured as an access port to enable port security.
SW-A(config)# interface range f0/1 - 22
SW-A(config-if-range)# switchport mode access
SW-A(config-if-range)# switchport port-security
SW-A(config-if-range)# switchport port-security maximum 2
SW-A(config-if-range)# switchport port-security violation
shutdown SW- A(config-if-range)# switchport port-security
mac-address sticky
53 | P a g e
SW-A(config)# interface range f0/5 - 22
SW-A(config-if-range)# shutdown
54 | P a g e
Practical 8:
Layer 2 VLAN Security
Topology
Objectives
• Connect a new redundant link between SW-1 and SW-2.
Enable trunking and configure security on the new trunk link between
SW-1 and SW-2.
55 | P a g e
Background / Scenario
A company's network is currently set up using two separate VLANs: VLAN 5
and VLAN 10. In addition, all trunk ports are configured with native VLAN 15.
A network administrator wants to add a redundant link between switch SW-1
and SW-2. The link must have trunking enabled and all security requirements
should be in place.
Note: If using the simple POU GUI packet, be sure to ping twice to allow for ARP.
Using a crossover cable, connect port F0/23 on SW-1 to port F0/23 on SW-2.
56 | P a g e
Step 2: Enable trunking, including all trunk security mechanisms on the link
between SW-1 and SW-2.
Trunking has already been configured on all pre-existing trunk interfaces. The new
link must be configured for trunking, including all trunk security mechanisms. On
both SW-1 and SW-2, set the port to trunk, assign native VLAN 15 to the trunk
port, and disable auto-negotiation.
SW-l(config)# interface f0/23
SW-l(config-if)# switchport mode trunk
SW-l(config-if)# switchport trunk native vlan 15
SW-l(config-if)# switchport nonegotiate
SW-l(config-if)# no shutdown
The network administrator wants to access all switch and routing devices using a
management PC. For security purposes, the administrator wants to ensure that all
managed devices are on a separate VLAN.
b. Create an interface VLAN 20 and assign an IP address within the [Link]/24 network.
SW-A(config)# interface vlan 20
SW-A(config-if)# ip address [Link] [Link]
a. Create the management VLAN on all switches: SW-B, SW-1, SW-2, and Central.
57 | P a g e
SW-B(config)# vlan 20
SW-B(config-vlan)# exit
SW-l(config)# vlan 20
SW-l(config-vlan)# exit
SW-2(config)# vlan 20
SW-2(config-vlan)# exit
Central(config)# vlan 20
Central(config-vlan)# exit
Connect the management PC to SW-A port F0/1 and ensure that it is assigned an
available IP address within the [Link]/24 network.
The management PC should be able to ping SW-A, SW-B, SW-1, SW-2, and Central.
58 | P a g e
Part 4: Enable the Management PC to Access Router R1
a. Create subinterface g0/0.3 and set encapsulation to dot1q 20 to account for VLAN 20.
Rl(config)# interface g0/0.3
Rl(config-subif)# encapsulation dotlq 20
b. Assign an IP address within the [Link]/24 network.
Rl(config)# interface g0/0.3
Rl(config-subif)# ip address [Link] [Link]
Be sure to configure the default gateway on the management PC to allow for connectivity.
While the management PC must be able to access the router, no other PC should be
able to access the management VLAN.
59 | P a g e
example) to access the router. This prevents an IP address change to bypass the AGL.
Note: There are multiple ways in which an AGL can be created to accomplish the
necessary security. For this reason, grading on this portion of the activity is based on
the correct connectivity requirements. The management PC must be able to connect
to all switches and the router. All other PCs should not be able to connect to any
devices within the management VLAN.
a. Verify only the Management PC can access the router. Use SSH to access R1 with username
SSHadmin
and password ciscosshpa55.
PC> ssh -1 SSHadmin [Link]
b. From the management PC, ping SW-A, SW-B, and R1. Were the pings successful? Explain.
The pings should have been successful because all devices within the
[Link] network should be able to ping one another. Devices within
VLAN20 are not required to route through the router.
c. From D1, ping the management PC. Were the pings successful? Explain
The ping should have failed because for a device within a different VLAN
to successfully ping a device within VLAN20, it must be routed. The router
has an ACL that prevents all packets from accessing the [Link]
network.
Step 5: Check results.
If all components appear to be correct and the activity still shows incomplete, it
could be due to the connectivity tests that verify the ACL operation.
60 | P a g e
ip address [Link] [Link]
!!! Script for SW-2 conf t interface f0/23 switchport mode trunk!
switchport trunk native vlan 15 switchport nonegotiate no
shutdown vlan 20 exit interface vlan 20
ip address [Link] [Link]
61 | P a g e
Practical 9:
Configure and Verify a Site-to-Site IPsec
VPN Using CLI
Topology
Addressing Table
62 | P a g e
Objectives
• Verify connectivity throughout the network.
Background / Scenario
The network topology shows three routers. Your task is to configure R1 and R3
to support a site-to-site IPsec VPN when traffic flows between their respective
LANs. The IPsec VPN tunnel is from R1 to R3 via R2. R2 acts as a pass-through
and has no knowledge of the VPN. IPsec provides secure transmission of sensitive
information over unprotected networks, such as the Internet. IPsec operates at the
network layer and protects and authenticates IP packets between participating
IPsec devices (peers), such as Cisco routers.
Parameters R1 R3
Note: Balded parameters are defaults. Only unbolded parameters have to be explicitly
configured.
63 | P a g e
IPsec Phase 2 Policy Parameters
Parameters R1 R3
OSPF 101
a. On R1, issue the show version command to view the Security Technology package license
information.
b. If the Security Technology package has not been enabled, use the following
command to enable the package.
64 | P a g e
Rl(config)# license boot module c1900 technology-package securityk9
d. Save the running-config and reload the router to enable the security license.
e. Verify that the Security Technology package has been enabled by using the show version
command.
Configure ACL 110 to identify the traffic from the LAN on R1 to the LAN on R3 as
interesting. This interesting traffic will trigger the IPsec VPN to be implemented when
there is traffic between the R1 to R3 LANs. All other traffic sourced from the LANs
will not be encrypted. Because of the implicit deny all, there is no need to configure a
deny ip any any statement.
Rl(config)# access-list 110 permit ip [Link] [Link] [Link]
[Link]
Configure the crypto ISAKMP policy 10 properties on R1 along with the shared
crypto key vpnpa55. Refer to the ISAKMP Phase 1 table for the specific
parameters to configure. Default values do not have to be configured. Therefore,
only the encryption method, key exchange method, and DH method must be
configured.
65 | P a g e
a. Create the transform-set VPN-SET to use esp-aes and esp-sha-hmac.
Rl(config)# crypto ipsec transform-set VPN-SET esp-aes esp-sha-hmac
b. Create the crypto map VPN-MAP that binds all of the Phase 2 parameters
together. Use sequence number 10 and identify it as an ipsec-isakmp map.
Rl(config)# crypto map VPN-MAP 10 ipsec-
isakmp Rl(config-crypto-map)# description
VPN connection to R3 Rl(config-crypto-map)#
set peer [Link]
Rl(config-crypto-map)# set transform-set VPN-SET
Rl(config-crypto-map)# match address 110
Rl(config-crypto- map)# exit
Bind the VPN-MAP crypto map to the outgoing Serial 0/0/0 interface.
a. On R3, issue the show version command to verify that the Security
Technology package license information has been enabled.
b. If the Security Technology package has not been enabled, enable the package and reload R3.
66 | P a g e
R3(config-isakmp)# encryption aes 256
R3(config-isakmp)# authentication pre-share R3(config-isakmp)#
group 5
R3(config-isakmp)# exit
R3(config)# crypto isakrnp key vpnpa55 address [Link]
b. Create the crypto map VPN-MAP that binds all of the Phase 2 parameters
together. Use sequence number 10 and identify it as an ipsec-isakmp
map.
R3(config)# crypto map VPN-MAP 10 ipsec-
isakrnp R3(config-crypto-map)# description
VPN connection to Rl R3(config-crypto-map)#
set peer [Link]
R3(config-crypto-map)# set
transform-set VPN-SET R3(config-
crypto-map)# match address 110
R3(config-crypto-map)# exit
Step 5: Configure the crypto map on the outgoing interface. Bind the
VPN-MAP crypto map to the outgoing Serial 0/0/1 interface. Note:
This is not graded.
R3(config)# interface s0/0/1
R3(config-if)# crypto map VPN-MAP
Issue the show crypto ipsec sa command on R1. Notice that the number of
packets encapsulated, encrypted, decapsulated, and decrypted are all set to 0.
67 | P a g e
Step 3: Verify the tunnel after interesting traffic.
On R1, re-issue the show crypto ipsec sa command. Notice that the number of
packets is more than 0, which indicates that the IPsec VPN tunnel is working.
Ping PC-8 from PC-A. Note: Issuing a ping from router R1 to PC-C or R3 to
PC-A is not interesting traffic.
On R1, re-issue the show crypto ipsec sa command. Notice that the number
of packets has not changed, which verifies that uninteresting traffic is not
encrypted.
68 | P a g e
!!! Script for R3
config t
access-list 110 permit ip [Link] [Link] [Link]
[Link]
crypto isakmp policy 10
encryption aes 256 authentication pre-share group 5 exit
69 | P a g e