Forum Discussion
diana_24252
Nimbostratus
May 08, 2008Redirect to HTTPS doesn't work properly
Redirect to HTTPS doesn't work properly
Description of the problem:
Web site: testcustompoint.rrd.com (it is a test only site so there is an SSL name error)
The web server redirects you to HTTPS and once the login page opens the browser address changes to:
https://testcustompoint.rrd.com/xs2/prelogin?CMPID=126&qwerty=08050811
At this point if you delete only the letter āsā in the HTTPS and hit Enter the page will load in HTTP and will not redirect to HTTPS. Obviously this is a major security issue.
The web team only wants the login page to be secure and not all the pages.
I setup the following iRule:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/xs2/prelogin" } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
This iRule did not fix the security issue I described above. I tried a few different modifications of a redirect iRule, but no luck yet.
Any help will be greatly appreciated!
- hoolio
Cirrostratus
Do you have the iRule attached to the HTTP VIP? If so, the rule should not allow an HTTP request to a URI starting with /xs2/prelogin. If you're seeing this, try to add logging to see exactly what's happening:when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]: new HTTP request to [HTTP::uri]" if { [HTTP::uri] starts_with "/xs2/prelogin" } { log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]: URI started with /xs2/prelogin, redirecting to https" HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- diana_24252
Nimbostratus
The iRule was and is attached to the VIP. I modified it to log as you advised and I am attaching the log file. - hoolio
Cirrostratus
I don't see any requests in the log which start with /xs2/prelogin. Can you confirm the URI for the login page? - diana_24252
Nimbostratus
Welll this is what the developer told me to use for the iRule. Like you say I didn't see that either in the log, but when you open the site it is what is displayed in the address bar. You can test it yourself, the site is available on the Internet. - hoolio
Cirrostratus
Here are the series of request and responses I saw: - diana_24252
Nimbostratus
Im sorry, I had stopped te logging as the file was getting big. I asked the developer to look at it and give me another string. - hoolio
Cirrostratus
I just tried the same sequence. My IP starts with 90.193.139. - diana_24252
Nimbostratus
Aaron, - hoolio
Cirrostratus
I don't see any of the HTTP requests I made in the iRule's entries in LTM log file. Are you sure the iRule is attached to the VIP which requests to testcustompoint.rrd.com is NAT'd to?
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