Forum Discussion

PeterRamage_314's avatar
PeterRamage_314
Icon for Nimbostratus rankNimbostratus
Mar 20, 2019

SNAT: Different snat pools for different client ips.

I have the following requirement that I need to configure for outbound connections.

 

  • SUBNETSA&B - SNAT POOL 1
  • SUBNETSC&D - SNAT POOL 2
  • ALL OTHER SUBNETS - AUTOMAP

I was thinking of have 3 x IP forwarding Virtual Servers with irule referencing a datagroup list(for the source ips) and then apply the relevant source nat to the VS. Is that the cleanest way of doing it?

 

irule:

 

1 Reply

  • You can just use the snat command in iRules to determine what the snat address should be. For snat pools, the syntax is just "snat name_of_snat_pool", for automap it is "snat automap"