Same for:
- 4.5.13 Packet Tracer - Configure Extended ACLs Scenario 2
- 14.5.13 Packet Tracer - Configure Extended ACLs Scenario 2
26.2.2 Packet Tracer - Configure Extended IPv4 ACLs - Scenario 2 (Answers)
Topology
26.2.2 Packet Tracer - Configure Extended IPv4 ACLs - Scenario 2
Addressing Table
| Device | Interface | IP Address | Subnet Mask | Default Gateway |
|---|---|---|---|---|
| RT1 | G0/0 | 172.31.1.126 | 255.255.255.224 | N/A |
| S0/0/0 | 209.165.1.2 | 255.255.255.252 | ||
| PC1 | NIC | 172.31.1.101 | 255.255.255.224 | 172.31.1.126 |
| PC2 | NIC | 172.31.1.102 | 255.255.255.224 | 172.31.1.126 |
| PC3 | NIC | 172.31.1.103 | 255.255.255.224 | 172.31.1.126 |
| Server1 | NIC | 64.101.255.254 | 255.254.0.0 | 64.100.1.1 |
| Server2 | NIC | 64.103.255.254 | 255.254.0.0 | 64.102.1.1 |
Objectives
- Part 1: Configure a Named Extended ACL
- Part 2: Apply and Verify the Extended ACL
Background / Scenario
In this scenario, specific devices on the LAN are allowed to various services on servers located on the internet.
Instructions
Part 1: Configure a Named Extended ACL
Configure one named ACL to implement the following policy:
- Block HTTP and HTTPS access from PC1 to Server1 and Server2. The servers are inside the cloud and you only know their IP addresses.
- Block FTP access from PC2 to Server1 and Server2.
- Block ICMP access from PC3 to Server1 and Server2.
Note: For scoring purposes, you must configure the statements in the order specified in the following steps.
Step 1: Deny PC1 access to HTTP and HTTPS services on Server1 and Server2.
a. Create a named extended IP access list on router RT1 which will deny PC1 access to the HTTP and HTTPS services of Server1 and Server2. Four access control statements are required.
What is the command to begin the configuration of an extended access list with the name ACL?
Copy
RT1(config)# ip access-list extended ACL
b. Begin the ACL configuration with a statement that denies access from PC1 to Server1, only for HTTP (port 80). Refer to the addressing table for the IP address of PC1 and Server1.
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.101 host 64.101.255.254 eq 80
c. Next, enter the statement that denies access from PC1 to Server1, only for HTTPS (port 443).
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.101 host 64.101.255.254 eq 443
d. Enter the statement that denies access from PC1 to Server2, only for HTTP. Refer to the addressing table for the IP address of Server 2.
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.101 host 64.103.255.254 eq 80
e. Enter the statement that denies access from PC1 to Server2, only for HTTPS.
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.101 host 64.103.255.254 eq 443
Step 2: Deny PC2 to access FTP services on Server1 and Server2.
Refer to the addressing table for the IP address of PC2.
a. Enter the statement that denies access from PC2 to Server1, only for FTP (port 21 only).
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.102 host 64.101.255.254 eq 21
b. Enter the statement that denies access from PC2 to Server2, only for FTP (port 21 only).
Copy
RT1(config-ext-nacl)# deny tcp host 172.31.1.102 host 64.103.255.254 eq 21
Step 3: Deny PC3 to ping Server1 and Server2.
Refer to the addressing table for the IP address of PC3.
a. Enter the statement that denies ICMP access from PC3 to Server1.
Copy
RT1(config-ext-nacl)# deny icmp host 172.31.1.103 host 64.101.255.254
b. Enter the statement that denies ICMP access from PC3 to Server2.
Copy
RT1(config-ext-nacl)# deny icmp host 172.31.1.103 host 64.103.255.254
Step 4: Permit all other IP traffic.
By default, an access list denies all traffic that does not match any rule in the list. Enter the command that permits all traffic that does not match any of the configured access list statements.
Copy
RT1(config-ext-nacl)# permit ip any any
Step 5: Verify the access list configuration before applying it to an interface.
Before any access list is applied, the configuration needs to be verified to make sure that there are no typographical errors and that the statements are in the correct order. To view the current configuration of the access list, use either the show access-lists or the show running-config command.
Copy
RT1# show access-lists
Extended IP access list ACL
10 deny tcp host 172.31.1.101 host 64.101.255.254 eq www
20 deny tcp host 172.31.1.101 host 64.101.255.254 eq 443
30 deny tcp host 172.31.1.101 host 64.103.255.254 eq www
40 deny tcp host 172.31.1.101 host 64.103.255.254 eq 443
50 deny tcp host 172.31.1.102 host 64.101.255.254 eq ftp
60 deny tcp host 172.31.1.102 host 64.103.255.254 eq ftp
70 deny icmp host 172.31.1.103 host 64.101.255.254
80 deny icmp host 172.31.1.103 host 64.103.255.254
90 permit ip any any
Copy
RT1# show running-config | begin access-list
ip access-list extended ACL
deny tcp host 172.31.1.101 host 64.101.255.254 eq www
deny tcp host 172.31.1.101 host 64.101.255.254 eq 443
deny tcp host 172.31.1.101 host 64.103.255.254 eq www
deny tcp host 172.31.1.101 host 64.103.255.254 eq 443
deny tcp host 172.31.1.102 host 64.101.255.254 eq ftp
deny tcp host 172.31.1.102 host 64.103.255.254 eq ftp
deny icmp host 172.31.1.103 host 64.101.255.254
deny icmp host 172.31.1.103 host 64.103.255.254
permit ip any any
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
Note: The difference between the output of the show access-lists command and the output of the show running-config command is that the show access-lists command includes the sequence numbers assigned to the configuration statements. These sequence numbers enable the editing, deleting, and inserting of single lines within the access list configuration. Sequence numbers also define the processing order of individual access control statements, starting with the lowest sequence number.
Part 2: Apply and Verify the Extended ACL
The traffic to be filtered is coming from the 172.31.1.96/27 network and is destined for remote networks. Appropriate ACL placement depends on the relationship of the traffic with respect to RT1. In general, extended access lists should be placed on the interface closest to the source of the traffic.
Step 1: Apply the ACL to the correct interface and in the correct direction.
Note: In an actual operational network, an untested ACL should never be applied to an active interface. This is not a good practice and can disrupt network operation.
On which interface should the named ACL be applied, and in which direction?
Interface Gigabit Ethernet 0/0, in.
Enter the configuration commands to apply the ACL to the interface.
Copy
RT1(config)# interface gigabitethernet 0/0
RT1(config-if)# ip access-group ACL in
Step 2: Test access for each PC.
a. Access the websites of Server1 and Server2 using the web browser of PC1. Use both the HTTP and HTTPS protocols. Use the show access-lists command to view which access list statement permitted or denied the traffic. The output of the show access-lists command displays the number of packets that match each statement since the last time the counters were cleared, or the router rebooted.
Note: To clear the counters on an access list, use the clear access-list counters command.


