Understanding NPTv6 on Palo Alto Networks Firewalls

NPTv6 (Network Prefix Translation for IPv6), defined in RFC 6296, is a stateless, transport-agnostic IPv6-to-IPv6 translation mechanism. Unlike traditional stateful NAT (like NAT44 PAT or NAT64), NPTv6 focuses solely on translating the IPv6 network prefix while preserving the host identifier portion of the address and maintaining a 1:1 mapping between internal and external addresses within the translated prefixes.

What is NPTv6?

NPTv6 allows an organization to use stable internal IPv6 addresses (often Unique Local Addresses - ULAs, like fd00::/8 , or a stable Global Unicast Address - GUA) while using different, potentially changing, public GUA prefixes provided by ISPs for external communication.

Key Differences from NAT44/NAT64

Primary Use Cases

Palo Alto Implementation Details

NAT Policies are configured under: Policies > NAT

Configuring NPTv6 involves creating a specific type of NAT rule:

Bi-directional Configuration: Unlike simple SNAT, NPTv6 usually requires defining *both* the Source and Destination Address Translation within the *same rule* to handle traffic in both directions correctly. The "Original Packet" defines the traffic match, and the "Translated Packet" defines how source *and* destination prefixes are swapped.

Traffic Flow Example

Forward Path (Internal Client -> External Server):

# Original Packet Source IP: fd00:aaaa:bbbb::1234 Destination IP: 2001:db8:ffff::5678 # Packet After NPTv6 (Firewall -> External Server) Source IP: 2001:db8:100::1234 <-- Source Prefix Translated Destination IP: 2001:db8:ffff::5678 <-- Destination Unchanged by *this* translation direction

Return Path (External Server -> Internal Client):

# Original Packet (External Server -> Firewall External Prefix Host) Source IP: 2001:db8:ffff::5678 Destination IP: 2001:db8:100::1234 # Packet After Reverse NPTv6 (Firewall -> Internal Client) Source IP: 2001:db8:ffff::5678 <-- Source Unchanged by *this* translation direction Destination IP: fd00:aaaa:bbbb::1234 <-- Destination Prefix Translated

(Note: The "Destination Address Translation" part of the NPTv6 rule handles the return path destination translation.)

Interaction with Security Policy

Because NPTv6 primarily translates prefixes algorithmically and aims to be stateless at the NAT level, the translation often happens relatively late in the packet processing flow, similar to Source NAT.

Key Point: Security Policy rules for traffic subject to NPTv6 should generally match the original (pre-translation) source and destination zones and the original (pre-translation) source and destination addresses/prefixes .

Example Security Rule (Allowing internal ULA prefix out):

The Security policy allows the original flow based on internal addresses, and the NPTv6 rule then translates the prefix just before the packet leaves the firewall (or translates the destination prefix as it arrives on the return path).


NPTv6 Quiz

1. What is the primary goal of implementing NPTv6?

2. Which part of an IPv6 address does NPTv6 translate?

3. When configuring an NPTv6 rule on a Palo Alto firewall for bidirectional traffic (e.g., internal prefix fd00:1::/48 mapped to external 2001:db8:1::/48 ), what is typically configured in the "Translated Packet" tab?

4. Which statement best describes NPTv6 compared to traditional NAT/PAT?

5. How should Security Policy rules generally be configured for traffic that will be translated by NPTv6?