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

IPv4 ACLs

TypeMatchesPlace itExample
Standard (1–99, 1300–1999)Source onlyClose to the destinationaccess-list 10 permit 10.1.1.0 0.0.0.255
Extended (100–199, 2000–2699)Protocol, source, destination, portsClose to the sourcepermit tcp 10.1.1.0 0.0.0.255 any eq 443
NamedEither, with sequence numbers to edit–ip access-list extended WEB
Time-basedAny 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 in

Every 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

ModeCommandPasses whenUse
Strictip verify unicast source reachable-via rxThe best route to the source points back out this interfaceSingle-homed edges, customer-facing ports
Looseip verify unicast source reachable-via anyThere 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 drops

Commands

show access-lists [name]Entries with hit counters.
show ip interface <if>Inbound and outbound ACLs and uRPF drops.
show ipv6 access-listIPv6 ACL entries and counters.
show time-rangeWhether each time range is active.
show cef interface <if>uRPF state per interface.

Exam traps

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

Try it live: Unicast RPF: drop spoofed sources, strict and loose

More topics in 3.0 Infrastructure Security