10 Acl
10 Acl
Standard ACLs:
ACLs only filter at Layer 3 using the source IPv4 address only.
Extended ACLs:
Note:
ACLs do not have to be configured in both directions. The number of
ACLs and their direction applied to the interface will depend on the
security policy of the organization.
ACL Operation
Base ACLs on the organizational security This will ensure you implement
policies. organizational security guidelines.
Use a text editor to create, edit, and save all of This will help you create a library of reusable
your ACLs. ACLs.
Document the ACLs using This will help you (and others) understand
the remark command. the purpose of an ACE.
▪ Wildcard masks use the following rules to match binary 1s and 0s:
Wildcard mask bit 0 – Match the corresponding bit value in the address
Wildcard mask bit 1 – Ignore the corresponding bit value in the address
Quick Comparison
Subnet Mask Wildcard Mask
Used for subnetting and dividing an
Used in access control lists (ACLs)
IP address into network and host
and routing to match specific criteria.
portions.
Recall that “0” equals a match and “1” equals ignore. To match a specific host
IPv4 address, a wildcard mask consisting of all zeroes (i.e., 0.0.0.0) is required.
The table lists in binary, the host IPv4 address, the wildcard mask, and the
permitted IPv4 address.
The 0.0.0.0 wildcard mask stipulates that every bit must match exactly. Therefore,
when the ACE is processed, the wildcard mask will permit only the 192.168.1.1
address.
Decimal Binary
The table lists in binary, the host IPv4 address, the wildcard mask, and the
permitted IPv4 addresses.
When processed, the wildcard mask 0.0.0.255 permits all hosts in the
192.168.1.0/24 network.
Decimal Binary
The wildcard mask 0.0.15.255 would correctly filter that range of addresses.
The table lists in binary the host IPv4 address, the wildcard mask, and the
permitted IPv4 addresses.
The highlighted wildcard mask bits identify which bits of the IPv4 address must
match. When processed, the wildcard mask 0.0.15.255 permits all hosts in the
192.168.16.0/24 to 192.168.31.0/24 networks.
Decimal Binary
192.168.16.0/24 11000000.10101000.00010000.00000000
Permitted IPv4 Address to
192.168.31.0/24 11000000.10101000.00011111.00000000
Wildcard Mask Calculation - 1
Assume you wanted an ACE in ACL 10 to permit access to all users in the
192.168.3.0/24 network. To calculate the wildcard mask, subtract the subnet
mask (i.e., 255.255.255.0) from 255.255.255.255, as shown in the table.
The solution produces the wildcard mask 0.0.0.255. Therefore, the ACE would be
access-list 10 permit 192.168.3.0 0.0.0.255.
This solution produces the wildcard mask 0.0.0.15. Therefore, the ACE would be
access-list 10 permit 192.168.3.32 0.0.0.15.
This solution produces the wildcard mask 0.0.1.255. Therefore, the ACE would be
access-list 10 permit 192.168.10.0 0.0.1.255.
This solution produces the wildcard mask 0.0.15.255. Therefore, the ACE would be
access-list 10 permit 192.168.16.0 0.0.15.255.
host – This keyword substitutes for the 0.0.0.0 mask. This mask states
that all IPv4 address bits must match to filter just one host address.
any – This keyword substitutes for the 255.255.255.255 mask. This mask
says to ignore the entire IPv4 address or to accept any addresses.
Wildcard Mask Keywords -Example
Host:
R1(config)# access-list 10 permit 192.168.10.10 0.0.0.0
OR
Any:
R1(config)# access-list 11 permit 0.0.0.0 255.255.255.255
OR
We want to allow traffic from the management LAN to the server S1. First, we need to write an ACL to
permit traffic from LAN 10.0.0.0/24 to S1. We can use the following command on R1:
Router(config)no ip access-list 1
Named Access List
Understanding Requirements
To fulfill the above requirements, we have to add the following statements to
the extended access list.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip access-list extended UMT
Router(config-ext-nacl)#permit tcp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq 80
Router(config-ext-nacl)#permit udp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq 53
Router(config-ext-nacl)#deny ip 10.0.0.0 0.255.255.255 host 30.0.0.10
Router(config-ext-nacl)#permit ip 10.0.0.0 0.255.255.255 20.0.0.0 0.255.255.255
Router(config-ext-nacl)#deny ip 10.0.0.0 0.255.255.255 any
Router(config-ext-nacl)#exit
Router(config)#interface gigabitethernet 0/0
Router(config-if)#ip access-group UMT in
Router(config-if)#exit
Router(config)#exit
Extended ACL
The above commands create an extended access list UMT and apply it to the GigabitEthernet 0/0
interface in the inward direction. The access list contains five statements. The following table lists the
meaning of these statements.
Statements Description/action
Allow a packet if its source address is from the
permit tcp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq network 10.0.0.0/8 and the destination address is
80 30.0.0.10 and the destination application is HTTP.
Allow a packet if its source address is from the
permit udp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq network 10.0.0.0/8 and the destination address is
53 30.0.0.10 and the destination application is FTP.
Block a packet if its source address is from the
deny ip 10.0.0.0 0.255.255.255 host 30.0.0.10 network 10.0.0.0/8 and the destination address is
30.0.0.10.
Allow a packet if its source address is from the
permit ip 10.0.0.0 0.255.255.255 20.0.0.0
network 10.0.0.0/8 and the destination address is
0.255.255.255
from the network 20.0.0.0/8.
Block a packet if its source address is from the
deny ip 10.0.0.0 0.255.255.255 any network 10.0.0.0/8 and the destination address is
from any network.
TASK
Router>enable
Router#show ip access-lists
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip access-list extended University
Router(config-ext-nacl)#21 permit tcp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq 21
Router(config-ext-nacl)#exit
Router(config)#exit
Updating the extended ACL
Router#show ip access-lists
Extended IP access list University
10 permit tcp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq www
20 permit udp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq domain
21 permit tcp 10.0.0.0 0.255.255.255 host 30.0.0.10 eq ftp
30 deny ip 10.0.0.0 0.255.255.255 host 30.0.0.10
40 permit ip 10.0.0.0 0.255.255.255 20.0.0.0 0.255.255.255
50 deny ip 10.0.0.0 0.255.255.255 any
Router#
THANK YOU