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