The security team's four rules
The network is the one from the ACL lessons: Sales (192.168.10.0/24) and Admin (192.168.20.0/24) behind R1, the web server SRV1 (192.168.30.10) behind R2. Routing works and nothing is filtered yet. The security team writes:
- Sales may use the website on SRV1 (HTTP and HTTPS) and ping it. Nothing else from Sales may reach SRV1.
- Sales may reach every other destination as before.
- Only the Admin PC (192.168.20.10) may SSH to R1 and R2.
- The Admin LAN is not restricted.
Task 1: choose the ACL type and placement
For each rule: standard or extended ACL, which router, which interface or line, and which direction?
Show the plan
| Rules | ACL | Where | Why there |
|---|---|---|---|
| 1 and 2 | Extended, named SALES-IN | R1 Gi0/0, inbound | It matches source, destination and port, so it can go next to the source and drop unwanted traffic before it crosses the network. |
| 3 | Standard, named VTY-ADMIN | VTY lines on R1 and R2, access-class in | It only needs the source address, and it protects the routers' own logins. |
| 4 | None | – | No ACL on Gi0/2 means nothing from the Admin LAN is filtered. |
Task 2: write SALES-IN and VTY-ADMIN
Show the configuration
ip access-list extended SALES-IN
10 permit tcp 192.168.10.0 0.0.0.255 host 192.168.30.10 eq 80
20 permit tcp 192.168.10.0 0.0.0.255 host 192.168.30.10 eq 443
30 permit icmp 192.168.10.0 0.0.0.255 host 192.168.30.10 echo
40 deny ip 192.168.10.0 0.0.0.255 host 192.168.30.10
50 permit ip 192.168.10.0 0.0.0.255 any
!
interface GigabitEthernet0/0
ip access-group SALES-IN inR1. The order matters: the specific permits to SRV1 come before the deny for SRV1, and the general permit comes last. Line 50 is what keeps rule 2 working.
ip access-list standard VTY-ADMIN
permit host 192.168.20.10
!
line vty 0 15
access-class VTY-ADMIN inR1 and R2. access-class filters logins to the router itself; ip access-group would filter traffic passing through an interface.
What about DHCP for the Sales PCs?
If R1 is the DHCP server or relay for Sales, a DHCPDISCOVER arrives on Gi0/0 from 0.0.0.0 to 255.255.255.255. It matches no line of SALES-IN, so the implicit deny drops it and new PCs get no address. Add a line before the end: 45 permit udp any any eq bootps.
Task 3: predict four test packets
For each test, decide which line of SALES-IN matches (or whether the ACL is involved at all) before you watch.
Device key: PC1 (Sales) (computer) · Admin PC (laptop) · R1, R2 (router) · SRV1 (web) (server)
Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.
Reading the addresses
IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.
An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.
- PC1 (Sales): IP 192.168.10.10
- Admin PC: IP 192.168.20.10
- SRV1 (web): IP 192.168.30.10/24
- 1. Checked on the way in: line 10 doesn't match (port 80); line 20 matches: permit.
- 2. Delivered: the page loads. The replies come back through Gi0/0 outbound, which has no ACL.
Task 4: what the counters prove
R1#show access-lists SALES-IN Extended IP access list SALES-IN 10 permit tcp 192.168.10.0 0.0.0.255 host 192.168.30.10 eq www (152 matches) 20 permit tcp 192.168.10.0 0.0.0.255 host 192.168.30.10 eq 443 (1208 matches) 30 permit icmp 192.168.10.0 0.0.0.255 host 192.168.30.10 echo (8 matches) 40 deny ip 192.168.10.0 0.0.0.255 host 192.168.30.10 (4 matches) 50 permit ip 192.168.10.0 0.0.0.255 any (377 matches)
www. Counters only rise when a line matches, so they show which lines are actually doing something. Line 40's 4 matches are the blocked SSH attempts.On a busy router the counters climb all the time. clear access-list counters SALES-IN just before a test makes it easy to see which line a single test packet hit.
Task 5: three broken versions of the policy
A colleague applied SALES-IN with ip access-group SALES-IN out on R1 Gi0/0 instead of in. What happens to Sales?
Someone moved line 40 (deny ip … host 192.168.30.10) to sequence 5. What breaks?
New Sales PCs get no IP address after SALES-IN is applied. R1 is their DHCP server. What is the fix?