Configure NAT64 for IPv4-Initiated Communication with Port Translation
Focus
Focus

Configure NAT64 for IPv4-Initiated Communication with Port Translation

Table of Contents

Configure NAT64 for IPv4-Initiated Communication with Port Translation

This task builds on the task to Configure NAT64 for IPv4-Initiated Communication, but the organization controlling the IPv6 network prefers to translate the public destination port number to an internal destination port number and thereby keep it private from users on the IPv4 untrust side of the firewall. In this example, port 8080 is translated to port 80. To do that, in the Original Packet of the NAT64 policy rule, create a new Service that specifies the destination port is 8080. For the Translated Packet, the translated port is 80.
  1. Enable IPv6 to operate on the firewall.
    1. Select
      Device
      Setup
      Session
      and edit the Session Settings.
    2. Select
      Enable IPv6 Firewalling
      .
    3. Click
      OK
      .
  2. (
    Optional
    ) When an IPv4 packet has its DF bit set to zero (and because IPv6 does not fragment packets), ensure the translated IPv6 packet does not exceed the path MTU for the destination IPv6 network.
    1. Select
      Device
      Setup
      Session
      and edit Session Settings.
    2. For
      NAT64 IPv6 Minimum Network MTU
      , enter the smallest number of byes into which the firewall will fragment IPv4 packets for translation to IPv6 (range is 1280-9216, default is 1280).
      If you don’t want the firewall to fragment an IPv4 packet prior to translation, set the MTU to 9216. If the translated IPv6 packet still exceeds this value, the firewall drops the packet and issues an ICMP packet indicating destination unreachable - fragmentation needed.
    3. Click
      OK
      .
  3. Create an address object for the IPv4 destination address (pre-translation).
    1. Select
      Objects
      Addresses
      and click
      Add
      .
    2. Enter a
      Name
      for the object, for example, nat64_ip4server.
    3. For
      Type
      , select
      IP Netmask
      and enter the IPv4 address and netmask of the firewall interface in the Untrust zone. This example uses 198.51.19.1/24.
    4. Click
      OK
      .
  4. Create an address object for the IPv6 source address (translated).
    1. Select
      Objects
      Addresses
      and click
      Add
      .
    2. Enter a
      Name
      for the object, for example, nat64_ip6source.
    3. For
      Type
      , select
      IP Netmask
      and enter the NAT64 IPv6 address with a netmask that is compliant with RFC 6052 (/32, /40, /48, /56, /64, or /96).
      For this example, enter 64:FF9B::/96.
      (The firewall encodes the prefix with the IPv4 source address 192.1.2.8, which is C001:0208 in hexadecimal.)
    4. Click
      OK
      .
  5. Create an address object for the IPv6 destination address (translated).
    1. Select
      Objects
      Addresses
      and click
      Add
      .
    2. Enter a
      Name
      for the object, for example, nat64_server_2.
    3. For
      Type
      , select
      IP Netmask
      and enter the IPv6 address of the IPv6 server (destination). This example uses 2001:DB8::2/64.
      The source and destination must have the same netmask (prefix length).
    4. Click
      OK
      .
  6. Create the NAT64 rule.
    1. Select
      Policies
      NAT
      and click
      Add
      .
    2. On the
      General
      tab, enter a
      Name
      for the NAT64 rule, for example, nat64_ipv4_init.
    3. For
      NAT Type
      , select
      nat64
      .
  7. Specify the original source and destination information, and create a service to limit the translation to a single ingress port number.
    1. For the
      Original Packet
      ,
      Add
      the
      Source Zone
      , likely an untrust zone.
    2. Select the
      Destination Zone
      , likely a trust or DMZ zone.
    3. For
      Service
      , select New
      Service
      .
    4. Enter a
      Name
      for the Service, such as Port_8080.
    5. Select
      TCP
      as the
      Protocol
      .
    6. For
      Destination Port
      , enter 8080.
    7. Click
      OK
      to save the Service.
    8. For
      Source Address
      , select
      Any
      or
      Add
      the address object for the IPv4 host.
    9. For
      Destination Address
      ,
      Add
      the address object for the IPv4 destination, in this example, nat64_ip4server.
  8. Specify the translated packet information.
    1. For the
      Translated Packet
      , in the
      Source Address Translation
      ,
      Translation Type
      , select
      Static IP
      .
    2. For
      Translated Address
      , select the source translated address object you created, nat64_ip6source.
    3. For
      Destination Address Translation
      , for
      Translated Address
      , specify a single IPv6 address (the address object, in this example, nat64_server_2, or the IPv6 address of the server).
    4. Specify the private destination
      Translated Port
      number to which the firewall translates the public destination port number, in this example, 80.
    5. Click
      OK
      .
  9. Create a security policy to allow the NAT traffic from the Untrust zone.
    1. Select
      Policies
      Security
      and
      Add
      a rule
      Name
      .
    2. Select
      Source
      and
      Add
      a
      Source Zone
      ; select
      Untrust
      .
    3. For
      Source Address
      , select
      Any
      .
    4. Select
      Destination
      and
      Add
      a
      Destination Zone
      ; select
      DMZ
      .
    5. For
      Actions
      , select
      Allow
      .
    6. Click
      OK
      .
  10. Commit your changes.
    Click
    Commit
    .
  11. Troubleshoot or view a NAT64 session.
    >
    show session id
    <session-id>

Recommended For You