Forum Discussion
Manuel_Gabaldon
Apr 29, 2008Nimbostratus
Yeah, I've already thought about that solution, but it's not exactly what I'm looking for.
I want the SNAT configuration to be automatic, so there isn't any need for our customer to define SNAT rules or classes, just the virtual servers.
The least horrible way of doing it would be something like this:
when CLIENT_ACCEPTED {
for each pool in the list {
for each pool member in the pool {
if {client IP address equals pool member}{
set variable found_pool pool}
}
}
for each virtual server in the list {
if {virtual server pool equals found_pool} {
set variable found_vs virtual server
snat found_vs}
}
}
I've seen that iControl does support queries that return the pools referring a node, and the virtual servers referring a pool, but I suppose that this isn't that easy with iRules, and it can be quite CPU-intensive.
Any other thoughts about it? Maybe by using the Universal persistence table, but it wouldn't work exactly as expected.
Regards.