Forum Discussion
Drew666
Sep 27, 2019Nimbostratus
iRule Creation Query
Hi, Have created a very simple iRule to extract the incoming Client destination TCP ports using the switch cmd to redirect to specific nodes: when HTTP_REQUEST { switch { TCP::local_port...
- Sep 27, 2019
Hi Drew,
Can you try this iRule?
when HTTP_REQUEST { set port [TCP::client_port] # log local0. "Port: $port" if { ($port > 8000) and ($port < 8151) } { set newlastoctet [expr $port - 7900] # log local0. "NewLastOctet: $newlastoctet" node "10.100.10.$newlastoctet:6660" } }
Sep 27, 2019
Hi Drew,
Can you try this iRule?
when HTTP_REQUEST {
set port [TCP::client_port]
# log local0. "Port: $port"
if { ($port > 8000) and ($port < 8151) } {
set newlastoctet [expr $port - 7900]
# log local0. "NewLastOctet: $newlastoctet"
node "10.100.10.$newlastoctet:6660"
}
}
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