In the pf firewall, the pf.conf man page 'parameters' section states that "protocol"
is anything from /etc/protocols
, and that it's distinct from "address family"
("<af>"
) which is inet or inet6. /etc/protocols
in turn includes "IPv6" as a protocols, and in applications based on BSD such as the pfSense firewall, IPv6 is sometimes listed as a protocol as distinct from an IP family (eg in NAT rule definitions).
But IPv6 isn't a protocol in the sense that tcp/udp/icmp are. There's a clear logical and functional distinction between IPv4/IPv6 as the two IP address families (the underlying transport), and the many protocols transported within IPv4/IPv6.
(If it were then nat on em1 inet proto ipv6 from 1.2.3.4 to any -> 5.6.7.8 port 2000:2999
andblock drop in inet proto ipv6 from 1.2.3.4 to any
would be meaningful and comparable tonat on em1 inet proto tcp from 1.2.3.4 to any -> 5.6.7.8 port 2000:2999
andblock drop in inet proto tcp from 1.2.3.4 to any
)
When would IPv6 be meaningful or used in the "protocol" field in a PF rule, as opposed to specifying it as the address family? (And could NAT being almost always used for IPv4 only, have anything to do with it?)