• Post author:Bhaskar Soni
  • Post published:
  • Post category:Networking
  • Post comments:0 Comments
  • Reading time:3 mins read

An access control list (ACL) is an ordered set of rules that permits or denies traffic. Network devices such as routers, switches and firewalls use ACLs to filter packets, protect management access and select traffic for features like NAT and QoS. There are several types of ACLs, and choosing the right one makes rules simpler and safer.

This guide compares the main types on Cisco devices, with syntax and examples.

types of ACLs

Quick comparison

TypeMatches onNumber range (Cisco)Best placement
StandardSource IP address only1–99 and 1300–1999Close to the destination
ExtendedSource, destination, protocol and ports100–199 and 2000–2699Close to the source
NamedSame as standard or extended, with a nameAny descriptive nameAs for its type
Time-basedExtended rules active at set timesUses a time rangeAs for extended
ReflexiveReturn traffic for sessions started insideNamed extendedNetwork edge
IPv6IPv6 addresses, protocols and portsNamed onlyAs for extended

1. Standard ACLs

Standard ACLs check only the source IP address. They are simple, but they cannot tell one service from another.

access-list 10 deny host 192.168.1.50
access-list 10 permit 192.168.1.0 0.0.0.255

Because they ignore the destination, place them close to the destination. Otherwise, you may block the source from far more than you intended. Standard ACLs are also handy for limiting SSH access to a router with access-class.

2. Extended ACLs

Extended ACLs match on source and destination addresses, the protocol (such as TCP, UDP or ICMP) and, optionally, port numbers. As a result, they can permit web traffic while blocking file sharing between the same hosts.

access-list 110 permit tcp 192.168.1.0 0.0.0.255 host 10.1.1.10 eq 443
access-list 110 deny   ip  192.168.1.0 0.0.0.255 host 10.1.1.10
access-list 110 permit ip  any any

The parts of each line are:

  • action: permit or deny;
  • protocol: ip, tcp, udp, icmp and others;
  • source and wildcard mask: for example 192.168.1.0 0.0.0.255;
  • destination and wildcard mask: or host for a single address;
  • port operator: eq, gt, lt, neq or range, plus the port.

Place extended ACLs close to the source, so unwanted traffic stops early.

3. Named ACLs

Named ACLs work like standard or extended ACLs but use a descriptive name. They also let you insert or delete individual lines by sequence number, which numbered ACLs handle less gracefully.

ip access-list extended WEB-ONLY
 10 permit tcp 192.168.1.0 0.0.0.255 any eq 443
 20 deny   ip any any log

In practice, most engineers prefer named ACLs for anything beyond a few lines.

4. Time-based ACLs

Time-based ACLs apply rules only during set periods, for example blocking social media during working hours.

time-range WORK-HOURS
 periodic weekdays 9:00 to 18:00
ip access-list extended NO-SOCIAL
 deny tcp 192.168.1.0 0.0.0.255 any eq 443 time-range WORK-HOURS

5. Reflexive and established ACLs

Reflexive ACLs allow return traffic only for sessions started from inside the network. A simpler option is the established keyword, which allows TCP packets that belong to existing connections. Today, however, stateful firewalls usually handle this job better.

6. IPv6 ACLs

IPv6 ACLs are always named and work like extended ACLs. They end with implicit rules that permit neighbour discovery before the final implicit deny.

ACLs beyond networking

The term ACL also appears in operating systems, where file system ACLs grant permissions to specific users and groups. See our guide to advanced Linux permissions.

Related guides

Sources

Need help with network security? We test routers, firewalls, ACLs and segmentation as part of our VAPT services and hardening audits. Contact us for a quote.

Post author avatar

Bhaskar Soni

Bhaskar Soni is a Security Engineer and the founder of Youngster Company, based in Ahmedabad, Gujarat. He works hands-on with Linux server hardening, vulnerability assessment and penetration testing (VAPT), ISO 27001 compliance and OSINT investigations. He writes practical, tested guides for IT professionals and Indian businesses, and every article on this site is written or reviewed by him.

Leave a Reply