Forum Discussion

Thiyagu_343098's avatar
Thiyagu_343098
Icon for Nimbostratus rankNimbostratus
Jul 30, 2018

Conditional SNAT based on source IP

Hello All,

 

I'm working on a task to configure an irule to do a conditional SNAT based on source IP.

when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals DNS_SNAT_TEST]} { snatpool SNAT_POOL_LAN } else{ snat none }

 

}

Could you please help me to ensure the above logic work? Anything else I have to add with this irule?

 

Regards, Thiyagu

 

1 Reply

  • Unless you're running an older version of BIG-IP software, I would use the CLASS MATCH command rather than MATCHCLASS. FINDCLASS and MATCHCLASS are deprecated as of v10. The CLASS MATCH equivalent of your MATCHCLASS command is:

    class match [IP::client_addr] equals DNS_SNAT_TEST