Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

how to Outbound NAT to the specific destination IP

Hi,

how to do outbound NAT ? I have global 0.0.0.0/0 VS and use SNAT Automap within it.

I've configured NAT, but the Origin IP address always translated to the SNAT Automap (self-IP egress interface).

My objective is when I want to reach specific destination public IP, My origin IP will be translated to the particular Public IP in My ISP, not the (self-IP). pls help.

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi Sykurn,

you may apply the iRule below to your IP-Forward VS to flip the SNAT IP selectively...

when CLIENT_ACCEPTED { 
    if { [IP::local_addr] equals "50.50.50.50" } then {
        snat 111.111.111.111
    }
}

Note: The iRule is getting triggered in the clientside context. So the [IP::local_addr] is the destination address value of the client side connection.

Cheers, Kai

1
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Create a SNAT pool with the outbound IP address in it and assign the SNAT pool to the virtual server.

0