Copy
RT1# show access-lists
Extended IP access list ACL
10 deny tcp host 172.31.1.101 host 64.101.255.254 eq www (48 match(es))
20 deny tcp host 172.31.1.101 host 64.101.255.254 eq 443 (12 match(es))
30 deny tcp host 172.31.1.101 host 64.103.255.254 eq www (22 match(es))
40 deny tcp host 172.31.1.101 host 64.103.255.254 eq 443 (12 match(es))
50 deny tcp host 172.31.1.102 host 64.101.255.254 eq ftp
60 deny tcp host 172.31.1.102 host 64.103.255.254 eq ftp
70 deny icmp host 172.31.1.103 host 64.101.255.254
80 deny icmp host 172.31.1.103 host 64.103.255.254
90 permit ip any any
b. Access FTP of Server1 and Server2 using PC1. The username and password is cisco.
Copy
C:\> ftp 64.101.255.254
Trying to connect...64.101.255.254
Connected to 64.101.255.254
220- Welcome to PT Ftp server
Username:cisco
331- Username ok, need password
Password:*****
230- Logged in
(passive mode On)
ftp> quit
221- Service closing control connection.
Copy
C:\> ftp 64.103.255.254
Trying to connect...64.103.255.254
Connected to 64.103.255.254
220- Welcome to PT Ftp server
Username:cisco
331- Username ok, need password
Password:*****
230- Logged in
(passive mode On)
ftp> quit
221- Service closing control connection.
c. Ping Server1 and Server2 from PC1.
Copy
C:\> ping 64.101.255.254
Pinging 64.101.255.254 with 32 bytes of data:
Reply from 64.101.255.254: bytes=32 time=9ms TTL=126
Reply from 64.101.255.254: bytes=32 time=5ms TTL=126
Reply from 64.101.255.254: bytes=32 time=6ms TTL=126
Reply from 64.101.255.254: bytes=32 time=1ms TTL=126
Ping statistics for 64.101.255.254:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 9ms, Average = 5ms
C:\> ping 64.103.255.254
Pinging 64.103.255.254 with 32 bytes of data:
Reply from 64.103.255.254: bytes=32 time=10ms TTL=126
Reply from 64.103.255.254: bytes=32 time=6ms TTL=126
Reply from 64.103.255.254: bytes=32 time=1ms TTL=126
Reply from 64.103.255.254: bytes=32 time=7ms TTL=126
Ping statistics for 64.103.255.254:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 10ms, Average = 6ms
d. Repeat Step 2a to Step 2c with PC2 and PC3 to verify proper access list operation.
Copy
C:\> ftp 64.101.255.254
Trying to connect...64.101.255.254
%Error opening ftp://64.101.255.254/ (Timed out)
.
(Disconnecting from ftp server)
Copy
C:\> ftp 64.103.255.254
Trying to connect...64.103.255.254
%Error opening ftp://64.103.255.254/ (Timed out)
.
(Disconnecting from ftp server)
Copy
C:\> ping 64.101.255.254
Pinging 64.101.255.254 with 32 bytes of data:
Reply from 64.101.255.254: bytes=32 time=8ms TTL=126
Reply from 64.101.255.254: bytes=32 time=1ms TTL=126
Reply from 64.101.255.254: bytes=32 time=5ms TTL=126
Reply from 64.101.255.254: bytes=32 time=3ms TTL=126
Ping statistics for 64.101.255.254:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 8ms, Average = 4ms
C:\> ping 64.103.255.254
Pinging 64.103.255.254 with 32 bytes of data:
Reply from 64.103.255.254: bytes=32 time=1ms TTL=126
Reply from 64.103.255.254: bytes=32 time=6ms TTL=126
Reply from 64.103.255.254: bytes=32 time=5ms TTL=126
Reply from 64.103.255.254: bytes=32 time=9ms TTL=126
Ping statistics for 64.103.255.254:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 9ms, Average = 5ms
Copy
C:\> ftp 64.101.255.254
Trying to connect...64.101.255.254
Connected to 64.101.255.254
220- Welcome to PT Ftp server
Username:cisco
331- Username ok, need password
Password:*****
230- Logged in
(passive mode On)
ftp> quit
221- Service closing control connection.
Copy
C:\> ftp 64.103.255.254
Trying to connect...64.103.255.254
Connected to 64.103.255.254
220- Welcome to PT Ftp server
Username:cisco
331- Username ok, need password
Password:*****
230- Logged in
(passive mode On)
ftp> quit
221- Service closing control connection.
Copy
C:\> ping 64.101.255.254
Pinging 64.101.255.254 with 32 bytes of data:
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Ping statistics for 64.101.255.254:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\> ping 64.103.255.254
Pinging 64.103.255.254 with 32 bytes of data:
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Reply from 172.31.1.126: Destination host unreachable.
Ping statistics for 64.103.255.254:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Copy
RT1# show access-lists
Extended IP access list ACL
10 deny tcp host 172.31.1.101 host 64.101.255.254 eq www (60 match(es))
20 deny tcp host 172.31.1.101 host 64.101.255.254 eq 443 (24 match(es))
30 deny tcp host 172.31.1.101 host 64.103.255.254 eq www (22 match(es))
40 deny tcp host 172.31.1.101 host 64.103.255.254 eq 443 (12 match(es))
50 deny tcp host 172.31.1.102 host 64.101.255.254 eq ftp (12 match(es))
60 deny tcp host 172.31.1.102 host 64.103.255.254 eq ftp (12 match(es))
70 deny icmp host 172.31.1.103 host 64.101.255.254 (4 match(es))
80 deny icmp host 172.31.1.103 host 64.103.255.254 (4 match(es))
90 permit ip any any (59 match(es))
Device Configs - Final
ROUTER RT1
Copy
! ==============================================================
!--- 26.2.2 Packet Tracer - Configure Extended IPv4 ACLs - Scenario 2
!--- ANSWER SCRIPT FOR ROUTER RT1
!--- Usage: copy this whole file and paste it into the RT1 terminal (start at the RT1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================
enable
configure terminal
! --------------------------------------------------------------
!--- Part 1: Configure a named extended ACL called "ACL".
!--- For scoring, the statements must be entered in this exact order.
! --------------------------------------------------------------
!--- Step 1: Deny PC1 access to HTTP (80) and HTTPS (443) on Server1 and Server2.
ip access-list extended ACL
deny tcp host 172.31.1.101 host 64.101.255.254 eq 80
deny tcp host 172.31.1.101 host 64.101.255.254 eq 443
deny tcp host 172.31.1.101 host 64.103.255.254 eq 80
deny tcp host 172.31.1.101 host 64.103.255.254 eq 443
!--- Step 2: Deny PC2 FTP access (port 21) to Server1 and Server2.
deny tcp host 172.31.1.102 host 64.101.255.254 eq 21
deny tcp host 172.31.1.102 host 64.103.255.254 eq 21
!--- Step 3: Deny PC3 ping (ICMP) to Server1 and Server2.
deny icmp host 172.31.1.103 host 64.101.255.254
deny icmp host 172.31.1.103 host 64.103.255.254
!--- Step 4: Permit all other IP traffic - without it, the implicit deny
!--- at the end of the ACL would block everything entering G0/0.
permit ip any any
exit
! --------------------------------------------------------------
!--- Part 2: Apply the ACL to the correct interface and direction.
! --------------------------------------------------------------
!--- Inbound on G0/0, the interface closest to the source of the
!--- filtered traffic (the 172.31.1.96/27 LAN).
interface gigabitethernet 0/0
ip access-group ACL in
exit
end
! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config
! ==============================================================
!--- Verification:
!--- show access-lists -> ACL with 9 entries in this order (IOS shows port 80 as "www" and 21 as "ftp")
!--- show ip interface gigabitethernet 0/0 -> "Inbound access list is ACL"
!--- PC1: web (HTTP/HTTPS) to Server1/Server2 -> fails; FTP and ping -> succeed
!--- PC2: FTP to Server1/Server2 -> fails; web and ping -> succeed
!--- PC3: ping to Server1/Server2 -> fails; web and FTP -> succeed
! ==============================================================
Download 26.2.2 Packet Tracer - Configure Extended IPv4 ACLs - Scenario 2 .PKA file:
26.2.2 Packet Tracer - Configure Extended IPv4 ACLs - Scenario 2 .PKA
1 file(s) 360.80 KB
Previous Lab
26.2.1 Packet Tracer – Configure Extended IPv4 ACLs – Scenario 1
Next Lab
26.2.3 Packet Tracer – Configure IP ACLs to Mitigate Attacks
