Forum Discussion

sykurn_386269's avatar
sykurn_386269
Icon for Nimbostratus rankNimbostratus
Mar 18, 2019

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.

 

2 Replies

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

     

  • 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