Manual Chapter :
Using Firewall NAT for IP and Port Translation
Applies To:
Show VersionsBIG-IP AFM
- 14.1.3, 14.1.2, 14.1.0
Using Firewall NAT for IP and Port Translation
About using Firewall NAT to translate
addresses and ports
Firewall NAT on the BIG-IP®Advanced Firewall Manager™ system supports advanced NAT functionality on
the AFM™ system.
NAT matching policies
NAT policies present a configurable collection of NAT matching rules and NAT translation
objects, for inbound and outbound connections. The system matches flows and applies NAT
rules, after the matching for firewall rules occurs. Firewall NAT allows you to configure a
rule to match traffic, to which NAT source and destination translation rules are applied.
Source and destination translation items are configured individually, and can be applied to
multiple rules and contexts. Generally, overlapping addresses cannot be configured in NAT
source or destination rules. However, you can configure overlapping addresses between two
Dynamic PAT items that have the PAT mode set to NAPT or Port Block Allocation
mode.
Firewall NAT can be used on a system with
F5®BIG-IP CGNAT (Carrier-Grade NAT). Firewall NAT policies operate with CGNAT
policies when applied on the same virtual server.
NAT contexts and precedence
You can configure a firewall NAT policy at the global, virtual server, or route domain
context. NAT address and port assignment takes place only at the virtual server level, so a
Firewall NAT policy configured at the global context applies on each individual virtual
server, and a firewall NAT policy configured at the route domain context applies to all
virtual servers on that route domain.
Similarly, NAT policies apply precedence in most-specific to least-specific order. A
firewall NAT policy configured on a virtual server takes precedence over a policy configured
on the route domain context, or at the global context.
Translation address persistence
The firewall NAT feature module can assign the same external (translation) address to all
connections originated by the same internal client, providing endpoint-independent address
mapping.
Efficient logging
Firewall NAT supports log messages that map external addresses and ports back to internal
clients for both troubleshooting and compliance with law enforcement/legal constraints.
Network address and port
translation
Network address and port translation (NAPT) mode provides standard address and port
translation allowing multiple clients in a private network to access remote networks using
the single IP address assigned to their router.
Proxy ARP
Currently when using AFM NAT to map a range of client source addresses to a range in the
same subnet as the IP address of the egress interface, the BIG-IP system does not proxy ARP
for the translated source addresses.
Deterministic assignment of translation
addresses
Deterministic mode is an option used to assign translation address, and is port-based on
the client address/port and destination address/port. It uses reversible mapping to reduce
the amount of log messages, while still maintaining the ability for translated IP address to
be discovered for troubleshooting and compliance. Deterministic mode also provides an option
to configure backup-members.
Port block allocation of translation
addresses
Port block allocation (PBA) mode is an option that reduces logging, by logging only the
allocation and release of a block of ports. When a subscriber sends a translation request,
the BIG-IP system services the request from a block of ports that is assigned to a single IP
address, and only logs the allocation and release of that block of ports. The BIG-IP system
applies subsequent requests from the service provider to that block of ports until all ports
are used.
To use Firewall NAT, you
must create a firewall NAT policy, define a matching rule, attach source or destination
translation items, and configure the NAT policy at the device level, on a route domain, or
on a virtual server.
About Firewall NAT and
Carrier Grade NAT (CGNAT)
Firewall NAT on the BIG-IP
Advanced Firewall Manager system can be used with
Carrier Grade NAT (CGNAT). Firewall NAT policies are not supported with either LTM SNAT pools or CGNAT LSN-pool configurations on a virtual server.
- If an LTM SNAT pool or CGNAT LSN-pool is applied to a virtual server, a Firewall NAT policy cannot then be applied to that virtual server.
- If a Firewall NAT policy is applied to a virtual server, an LTM SNAT pool or CGNAT LSN-pool cannot be applied to that virtual server. Note that this extends to all contexts at which the Firewall NAT policy can be applied. For example, if a virtual server uses a Firewall NAT policy that is applied on the route domain, an LTM SNAT pool or CGNAT LSN-pool cannot then be applied to that virtual server.
About specifying source translations for Firewall NAT
Source Translation items
With Firewall NAT, source translation rules are contained in a source translation item. This
item contains address and port information for the translation pools, and configuration
information for each source translation type.
Static NAT
Static NAT mode provides simple 1:1 mapping between the destination IP address and the router
IP address. An equal number of internal and external IP addresses must be specified. Ports
are not translated.
Static PAT
Static PAT (also known as NAPT) mode provides standard address and port translation allowing
multiple clients in a private network to access remote networks using the single IP address
assigned to their router. For outbound packets, Static PAT translates the source IP address
and source port. For inbound packets, Static PAT translates the destination IP address, the
destination port, and the IP and transport header checksums. This mode is beneficial for
remote access users. NAPT is the default mode for firewall NAT source translation items.
Dynamic PAT
Dynamic PAT mode provides inbound connection configuration options and mapping options.
With Dynamic PAT you can configure inbound connections with
endpoint independent
filtering
, which specifies that the translation attempts to reuse both the address and
port mapping (X:x to X':x') for subsequent packets sent from the same internal IP address and
port. The BIG-IP system attempts to map X:x to X':x' in every session. This is called
Endpoint Independent Mapping
in section 4.1 of RFC 4787. Dynamic PAT also allows you to configure the following
mapping modes
. - Address pooling paired
- Enables all sessions associated with an internal IP address to map to the same external IP address for the duration of the session.
- Endpoint independent mapping
- Enables use of the same external address and port for all connections from the host, if it uses the same internal port.
Deterministic Mode
With Dynamic PAT, you can configure a source translation item to use
deterministic
mode. Deterministic mode maps internal addresses to external
addresses algorithmically, which significantly reduces the amount of log entries generated,
while mapping a subscriber's inside IP address with an outside Internet address and port.Port Block Allocation Mode
With Dynamic PAT, you can configure a source translation item to use port block allocation
(PBA) mode. Port block allocation mode is a translation mode option that reduces logging, by
logging only the allocation and release of each block of ports. When a subscriber first
establishes a network connection, the BIG-IP system reserves a block of ports on a single IP
address for that subscriber. The system releases the block when no more connections are
using it. This reduces the logging overhead because the system logs only the allocation and
release of each block of ports. When a subscriber first connects, the PBA translation mode
applies client port block limits, which the subscriber uses as long as it has addresses
allocated. For each subscriber, PBA mode compares the subscriber's allocated number of port
blocks to the port block limit for the currently connected pool. If the allocated number of
port blocks exceeds the port block limit, then the connection is denied. For example, if a
subscriber's allocated number of port blocks is 2, and the port block limit for the
currently connected pool is 1, then the connection is denied.
Client Connection Limit
In
Dynamic PAT
modes, you can configure a client connection
limit
. This allows you to specify the maximum number of simultaneous translated
connections a client or subscriber is allowed to have.Hairpin Mode
In
Dynamic PAT
modes, you can configure hairpin mode
. When
a client sends a packet to another client in the same private network,hairpin mode sends the
packet directly to the destination client's private address. The BIG-IP system immediately
translates the packet's public-side destination address. Rather than going out to the public
network and returning later for translation, the packet takes a "hairpin turn" at the BIG-IP
device.Exclude Addresses
In
Dynamic PAT
modes, when you add a source or destination translation item, you can specify addresses to exclude from source translation in the Excluded Address
field.Specifying source IP addresses for static NAT
Specify static NAT source IP NAT translations to configure the NAT translation
addresses for one-to-one static NAT.
- On the Main tab, click.The Source Translation screen opens.
- ClickCreate.The New Source Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectStatic NAT.
- In theAddressesfield, add an address or address range on which source translation is performed. ClickAddfor each address or address range.
- From theICMP Echolist, select whether to enable or disable ICMP echo on translated addresses.
- From theEgress interfacesarea, specify the egress interfaces on which source translation is enabled or disabled. SelectEnabled onorDisabled onto specify the egress interface setting.Egress interfaces include tunnels and VLANs.
The new source translation item appears
on the Source Translation screen.
Associate the source translation item
to a NAT policy, and associate the policy to a virtual server, route domain, or to the
global context.
Specifying source IP addresses for static PAT
Specify a static PAT source NAT translation to configure the NAT translation
addresses for NAT address and port translation.
- On the Main tab, click.The Source Translation screen opens.
- ClickCreate.The New Source Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectStatic PAT.
- In theAddressesfield, add an address or address range on which source translation is performed. ClickAddfor each address or address range.
- In thePortsfield, add a port or port range on which source translation is performed. ClickAddfor each port or port range.
- From theICMP Echolist, select whether to enable or disable ICMP echo on translated addresses.
- From theEgress interfacesarea, specify the egress interfaces on which source translation is enabled or disabled. SelectEnabled onorDisabled onto specify the egress interface setting.Egress interfaces include tunnels and VLANs.
The new source translation item appears
on the Source Translation screen.
Associate the source translation item
to a NAT policy, and associate the policy to a virtual server, route domain, or to the
global context.
Specifying source IP addresses for deterministic dynamic PAT
Deterministic address translation mode provides address translation that eliminates
logging of every address mapping, while still allowing internal client address tracking
using only an external address and port, and a destination address and port.
Deterministic mode allows unique identification of the internal client address based on:
external address and port (the address and port visible to the destination server),
destination address and port (the service accessed by the client), and time. Use
Deterministic mode to significantly reduce the logging burden, while mapping a
subscriber's inside IP address with an outside Internet address and port.
- On the Main tab, click.The Source Translation screen opens.
- ClickCreate.The New Source Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectDynamic PAT.
- In theAddressesfield, add an address or address range on which source translation is performed. ClickAddfor each address or address range.
- In thePortsfield, add a port or port range on which source translation is performed. ClickAddfor each port or port range.
- From theICMP Echolist, select whether to enable or disable ICMP echo on translated addresses.
- From thePAT Modelist, selectDeterministic.
- From the Inbound Mode list, select the persistence setting for NAT translation entries.
- Nonedisables persistence. With this setting, the mapping of address X and port x (X:x) to address:port X':x' is never guaranteed to persist from one session to the next.
- Endpoint Independent Filteringspecifies that the translation attempts to reuse both the address and port mapping (X:x to X':x') for subsequent packets sent from the same internal IP address and port. The BIG-IP system attempts to map X:x to X':x' in every session. This is calledEndpoint Independent MappinginRFC 4787, section 4.1.
- From the Mapping Mode list, select the mapping mode to determine how dynamic ports are assigned, and specify the timeout in seconds for the mapping mode.
- SelectAddress Pooling Pairedto enable all the sessions associated with an internal IP address to map to the same external IP address for the duration of the session.
- SelectEndpoint Independent Mappingto assign the same external address and port for all connections from the host if it uses the same internal port.
- SelectNoneto assign no mapping mode to dynamic port assignments.
- If required, in theClient Connection Limitfield, specify the maximum number of simultaneous translated connections a client or subscriber is allowed to have.The default value of0specifies no limit.
- From theHairpin Modelist, enable or disable hairpin mode.When a client sends a packet to another client in the same private network,hairpin modesends the packet directly to the destination client's private address; the BIG-IP system immediately translates the packet's public-side destination address. Rather than going out to the public network and coming back later for translation, the packet takes a hairpin turn at the BIG-IP device.
- From theEgress interfacesarea, specify the egress interfaces on which source translation is enabled or disabled. SelectEnabled onorDisabled onto specify the egress interface setting.Egress interfaces include tunnels and VLANs.
- In the Backup Address field, specify backup IP addresses.This setting creates a pool of IP addresses available for backup members, which are used if Deterministic mode translation fails and falls back to NAPT mode. This is a collection of IP prefixes with their prefix lengths. You can type backup members in theAdd a Backup IP Addressfield, and clickAdd.
- ClickSubmit.
The new source translation item appears
on the Source Translation screen.
Associate the source translation item
to a NAT policy, and associate the policy to a virtual server, route domain, or to the
global context.
Specifying source IP addresses for dynamic PAT with NAPT
Specify a dynamic PAT source NAT translation to configure the NAT translation
addresses for NAT address and port translation for deterministic mode, which reduces
logging of address mapping, while still allowing internal client address tracking using
only an external address and port, and a destination address and port.
- On the Main tab, click.The Source Translation screen opens.
- ClickCreate.The New Source Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectDynamic PAT.
- In theAddressesfield, add an address or address range on which source translation is performed. ClickAddfor each address or address range.
- In theExclude Addressesfield, specify addresses to exclude from source translation. Click Add for each address or address range.
- In thePortsfield, add a port or port range on which source translation is performed. ClickAddfor each port or port range.
- From theICMP Echolist, select whether to enable or disable ICMP echo on translated addresses.
- From thePAT Modelist, selectDeterministic.
- From the Inbound Mode list, select the persistence setting for NAT translation entries.
- Nonedisables persistence. With this setting, the mapping of address X and port x (X:x) to address:port X':x' is never guaranteed to persist from one session to the next.
- Endpoint Independent Filteringspecifies that the translation attempts to reuse both the address and port mapping (X:x to X':x') for subsequent packets sent from the same internal IP address and port. The BIG-IP system attempts to map X:x to X':x' in every session. This is calledEndpoint Independent MappinginRFC 4787, section 4.1.
- From the Mapping Mode list, select the mapping mode to determine how dynamic ports are assigned, and specify the timeout in seconds for the mapping mode.
- SelectAddress Pooling Pairedto enable all the sessions associated with an internal IP address to map to the same external IP address for the duration of the session.
- SelectEndpoint Independent Mappingto assign the same external address and port for all connections from the host if it uses the same internal port.
- SelectNoneto assign no mapping mode to dynamic port assignments.
- If required, in theClient Connection Limitfield, specify the maximum number of simultaneous translated connections a client or subscriber is allowed to have.The default value of0specifies no limit.
- From theHairpin Modelist, enable or disable hairpin mode.When a client sends a packet to another client in the same private network,hairpin modesends the packet directly to the destination client's private address; the BIG-IP system immediately translates the packet's public-side destination address. Rather than going out to the public network and coming back later for translation, the packet takes a hairpin turn at the BIG-IP device.
- From theEgress interfacesarea, specify the egress interfaces on which source translation is enabled or disabled. SelectEnabled onorDisabled onto specify the egress interface setting.Egress interfaces include tunnels and VLANs.
- ClickSubmit.
The new source translation item appears
on the Source Translation screen.
Associate the source translation item
to a NAT policy, and associate the policy to a virtual server, route domain, or to the
global context.
Specifying source IP addresses for port block allocation mode
Specify a dynamic PAT source NAT translation to configure the NAT translation
addresses for NAT address and port translation for port block allocation (PBA) mode,
which reduces logging of address mapping, by assigning a block of ports to a translated
address and port.
- On the Main tab, click.The Source Translation screen opens.
- ClickCreate.The New Source Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectDynamic PAT.
- In theAddressesfield, add an address or address range on which source translation is performed. ClickAddfor each address or address range.
- In thePortsfield, add a port or port range on which source translation is performed. ClickAddfor each port or port range.
- From theICMP Echolist, select whether to enable or disable ICMP echo on translated addresses.
- From thePAT Modelist, selectPort Block Allocation.
- From the Inbound Mode list, select the persistence setting for NAT translation entries.
- Nonedisables persistence. With this setting, the mapping of address X and port x (X:x) to address:port X':x' is never guaranteed to persist from one session to the next.
- Endpoint Independent Filteringspecifies that the translation attempts to reuse both the address and port mapping (X:x to X':x') for subsequent packets sent from the same internal IP address and port. The BIG-IP system attempts to map X:x to X':x' in every session. This is calledEndpoint Independent MappinginRFC 4787, section 4.1.
- From the Mapping Mode list, select the mapping mode to determine how dynamic ports are assigned, and specify the timeout in seconds for the mapping mode.
- SelectAddress Pooling Pairedto enable all the sessions associated with an internal IP address to map to the same external IP address for the duration of the session.
- SelectEndpoint Independent Mappingto assign the same external address and port for all connections from the host if it uses the same internal port.
- SelectNoneto assign no mapping mode to dynamic port assignments.
- If required, in theClient Connection Limitfield, specify the maximum number of simultaneous translated connections a client or subscriber is allowed to have.The default value of0specifies no limit.
- From theHairpin Modelist, enable or disable hairpin mode.When a client sends a packet to another client in the same private network,hairpin modesends the packet directly to the destination client's private address; the BIG-IP system immediately translates the packet's public-side destination address. Rather than going out to the public network and coming back later for translation, the packet takes a hairpin turn at the BIG-IP device.
- From theEgress interfacesarea, specify the egress interfaces on which source translation is enabled or disabled. SelectEnabled onorDisabled onto specify the egress interface setting.Egress interfaces include tunnels and VLANs.
The new source translation item appears
on the Source Translation screen.
Associate the source translation item
to a NAT policy, and associate the policy to a virtual server, route domain, or to the
global context.
About specifying destination translations for Firewall NAT
Destination Translation items
With Firewall NAT, destination translation rules are contained in a destination translation
item. This item contains address and port information for the translation pools, and
configuration information for each destination translation type.
Static NAT
Static NAT mode provides simple 1:1 mapping between the destination IP address and the router
IP address. An equal number of internal and external IP addresses must be specified. Ports are
not translated.
Static PAT
Static PAT (also known as NAPT) mode provides standard address and port translation allowing a
single IP address to access remote networks using the single IP address assigned to their
router. For outbound packets, Static PAT translates the source IP address and source port. This
mode is beneficial for remote access users.
Specifying destination IP addresses for static NAT
Add a static NAT destination translation to a Firewall NAT policy to configure the
NAT translation addresses for one-to-one mapping of internal destination addresses to
external destination addresses.
- On the Main tab, click.The Destination Translation screen opens.
- ClickCreate.The New Destination Translation screen opens.
- In theNameandDescriptionfields, type the name and an optional description.
- From theTypelist, selectStatic NAT.
- In theAddressesfield, add an address or address range on which destination translation is performed. ClickAddfor each address or address range.
- ClickSubmit.
The new destination translation item
appears on the Destination Translation screen.
Associate the destination translation
item to a NAT policy, and associate the policy to a virtual server, route domain, or to
the global context.
Specifying destination IP addresses for static PAT
Derfine a Static PAT destination NAT translation to define destination addresses
and ports to translate from internal to external addresses.
- On the Main tab, click.The Destination Translation screen opens.
- ClickCreate.The New Destination Translation screen opens.
- From theTypelist, selectStatic PAT.
- In theAddressesfield, add an address or address range on which destination translation is performed. ClickAddfor each address or address range.
- In thePortsfield, add a port or port range on which destination translation is performed. ClickAddfor each port or port range.
- ClickSubmit.
The new destination translation item
appears on the Destination Translation screen.
Associate the destination translation
item to a NAT policy, and associate the policy to a virtual server, route domain, or to
the global context.
About creating
Firewall NAT policies
Firewall NAT policies collect rules to provide NAT address and port
translation for source and destination addresses, including match rules for addresses and
protocols, and translation rules for source and destination. You can attach a NAT policy at the
device level, a route domain, or to a virtual server.
Creating a NAT policy
Create a NAT policy to attach to the device level, a route domain, or a virtual
server, to provide NAT address matching and address and port translation for source and
destination addresses.
- On the Main tab, click.The Policies screen opens.
- ClickCreateto create a new policy.
- In theNameandDescriptionfields, type the name and an optional description.
- ClickAdd Ruleto add a NAT rule to the policy.Click the arrow next toAdd Ruleif you want to choose whether to add the rule at the beginning or end of the list. Note that a rule must be selected to add a rule before or after it.A blank rule appears in the policy.
You have now configured a NAT policy.
Creating a NAT match rule
You can create a NAT match rule in a NAT policy, to identify traffic flows to which
the system applies the NAT source and destination translation items.
- On the Main tab, click.The Policies screen opens.
- From the policy list, click the name of the NAT policy to which to add the rule.The NAT policy screen opens.
- ClickAdd Ruleto add a NAT rule to the policy.Click the arrow next toAdd Ruleif you want to choose whether to add the rule at the beginning or end of the list. Note that a rule must be selected to add a rule before or after it.A blank rule appears in the policy.
- In theNameandDescriptionfields, type the name and an optional description.
- In theStatecolumn, select the rule state.
- SelectEnabledto apply the rule on the protocol, addresses, and ports specified.
- SelectDisabledto disable the rule.
- In theProtocolcolumn, select the protocol to which the NAT rule applies.
- SelectAnyto apply the firewall rule to any protocol.
- Select the protocol name to apply the rule to a single protocol.
- SelectOtherand type the port number if the protocol is not listed.
- In theSourcefield, specify the addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, a geographic location, a subscriber or subscriber group, an address list, or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- In theDestinationfield, specify the destination addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, or an address list or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- From theLog Profilelist, select a logging profile to apply to the NAT rule.You can configure the logging profile on the virtual server security policy, instead of on the match rule.
- ClickCommit Changes to System.The policy with the updated rule is displayed.
You have now configured a NAT rule to match traffic, and apply NAT
translations.
About specifying NAT context for a Firewall NAT policy
You can configure a firewall NAT policy at the global, virtual server, or route domain context.
NAT address and port assignment takes place only at the virtual server level, so a Firewall NAT
policy configured at the global context applies on each individual virtual server, and a
firewall NAT policy configured at the route domain context applies to all virtual servers on
that route domain.
NAT policies
apply precedence in most-specific to least-specific order. A firewall NAT policy configured on a
virtual server takes precedence over a policy configured on the route domain context, or at the
global context.
When you specify a NAT policy on a virtual server, you can configure the virtual server to use
either the route domain policy, the device policy, or both. Orders of precedence still apply,
and the most specific NAT policy is applied.
Adding a global
Firewall NAT policy
You can specify a firewall NAT policy at the
device level to provide NAT translation for matched traffic on all route domains on the
device.
Note that you can override the device policy by assigning a
policy to a route domain, and by assigning a policy to a specific virtual
server.
- On the Main tab, click.The Network Firewall screen opens to Firewall Options.
- From theNetwork Address Translationlist, select the NAT policy to use for device-level NAT.
- ClickUpdate.The options are updated.
- On the Main tab, click.The Virtual Server List screen opens.
- Click the name of any virtual server on which you want the Global NAT policy to apply.
- On the menu bar, from the Security menu, choose Policies.
- To use the global Firewall NAT policy, in the Network Address Translation area, clickUse Device Policy.The most specific Firewall NAT policy is applied to the context, so a policy applied at the virtual server takes precedence over a route domain policy, which takes precedence over the global policy.
- ClickUpdateto save the changes.
You have now configured a NAT policy for the device.
Adding a NAT match
rule to the device policy
You can add a NAT match rule to the device NAT
policy, to identify traffic flows to which the system applies the NAT source and
destination translation items.
- On the Main tab, click.The Active Rules screen opens.
- From the Context Filter list, selectGlobal.
- Clickto add a NAT rule to the global policy.Click the arrow next toAdd Ruleif you want to choose whether to add the rule at the beginning or end of the list. Note that a rule must be selected to add a rule before or after it.A blank rule appears in the policy.
- In theNameandDescriptionfields, type the name and an optional description.
- In theStatecolumn, select the rule state.
- SelectEnabledto apply the rule on the protocol, addresses, and ports specified.
- SelectDisabledto disable the rule.
- In theProtocolcolumn, select the protocol to which the NAT rule applies.
- SelectAnyto apply the firewall rule to any protocol.
- Select the protocol name to apply the rule to a single protocol.
- SelectOtherand type the port number if the protocol is not listed.
- In theSourcefield, specify the addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, a geographic location, a subscriber or subscriber group, an address list, or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- In theDestinationfield, specify the destination addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, or an address list or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- From theLog Profilelist, select a logging profile to apply to the NAT rule.You can configure the logging profile on the virtual server security policy, instead of on the match rule.
- ClickCommit Changes to System.The policy with the updated rule is displayed.
You have now configured a NAT rule in the device policy to match traffic, and apply NAT
translations.
Configuring a route
domain to use Firewall NAT
Before performing this task, confirm that you have a configured Firewall NAT
policy.
Assign a Firewall NAT policy to a route domain to
use advanced NAT features for address and port translation on a route domain.
- On the Main tab, click.The Route Domain List screen opens.
- In the Name column, click the name of the relevant route domain.
- On the Main tab, clickSecurity.The Route Domain Security screen opens.
- From the Network Address Translation list, select the NAT policy to apply to route domain traffic.When a NAT policy is specified on a more specific context, that policy is applied. For example, a NAT policy on a route domain takes precedence over a global policy, and a policy on a virtual server takes precedence over a route domain policy.
- ClickUpdate.The system displays the list of route domains on the BIG-IP system.
- On the Main tab, click.The Virtual Server List screen opens.
- Click the name of any virtual server on which you want the Route Domain NAT policy to apply.
- On the menu bar, from the Security menu, choose Policies.
- To use the route domain Firewall NAT policy, in the Network address translation area, clickUse Route Domain Policy.The most specific Firewall NAT policy is applied to the context, so a policy applied at the virtual server takes precedence over a route domain policy, which takes precedence over the global policy.
- ClickUpdateto save the changes.
The route domain now applies the NAT policy to matching traffic, when the route domain
policy takes precedence.
Adding a NAT match
rule to a route domain
You can add a NAT match rule to a route domain NAT
policy, to identify traffic flows to which the route domain applies the NAT source and
destination translation items.
- On the Main tab, click.The Active Rules screen opens.
- From the Context Filter list, selectRoute Domain.
- From the Route Domain list, select the route domain to which you want to add NAT match rules.
- Clickto add a NAT rule to the route domain.Click the arrow next toAdd Ruleif you want to choose whether to add the rule at the beginning or end of the list. Note that a rule must be selected to add a rule before or after it.A blank rule appears in the policy.
- In theNameandDescriptionfields, type the name and an optional description.
- In theStatecolumn, select the rule state.
- SelectEnabledto apply the rule on the protocol, addresses, and ports specified.
- SelectDisabledto disable the rule.
- In theProtocolcolumn, select the protocol to which the NAT rule applies.
- SelectAnyto apply the firewall rule to any protocol.
- Select the protocol name to apply the rule to a single protocol.
- SelectOtherand type the port number if the protocol is not listed.
- In theSourcefield, specify the addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, a geographic location, a subscriber or subscriber group, an address list, or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- In theDestinationfield, specify the destination addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, or an address list or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- From theLog Profilelist, select a logging profile to apply to the NAT rule.You can configure the logging profile on the virtual server security policy, instead of on the match rule.
- ClickCommit Changes to System.The policy with the updated rule is displayed.
You have now configured a NAT rule in the device policy to match traffic, and apply NAT
translations.
Configuring Firewall NAT on a virtual server
After you create a firewall NAT policy, you
associate that published policy with the virtual server.
- On the Main tab, click.The Virtual Server List screen opens.
- Click the name of the virtual server you want to modify.
- On the menu bar, click.The screen displays policy settings for the virtual server.
- To use the global Firewall NAT policy, in the Network Address Translation area, clickUse Device Policy.The most specific Firewall NAT policy is applied to the context, so a policy applied at the virtual server takes precedence over a route domain policy, which takes precedence over the global policy.
- To use the route domain Firewall NAT policy, in the Network address translation area, clickUse Route Domain Policy.The most specific Firewall NAT policy is applied to the context, so a policy applied at the virtual server takes precedence over a route domain policy, which takes precedence over the global policy.
- From thePolicylist, select the Firewall NAT policy to apply to the context.
- ClickFinished.
The Firewall NAT policy is associated with the
virtual server.
Adding a NAT match
rule to a virtual server
You can add a NAT match rule to a virtual server
policy, to identify traffic flows to which the virtual serve applies the NAT source and
destination translation items.
- On the Main tab, click.The Active Rules screen opens.
- From the Context Filter list, selectVirtual Server.
- From the Virtual Server list, select the virtual server to which you want to add NAT match rules.
- Clickto add a NAT rule to the virtual server.Click the arrow next toAdd Ruleif you want to choose whether to add the rule at the beginning or end of the list. Note that a rule must be selected to add a rule before or after it.A blank rule appears in the policy.
- In theNameandDescriptionfields, type the name and an optional description.
- In theStatecolumn, select the rule state.
- SelectEnabledto apply the rule on the protocol, addresses, and ports specified.
- SelectDisabledto disable the rule.
- In theProtocolcolumn, select the protocol to which the NAT rule applies.
- SelectAnyto apply the firewall rule to any protocol.
- Select the protocol name to apply the rule to a single protocol.
- SelectOtherand type the port number if the protocol is not listed.
- In theSourcefield, specify the addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, a geographic location, a subscriber or subscriber group, an address list, or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- In theDestinationfield, specify the destination addresses and ports that the rule should match.You can type an IP address, a contiguous range of IP addresses, an IP subnet, a port, a range of ports, or an address list or port list. After you complete an entry, clickAdd.You cannot specify a mix of IPv6 and IPv4 address types in a single NAT rule.
- From theLog Profilelist, select a logging profile to apply to the NAT rule.You can configure the logging profile on the virtual server security policy, instead of on the match rule.
- ClickCommit Changes to System.The policy with the updated rule is displayed.
You have now configured a NAT rule in the device policy to match traffic, and apply NAT
translations.