ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Access-list (ACL) basics: filtering, classification and where to apply an ACL

Lesson 7.18 minIntermediateNovember 17, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • By default a router routes all IP packets: there are no restrictions. An access-list (ACL) adds them.
  • An ACL looks at layer 3 (IP addresses) and layer 4 (TCP/UDP ports) information.
  • Filtering: allowing traffic (permit) or dropping it (deny). Classification: "selecting" traffic without dropping it, for example which traffic a VPN encrypts.
  • Three places to apply an ACL: inbound on an interface (packets entering the router), outbound on an interface (packets leaving the router), the VTY lines (Telnet/SSH access).
  • Order with an outbound ACL: routing table → exit interface → ACL check. Without a route, the packet is dropped before it reaches the ACL.

A router permits everything by default

In a perfect world we could trust everyone and nobody would make mistakes. In a real network there are threats from outside as well as mistakes inside, so we need to protect the network.

By default a router routes all IP packets: there are no restrictions. If the router has a route to the destination in its routing table, the packet is forwarded. In this lesson we meet the access-list (ACL for short) and see how to restrict IP packets entering or leaving a router.

An ACL works at two layers of the OSI model:

LayerWhat an ACL can look at
Network (layer 3)Source and destination IP addresses, protocol (ICMP, TCP, UDP, OSPF...)
Transport (layer 4)TCP and UDP port numbers (for example 80 for HTTP)

ACLs are used for two different purposes:

  • Filtering
  • Classification

Filtering

R1Internet10.10.1.0 /2410.10.3.0 /2410.10.2.0 /24ACLFrom the Internet: deny
Figure 1 · Filtering: the ACL decides which traffic may reach a part of the network (permit or deny)

Filtering means permitting certain traffic to reach a part of the network or dropping (deny) it.

Without filtering, traffic can go anywhere. In the network in the figure you probably don't want IP packets from the Internet to enter the internal network freely. With an ACL you can also set rules inside, for example block packets from 10.10.3.0 /24 to 10.10.1.0 /24.

Classification

R1R2VPN tunnel (encrypted)10.20.1.0 /24→ encrypt10.20.2.0 /24→ do not encryptThe ACL does not drop traffic, it only "selects" it
Figure 2 · Classification: the ACL selects which traffic the VPN encrypts

Classification does not drop packets the way filtering does. Here the ACL is used to "select" traffic.

In the figure there is a VPN between two routers that encrypts traffic. When building a VPN you can use an ACL to select which traffic is encrypted. For example, traffic from 10.20.1.0 /24 should be encrypted, but traffic from 10.20.2.0 /24 should not. This "selecting" of traffic by an ACL is called classification.

PurposeWhat the ACL doesExample
FilteringPermits or drops the packetBlocking access from the Internet to the internal network
ClassificationDoes not drop, only selectsSelecting the traffic a VPN encrypts

Where can an ACL be applied?

Let's look at filtering more closely. Once an ACL is created, it can be applied in three places:

R1ACLinboundentering the routerACLoutboundleaving the routerline vty 0 4Telnet / SSH access
Figure 3 · An ACL can be applied in three places: inbound on an interface, outbound on an interface and on the VTY lines

1. Inbound on an interface

If an ACL is applied inbound on an interface, all packets entering the router through that interface are checked against the ACL. This check happens before the packet is routed.

2. Outbound on an interface

If an ACL is applied outbound, packets go through the router and are checked against the ACL as they leave the interface. Let's look at the router's steps:

1 · Packet in2 · Routing table3 · No route → drop4 · Exit interface5 · No ACL → send6 · ACL → checkpermit → senddeny → dropnonefound
Figure 4 · Outbound ACL: the router first finds the route, picks the exit interface, then checks the packet against the ACL (step 7: permit → send, deny → drop)
  1. The IP packet enters the router.
  2. The router checks its routing table to see whether it knows the destination.
  3. If there is no matching entry in the routing table, the packet is dropped.
  4. If there is an entry, the router selects the correct exit interface.
  5. If there is no ACL on that interface, the packet is sent out of the interface.
  6. If there is an ACL, the packet is compared with the ACL.
  7. If the packet is permitted, it is sent; if it is denied, the packet is dropped.

Note: with an outbound ACL the router makes the routing decision first, and the ACL check comes after it. Without a route, the packet never reaches the ACL.

3. The VTY lines

The third place is the router's VTY lines. The VTY lines are used to connect to the router remotely with Telnet and SSH. Applying an ACL to the VTY lines restricts who can connect to the router's management access. We will configure this in the lab lesson.

PlaceWhat is checkedConfiguration command
Interface, inboundPackets entering the router through the interfaceip access-group <ACL> in
Interface, outboundPackets leaving through the interfaceip access-group <ACL> out
VTY linesTelnet/SSH connections to the routeraccess-class <ACL> in

In the next lesson we will learn how packets are checked inside an ACL and what types of ACL exist.

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1With no ACL configured, what does a router do with IP packets?

By default the router sets no restrictions; an ACL adds them.

2At which layers of the OSI model does an ACL work?

An ACL can look at IP addresses (layer 3) and TCP/UDP ports (layer 4).

3An ACL is used to select which traffic a VPN encrypts. What is this called?

Classification does not drop traffic, it only selects it.

4In which order does a router work with an outbound ACL?

With an outbound ACL the routing decision comes first; without a route, the packet is dropped before reaching the ACL.

5Where is an ACL applied to restrict Telnet/SSH access to the router?

The VTY lines are for remote Telnet/SSH connections; the ACL is applied there with access-class.
Was this lesson useful?

Comments

Sign in to comment.