An ACL is an ordered list of rules (statements) that a router checks top to bottom to decide whether to permit or deny traffic.
๐ Implicit deny exists at the end of every ACL (anything not matched is denied).
๐งฉ Types of Cisco ACLs
1๏ธโฃ Standard ACL
- Filters only by source IP address
- Numbered: 1โ99, 1300โ1999
- Usually placed near the destination
Example
access-list 10 permit 192.168.1.0 0.0.0.255
access-list 10 deny any
Apply to interface
interface g0/0
ip access-group 10 in
2๏ธโฃ Extended ACL
- Filters by:
- Source IP
- Destination IP
- Protocol (TCP/UDP/ICMP)
- Port numbers
- Numbered: 100โ199, 2000โ2699
- Placed near the source
Example
access-list 101 permit tcp 192.168.1.0 0.0.0.255 any eq 80
access-list 101 deny ip any any
Apply
interface g0/1
ip access-group 101 out
3๏ธโฃ Named ACL
- More readable and editable
- Can be standard or extended
Extended Named ACL Example
ip access-list extended WEB-FILTER
permit tcp 192.168.10.0 0.0.0.255 any eq 443
deny ip any any
Apply
interface g0/0
ip access-group WEB-FILTER in
๐ฏ Wildcard Mask Basics
Wildcard mask is the inverse of subnet mask:
| Subnet Mask | Wildcard |
|---|---|
| 255.255.255.0 | 0.0.0.255 |
| 255.255.255.255 | 0.0.0.0 |
Examples
host 192.168.1.10โ same as192.168.1.10 0.0.0.0anyโ same as0.0.0.0 255.255.255.255
๐ Inbound vs Outbound
- Inbound (in): Traffic checked before routing
- Outbound (out): Traffic checked after routing
ip access-group 101 in
ip access-group 101 out
โ ๏ธ Important Rules to Remember
โ ACLs are processed top-down
โ First match wins
โ One ACL per interface, per direction, per protocol
โ Always add explicit permit if needed (else implicit deny blocks traffic)
๐ Useful Show Commands
show access-lists
show ip access-lists
show run | section access-list
show ip interface g0/0
๐ Common Use Cases
- Block specific IPs or subnets
- Allow only HTTP/HTTPS traffic
- Restrict management access (SSH/Telnet)
- Basic firewalling on routers
Leave a comment