Lesson 6 of 9 · 29m
Firewall Parity: Securing the Second Network
Build equivalent IPv4 and IPv6 policy while accounting for ICMPv6, link-local traffic, extension headers, and source-address reality.
The easiest way to deploy IPv6 insecurely is to protect IPv4 carefully and treat IPv6 as a networking experiment. Attackers do not care which protocol carried the connection. If the same service is reachable over both protocols, both paths need equivalent policy — not copy-pasted rules, but equivalent intent adapted to protocol differences.
ICMPv6 is not optional noise
Many operators learned bad habits by filtering IPv4 ICMP aggressively. In IPv6, ICMPv6 carries Neighbor Discovery, path MTU signaling, router discovery, and error reporting. Blocking it wholesale breaks address resolution and fragmentation behavior.
At minimum, understand these types:
133 router solicitation
134 router advertisement
135 neighbor solicitation
136 neighbor advertisement
137 redirect
1 destination unreachable
2 packet too big
3 time exceededPacket-too-big messages are especially important because routers do not fragment IPv6 packets in transit. If you block them, connections may hang only when large responses appear — the classic "TLS handshake works, page transfer stalls" failure.
Write policy by intent
Instead of cloning IPv4 line by line, express the control objective and implement both versions:
allow internet clients to tcp/443 on public web nodes
allow web nodes to reach upstream API nodes on tcp/8443
allow established return traffic
allow required ICMPv6 control plane
deny all other inbound trafficAn nftables skeleton for a dual-stack host might separate ICMPv6 explicitly:
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state established,related accept
iif "lo" accept
tcp dport { 80, 443 } accept
ip6 nexthdr icmpv6 icmpv6 type { packet-too-big, time-exceeded, parameter-problem, destination-unreachable } accept
ip6 nexthdr icmpv6 icmpv6 type { echo-request } limit rate 20/second accept
}
}NAT absence changes exposure assumptions
IPv6 hosts often hold globally routable addresses. Without NAT as an accidental inbound barrier, host firewalls and network policy become visibly important. This is a feature: end-to-end reachability is explicit. But it means every temporary test listener can become internet-reachable if policy is sloppy.
Audit actual listening sockets and actual reachable paths:
ss -lntup
sudo nft list rulesetField notes
- Firewall parity includes logging parity. If IPv6 accepts are not logged or exported, incident response loses half the evidence.
- Security groups, cloud ACLs, load balancer rules, host firewalls, and service mesh policy can differ per family; audit every layer.
- Do not permit all ICMPv6 "because IPv6 needs it." Permit what the segment and role require.
- A rule matching IPv4 literals cannot protect the same service when clients use AAAA records. Review policy objects for family coverage.
Was this lesson helpful?