Forum Discussion
CK_Then_103583
Nimbostratus
Jun 13, 2014iRule for port translation of single public IP address to multiple real server IP
Hi,
Need help on iRule to port translate a single public address to multiple real server private IP.
Example.
1.1.1.1:15001 --> 192.168.1.1:80 (if the connection is HTTP)
--...
James_Deucker_2
Jun 13, 2014Historic F5 Account
I wouldn't recommend doing this. However, maybe something like (completely untested):
when CLIENT_ACCEPTED {
TCP::collect 3
}
when CLIENT_DATA {
if { [TCP::payload length] >= 3 } {
switch [string range [TCP::payload] 0 2] {
list out the first 3 letters of the HTTP methods we want to see
GET -
POS -
HEA -
PUT -
DEL -
OPT {
looks like it'll be HTTP
pool http_pool
}
default {
doesn't look like HTTP
pool https_pool
}
}
} else {
we didn't get as many bytes as we wanted
TCP::collect [expr {3 - [TCP::payload length]}]
}
}
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
