Forum Discussion
wjw_313334
Nimbostratus
Sep 19, 2018Assign a specific subnet address to user for snat.
How to assign a specific subnet address to user for snat, just as following:
when CLIENT_ACCEPTED
{ if {[class match [IP::client_addr] equals data_group]} { snat 10.1.1.0/24* or 10.1.1.0...
Kevin_Stewart
Employee
Sep 19, 2018What I assume you're trying to do is assign a full subnet as the set of available SNAT addresses (10.1.1.1 - 10.1.1.254), and if so, you cannot do it this way.
You could probably programmatically expand the subnet values in the iRule, but the more optimal solution would simply be to create a SNAT pool with the desired IPs. You could even script this:
!/bin/bash
tmsh create ltm snatpool snatfoo members add { 10.1.1.1 }
for i in {2..254}; do tmsh modify ltm snatpool snatfoo members add { 10.1.1.$i }; done
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
