Skip to content
FALCON CORETECHNOLOGIES

// Lesson 43 of 49 · Security fundamentals

Access control lists

Standard and extended ACLs, numbered and named, wildcard masks, the implicit deny, placement, and verification.
3 min read#acl#security#wildcard

An ACL is an ordered list of permit/deny statements. Applied to an interface, it filters packets entering or leaving; it is also used to select traffic for NAT, QoS, routing policy and VTY access.

How ACLs are processed

  1. Statements are checked top to bottom.
  2. The first match decides; later lines are not checked.
  3. If nothing matches, the hidden implicit deny any at the end drops the packet.

So: put specific entries before general ones, and make sure every ACL permits something — an ACL with only deny lines blocks everything.

Wildcard masks

Wildcards say which bits must match: 0 = must match, 1 = ignore. The quick way: wildcard = 255.255.255.255 − subnet mask.

Matches Wildcard Shortcut
One host 10.1.1.5 0.0.0.0 host 10.1.1.5
192.168.10.0/24 0.0.0.255
172.16.32.0/20 0.0.15.255
Everything 255.255.255.255 any

Standard ACLs — source only

Numbers 1–99 and 1300–1999, or named.

R1(config)# ip access-list standard MGMT-HOSTS
R1(config-std-nacl)# permit 192.168.99.0 0.0.0.255
R1(config-std-nacl)# permit host 10.1.1.50

Because they only look at the source, place standard ACLs close to the destination — otherwise you may block the source from more than you intended.

Extended ACLs — source, destination, protocol, ports

Numbers 100–199 and 2000–2699, or named.

permit|deny <protocol> <source> <wildcard> [port] <destination> <wildcard> [port] [established] [log]

Example: guests (VLAN 20) may browse the web and use DNS, but may not reach internal networks:

R1(config)# ip access-list extended GUEST-IN
R1(config-ext-nacl)# remark Guests: DNS and web to the internet only
R1(config-ext-nacl)# permit udp 192.168.20.0 0.0.0.255 any eq 53
R1(config-ext-nacl)# deny   ip  192.168.20.0 0.0.0.255 10.0.0.0 0.255.255.255
R1(config-ext-nacl)# deny   ip  192.168.20.0 0.0.0.255 172.16.0.0 0.15.255.255
R1(config-ext-nacl)# deny   ip  192.168.20.0 0.0.0.255 192.168.0.0 0.0.255.255
R1(config-ext-nacl)# permit tcp 192.168.20.0 0.0.0.255 any eq 80
R1(config-ext-nacl)# permit tcp 192.168.20.0 0.0.0.255 any eq 443
R1(config-ext-nacl)# deny   ip  any any log

R1(config)# interface GigabitEthernet0/0.20
R1(config-subif)# ip access-group GUEST-IN in

The DNS permit comes first so guests can still reach an internal DNS server if one is used; otherwise the private-range denies would block it. Place extended ACLs close to the source, so unwanted traffic is dropped early.

Direction

in filters packets arriving on the interface (before routing); out filters packets leaving it (after routing). One ACL per interface, per direction, per protocol.

Editing named ACLs

Named (and numbered, in modern IOS) ACLs have sequence numbers, so you can insert or remove a single line:

R1# show access-lists GUEST-IN
Extended IP access list GUEST-IN
    10 permit udp 192.168.20.0 0.0.0.255 any eq domain (152 matches)
    20 deny ip 192.168.20.0 0.0.0.255 10.0.0.0 0.255.255.255 (3 matches)
...
R1(config)# ip access-list extended GUEST-IN
R1(config-ext-nacl)# 15 permit icmp 192.168.20.0 0.0.0.255 any echo
R1(config-ext-nacl)# no 20

Verify

R1# show access-lists                    ! with hit counters
R1# show ip interface GigabitEthernet0/0.20 | include access list
R1# clear access-list counters

Watching the match counters while you test is the fastest way to see which line is catching traffic.

Key points

  • Top-down, first match, implicit deny at the end.
  • Wildcard 0 = match, 1 = ignore; host and any shortcuts.
  • Standard (source only) near the destination; extended near the source.
  • Use named ACLs with remarks; check counters to troubleshoot.

Sign in to save your lesson progress across devices. You can read every published lesson without an account.