Extended Numbered ACL Lab
Extended Numbered ACL Lab
Topology
PC1:
PC2:
SW1:
enable
conf t
no ip domain-lookup
logging console
line con 0
logging synchronous
R1:
enable
conf t
host R1
no banner motd
no banner login
no banner exec
no banner incoming
line vty 0 15
password cisco
login
exec-timeout 0 0
transport input telnet
line con 0
logging synchronous
exit
no ip domain-lookup
ipv6 unicast-routing
int gig 0/1
ip address 10.1.1.1 255.255.255.0
ipv6 address 2000:2::1/64
no shutdown
int gig 0/2
ip address 192.0.2.2 255.255.255.0
ipv6 address 2000:1::1/64
no shutdown
exit
ipv6 router rip ROUTE
int gig 0/1
ipv6 rip ROUTE enable
exit
int gig 0/2
ipv6 rip ROUTE enable
exit
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
SERVER:
enable
conf t
host SERVER
no banner motd
no banner login
no banner exec
no banner incoming
line vty 0 15
password cisco
login
exec-timeout 0 0
transport input telnet
line con 0
logging synchronous
int lo0
ip address 203.0.113.1 255.255.255.0
ipv6 address 2000:A::1/64
exit
no ip domain-lookup
ipv6 unicast-routingipv6 address 2000:1::2/64
int gig 0/1
ip address 192.0.2.1 255.255.255.0
no shutdown
exit
ipv6 router rip ROUTE
int gig 0/1
ipv6 rip ROUTE enable
exit
int lo0
ipv6 rip ROUTE enable
exit
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
exit
ip http server
ip http secure-server
Lab Tasks
● Ping the server from both PC1 and PC2 to make sure we can reach the server.
● PC1 should not be allowed to contact the server using Telnet.
● Allow PC1 and PC2 to connect to the server using all other ports by specifying the
subnet of both PC’s.
● Apply the ACL going into Gig 0/1.
● Take a look at the ACL that we just created.
● Telnet to the server by using the port numbers of HTTPS, HTTP, and Telnet and see if we
are able to connect to the server on PC1. Confirm that PC1 is not able to Telnet to the
server.
● Telnet to the server by using the port numbers of HTTPS, HTTP, and Telnet and see if we
are able to connect to the server on PC2. Confirm that PC2 is still able to telnet to the
server.
Solution
Step 1: Ping the server from both PC1 and PC2 to make sure we can reach the server.
PC1
PC1 login: cisco
Password: cisco
PC2
PC2 login: cisco
Password: cisco
Step 2: PC1 should not be allowed to contact the server using Telnet.
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#access-list 100 deny ?
<0-255> An IP protocol number
ahp Authentication Header Protocol
eigrp Cisco's EIGRP routing protocol
esp Encapsulation Security Payload
gre Cisco's GRE tunneling
icmp Internet Control Message Protocol
igmp Internet Gateway Message Protocol
ip Any Internet Protocol
ipinip IP in IP tunneling
nos KA9Q NOS compatible IP over IP tunneling
object-group Service object group
ospf OSPF routing protocol
pcp Payload Compression Protocol
pim Protocol Independent Multicast
sctp Stream Control Transmission Protocol
tcp Transmission Control Protocol
udp User Datagram Protocol
Step 3: Allow PC1 and PC2 to connect to the server using all other ports by specifying the
subnet of both PC’s.
R1#show access-list
Extended IP access list 100
10 deny tcp host 10.1.1.2 host 203.0.113.1 eq telnet
20 permit ip 10.1.1.0 0.0.0.255 any
(## Notice how we put our most specific ACL at the top)
Step 6: Telnet to the server by using the port numbers of HTTPS, HTTP, and Telnet and see if we
are able to connect to the server on PC1. Confirm that PC1 is not able to Telnet to the server.
HTTPS
PC1:~$ telnet 203.0.113.1 443
Connected to 203.0.113.1
Telnet
PC1:~$ telnet 203.0.113.1
telnet: can't connect to remote host (203.0.113.1): Host is unreachable
(## Notice how we are able to connect to the SERVER via HTTPS and HTTP, but we are not able
to connect to the SERVER via Telnet because of our ACL.)
Step 7: Telnet to the server by using the port numbers of HTTPS, HTTP, and Telnet and see if we
are able to connect to the server on PC2. Confirm that PC2 is still able to telnet to the server.
HTTPS
PC2:~$ telnet 203.0.113.1 443
Connected to 203.0.113.1
HTTP
PC2:~$ telnet 203.0.113.1 80
Connected to 203.0.113.1
Telnet
PC2:~$ telnet 203.0.113.1
Connected to 203.0.113.1
(## Notice how we are able to connect to the SERVER on PC2 via HTTPS, HTTP, and Telnet.)