Forum Discussion
Nicola_DT
Nimbostratus
Sep 22, 2008Irule and snat pool
Hi,
am getting stressed out...
I have to manage a thing that sounds like:
Some traffic from client A and B that are in vlan Internal have to cross the Bigi...
hoolio
Cirrostratus
Sep 23, 2008Hi Nicola,
Here is a version which checks of the requested port is 20000 and the client IP is one of the two listed, or if the requested port is 21000:
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: New TCP connection to [IP::local_addr]:[TCP::local_port]"
if {[TCP::local_port] == 20000 and ([IP::addr [IP::client_addr] equals 10.130.167.23] or [IP::addr [IP::client_addr] equals 10.130.167.24])}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched first check, using snap_pool_1"
snatpool snat_pool_1
} elseif {[TCP::local_port] == 21000 and ([IP::addr [IP::client_addr] equals 10.130.167.23] or [IP::addr [IP::client_addr] equals 10.130.167.24])}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched second check, using snap_pool_2"
snatpool snat_pool_2
}
}
When you're done testing, you can comment out the log statements.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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