3.2 Troubleshoot the router's security features
ENARSI 300-410 v1.1 · 3.0 Infrastructure Security
A router protects itself and the networks behind it with ACLs (standard, extended, time-based), IPv6 traffic filters, and unicast reverse path forwarding (uRPF), which drops packets whose source address could not have come from the interface they arrived on. Most faults are in the order of entries, the direction, and the implicit deny.
What you must know
- Write and place standard, extended and time-based IPv4 ACLs.
- Write IPv6 ACLs and apply them with
ipv6 traffic-filter, and know the implicit ND permits. - Configure uRPF in strict and loose mode and know where each fits.
- Read hit counters and drops to troubleshoot.
IPv4 ACLs
| Type | Matches | Place it | Example |
|---|---|---|---|
| Standard (1–99, 1300–1999) | Source only | Close to the destination | access-list 10 permit 10.1.1.0 0.0.0.255 |
| Extended (100–199, 2000–2699) | Protocol, source, destination, ports | Close to the source | permit tcp 10.1.1.0 0.0.0.255 any eq 443 |
| Named | Either, with sequence numbers to edit | – | ip access-list extended WEB |
| Time-based | Any entry + time-range | – | permit tcp any any eq 80 time-range WORKHOURS |
time-range WORKHOURS
periodic weekdays 8:00 to 18:00
!
ip access-list extended GUEST-IN
10 permit udp any any eq bootps
20 permit tcp 10.99.0.0 0.0.0.255 any eq 443 time-range WORKHOURS
30 deny ip 10.99.0.0 0.0.0.255 10.0.0.0 0.255.255.255 log
40 permit ip 10.99.0.0 0.0.0.255 any
!
interface GigabitEthernet0/2.99
ip access-group GUEST-IN in
R1# show access-lists GUEST-IN
Extended IP access list GUEST-IN
10 permit udp any any eq bootps (12 matches)
20 permit tcp 10.99.0.0 0.0.0.255 any eq 443 time-range WORKHOURS (active) (318 matches)
30 deny ip 10.99.0.0 0.0.0.255 10.0.0.0 0.255.255.255 log (7 matches)
40 permit ip 10.99.0.0 0.0.0.255 any (95 matches)Read top to bottom; the first match wins; anything unmatched is denied. One ACL per interface, per direction, per protocol. An ACL applied outbound does not filter traffic the router itself sends.
IPv6 traffic filters
ipv6 access-list V6-IN
permit tcp 2001:db8:99::/64 any eq 443
deny ipv6 2001:db8:99::/64 2001:db8::/32 log
permit ipv6 2001:db8:99::/64 any
!
interface GigabitEthernet0/2
ipv6 traffic-filter V6-IN inEvery IPv6 ACL ends with three hidden lines: permit icmp any any nd-na, permit icmp any any nd-ns, then deny ipv6 any any. Neighbour discovery keeps working, but router advertisements and other ICMPv6 are denied unless you permit them, and an explicit deny ipv6 any any log at the end kills ND because it comes before the hidden permits.
Unicast RPF
| Mode | Command | Passes when | Use |
|---|---|---|---|
| Strict | ip verify unicast source reachable-via rx | The best route to the source points back out this interface | Single-homed edges, customer-facing ports |
| Loose | ip verify unicast source reachable-via any | There is any route to the source (not to Null0) | Multihomed edges with asymmetric routing |
The spoofed packet (1) claims an internal source on the Internet link, so strict uRPF drops it. With asymmetric routing (traffic in on one ISP, routes out the other), strict mode drops legitimate traffic; use loose mode there. allow-default lets a default route count as a match; an ACL can log or permit what would be dropped.
R1# show ip interface GigabitEthernet0/0 | include verify|drops
IP verify source reachable-via RX
1489 verification drops
0 suppressed verification dropsCommands
show access-lists [name] | Entries with hit counters. |
show ip interface <if> | Inbound and outbound ACLs and uRPF drops. |
show ipv6 access-list | IPv6 ACL entries and counters. |
show time-range | Whether each time range is active. |
show cef interface <if> | uRPF state per interface. |
Exam traps
- The implicit deny at the end of every ACL; an ACL with only
denylines denies everything. - An explicit
deny ipv6 any anybefore the hidden ND permits breaks neighbour discovery. - Strict uRPF breaks asymmetric routing.
- Time ranges use the router's clock: set NTP first.
- An outbound ACL does not filter the router's own traffic.
Check yourself
- Where should a standard ACL go, and why?
- Close to the destination, because it matches the source only and would block too much near the source.
- Which ICMPv6 messages does an IPv6 ACL permit implicitly?
- Neighbour solicitation and neighbour advertisement.
- An edge router has two ISPs with asymmetric paths. Which uRPF mode?
- Loose (
reachable-via any). - A time-based entry never matches. First check?
- The router's clock and
show time-range(is it active?).
Labs
- Unicast RPF: drop spoofed sources, strict and loose
- IPv6 access lists: a guest filter, entry order and logging
Try it live: Unicast RPF: drop spoofed sources, strict and loose