Module 5 ACLs
Module 5 ACLs
Content
Describe TCP and its function
A TCP Conversation
ACLs enable you to control traffic into and out of your network. This control can
be as simple as permitting or denying network hosts or addresses. However,
ACLs can also be configured to control network traffic based on the TCP/UDP
ports being used.
A TCP Conversation
Packet Filtering
NO
YES
Packet Filtering
For this scenario, the packet filter looks at each packet as follows:
If the packet is a TCP SYN from network A using port 80, it is allowed
to pass. All other access is denied to those users.
If the packet is a TCP SYN from network B using port 80, it is blocked.
However, all other access is permitted
10
ACL Operation
Inbound ACLs
11
ACL Operation
Outbound ACLs
ACL Operation
Routing and ACL Processes in a Router
13
14
15
Creating ACLs
Step 1: Create an ACL defination
16
17
18
19
20
A wildcard mask is a 32-bit quantity that is divided into four octets, with
each octet containing 8 bits.
22
172.30.16.0
10101100 . 00011110 . 00010000 . 00000000
0.0.15.255
00000000 . 00000000 . 00001111 . 11111111
----------------------------------------172.30.16.0
10101100 . 00011110 . 00010000 . 00000000
172.30.16.1
10101100 . 00011110 . 00010000 . 00000001
172.30.17.0
10101100 . 00011110 . 00010001 . 00000000
The
packet(s)
Test Conditon
24
Subnet Mask:
255 . 255 . 240 . 0
Wildcard Mask: + 0 . 0 . 15 . 255
---------------------255 . 255 . 255 . 255
So, we could calculate the Wildcard Mask by:
255 . 255 . 255 . 255
Subnet Mask: - 255 . 255 . 240 . 0
--------------------Wildcard Mask:
0 . 0 . 15 . 255
25
Practice
RouterB(config)#access-list 10 permit ________ _________
Permit the following networks:
Network/Subnet Mask
A.
B.
C.
D.
E.
Address/Wildcard Mask
172.16.0.0 255.255.0.0
172.16.1.0 255.255.255.0
192.168.1.0 255.255.255.0
172.16.16.0 255.255.240.0 (hmmm . . .?)
172.16.128.0 255.255.192.0 (hmmm . . .?)
Address/Wildcard Mask
A. 172.16.10.100
B. 192.168.1.100
C. All hosts
26
Wildcard any
Wildcard host
27
28
Standard ACLs
Overview
When you want to:
block all traffic from a network,
allow all traffic from a network,
30
Standard ACLs
31
32
33
Requirement
Extended ACLs
Overview
Provide a greater range of control than standard ACLs.
Check for both source and destination packet addresses.
They can also check for specific protocols, port numbers,
and other parameters.
36
Extended ACL
37
38
39
40
Appy ACL
41
42
43
1. Prevents telnet and ftp access from Internet to 172.16.3.100 and 172.16.4.13
46
Named ACLs
Overview
Uses a name string to identify standard and extended
IP ACLs instead of the numeric (1 to 199)
representation.
Named ACLs can be used to remove individual
entries from a specific ACL.
Considerations:
Named ACLs are not compatible with Cisco IOS releases
prior to Release 11.2.
You cannot use the same name for multiple ACLs. In
addition, ACLs of different types cannot have the same
name.
49
Apply ACLs
Router(config-if)# ip access-group name {in | out}
Router# show access-lists
50
51
ADVANCED ACLs
Switch-Port ACLs
Time-based ACLs
Remarks ACLs
Overview
It means: MAC ACLs
Switch Port ACLs can only apply to layer 2 interfaces
on switches, inbound direction and only use with
named ACLs
Sw1#conf t
Sw1(config)#mac access-list extended yournameACL
Sw1(config-ext-macl)#deny|permit source destination
source/dest: any|host|H.H.H
Sw1(config)#int f0/5
Sw1(config-if)#mac access-group yournameACL in
54
Time-based ACLs
Overview
Time-based ACLs work like extended ACLs do, but their type
of access control is totally time oriented.
The time period is based upon the routers clock
Router#conf t
Router(config)#time range no-chat
Router(config-time-range)#period weekdays start to end
Router(config-time-range)#exit
Router(config)#ip access-list extended Chat-time
Router(config-ext-nacl)#deny tcp any any eq chat time-range no-chat
Router(config-ext-nacl)# int fa0/0
Router(config-if)#ip access-group Chat-time in
Router(config-if)#exit
56
Remarks ACLs
Remarks
Allow including comments, or rather remarks, regarding the
entries in both IP standard and extended ACLs, or named
ACLs.
R2#config t
Placing ACLs
Placing ACLs
Source 10.0.0.0/8
Destination 172.16.0.0/16
Rules
Place extended ACLs as close to the source of the traffic denied as
possible.
Place the standard ACL as close to the destination as possible.
60
deny telnet
deny ftp
permit any
Source
10.0.0.0/8
Destination 172.16.0.0/16
deny telnet
deny ftp
permit any
Source 10.0.0.0/8
Router A
Destination 172.16.0.0/16
deny 10.0.0.0
permit any
Source 10.0.0.0/8
Destination 172.16.0.0/16
Router D
Verify ACLs
The show ip interface command displays IP
interface information and indicates whether any ACLs
are set.
The show access-lists command displays the
contents of all ACLs.
By entering the ACL name or number as an option for this
command, you can see a specific list.
64
Firewall
Firewall
Firewalls Example
ISPs use ACLs to deny RFC 1918 addresses into their networks as these are nonroutable Internet addresses.
IP packets coming into your network should never have a source addresses that
belong to your network. (This should be applied on all network entrance routers.)
There are several other simple access lists which should be added to network
entrance routers.
68