Forum Discussion
Mubasher_Sultan
Nimbostratus
Apr 30, 2013https to 8081 redirection
Hi,
I have a requirement of doing an client ssl offload on the BIG-IP and then redirect it to port 8081.
For eg: a user will enter in the browser https://a.b.c.d then big-ip will offload it and should redirect it to http://a.b.c.d:8081/sm/index.do
I will appreciate help on this case, as Iam very new to writing an irule.
Thanks in advance,
Mubasher
2 Replies
- What_Lies_Bene1
Cirrostratus
I assume the port member is listening on port 8081? If that's the case there is no need to specify the port in the redirect;when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "https://[HTTP::host]/sm/index.do" } } - nitass
Employee
i think you mean uri rewriting rather than redirection.
e.g.[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.252:443 ip protocol 6 rules myrule profiles { clientssl { clientside } http {} tcp {} } } [root@ve10:Active] config b pool foo list pool foo { members 200.200.200.101:8081 {} } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::uri "/sm/index.do" } } } test [root@ve10:Active] config ssldump -Aed -nni 0.0 port 443 or port 8081 -k /config/ssl/ssl.key/default.key New TCP connection 1: 172.28.20.17(36729) <-> 172.28.19.252(443) 1 1 1367328173.8100 (0.0179) C>S SSLv2 compatible client hello 1 2 1367328173.8101 (0.0000) S>CV3.1(81) Handshake 1 3 1367328173.8101 (0.0000) S>CV3.1(953) Handshake 1 4 1367328173.8101 (0.0000) S>CV3.1(4) Handshake 1 5 1367328173.8123 (0.0021) C>SV3.1(262) Handshake 1 6 1367328173.8123 (0.0000) C>SV3.1(1) ChangeCipherSpec 1 7 1367328173.8123 (0.0000) C>SV3.1(36) Handshake 1 8 1367328173.8297 (0.0174) S>CV3.1(1) ChangeCipherSpec 1 9 1367328173.8297 (0.0000) S>CV3.1(36) Handshake 1 10 1367328173.8321 (0.0023) C>SV3.1(169) application_data --------------------------------------------------------------- GET / HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Accept: */* Host: a.b.c.d --------------------------------------------------------------- New TCP connection 2: 200.200.200.10(36729) <-> 200.200.200.101(8081) 1367328173.8332 (0.0010) C>S --------------------------------------------------------------- GET /sm/index.do HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Accept: */* Host: a.b.c.d ---------------------------------------------------------------
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