Forum Discussion
Help regarding an iRule
Folks.
I am looking at an iRule that would help accept an http request on port 8080 on the VIP and then forward the request on https port 8080 to the back end servers. any help?
regards, Nik
4 Replies
- Kevin_Davies_40
Nacreous
You do not need an iRule. Simply assign the serverssl profile in the virtual and make sure the pool members are using port 8080.
- nitass
Employee
as kevin said, you do not need irule. it is just serverssl.
e.g.
config root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar ltm virtual bar { destination 172.28.24.10:8080 ip-protocol tcp mask 255.255.255.255 pool foo profiles { serverssl { context serverside } tcp { } } source 0.0.0.0/0 source-address-translation { type automap } vs-index 3 } root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo ltm pool foo { members { 200.200.200.101:8080 { address 200.200.200.101 } } } test [root@ve11a:Active:In Sync] config curl -I http://172.28.24.10:8080/ HTTP/1.1 200 OK Date: Thu, 23 Jan 2014 03:42:01 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Thu, 23 May 2013 00:28:46 GMT ETag: "4185a8-59-c3efab80" Accept-Ranges: bytes Content-Length: 89 Content-Type: text/html; charset=UTF-8 - N_67263
Nimbostratus
Here is a minor twist, the requirement says that we need the incomming requests to come on port 8080(http) and then redirect these to https.
- nitass
Employee
the requirement says that we need the incomming requests to come on port 8080(http) and then redirect these to https.
the https is on port 443, isn't it? so, you will create new https virtual server, won't you?
e.g.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar ltm virtual bar { destination 172.28.24.10:8080 ip-protocol tcp mask 255.255.255.255 profiles { http { } tcp { } } rules { _sys_https_redirect } source 0.0.0.0/0 vs-index 7 } [root@ve11a:Active:In Sync] ~ curl -I http://172.28.24.10:8080/something HTTP/1.0 302 Found Location: https://172.28.24.10/something Server: BigIP Connection: Keep-Alive Content-Length: 0
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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