Forum Discussion
Java JNLP Launcher.jar not being redirected to port 443
Hi Everyone,
I am fairly new on this forum so please bear with me. I have a problem with opening JNLP files whilst i have an iRule on my virtual server that redirects everything to port 443. Let me give you a background of the architevture and hopefully someone can help.
We have a Virtual server setup the load balances clients to two backend JBOSS/Tom Cat servers. Both the two backend servers only talk and respond in 8080. The communication between client and F5 and back to Client needed to ahve full SSL encryption, so in order for this to happen I needed to have 2 Virtual servers created working off the same single IP. One virtual server is listening on porit 443 and then one is listening on port 80. This ensures when traffic is sent back from the physcial servers (as they only talk in http) http traffic is redirected to https. For this to happen i have an iRule setup on my virtual server listening on port 443.
The iRule is as follows:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
The Virtual servers have a default http profile and they use a customised Cookie persistence profile. Now everything seemed to be working fine, but I have noticed that there are issues launching JNLP files via a JNLP launcher. File are not opening and I keep getting an error message saying unable to launch application. Looking at the URL it shows that it is trying to talk over port 80, but because we have a redirect it seems the Java application does not like the re-direct and keeps trying to push the client over port 80. After troubleshooting with packet tracers and qkviews here is what I believe is happening:
The client is hitting the virtual server over port 80 and it is being redirected fine to port 443. The F5 is sending 302 showing the redirects. However when attempting to open launcher.jar the client does not come back to the F5 on 443. The client comes back to the F5 on 80 which in turn another 302 is being responded failing the launcher.jar to be opened. It appears the application ensures the client connects to port 80 overriding the headers 302 redirect.
I am looking to see if there are any other iRules i can create or edit the one above which will explicitally redirect launcher.jar to communicate over 443? We have a third party who manage the JBOSS servers and the java app, so is it something where they need to change the connector type from their end to talk in 443?
Any help would be much appreciated
Thanks
Ricky
9 Replies
- nitass
Employee
have you tried to rewrite http to https using stream profile? - What_Lies_Bene1
Cirrostratus
If you'd like to avoid rewriting responses, perhaps one of these will help? - Ricky_S_79564
Nimbostratus
Hi guys, - What_Lies_Bene1
Cirrostratus
Is there a reason you are specifying the :80 and :443. Normally, you would just change http:// to https:// as the default ports used by browsers are the ones you are using. Can you try this: {@http://@https://@} - What_Lies_Bene1
Cirrostratus
Also, you may not be able to see the GET requests (as they are encrypted) but the requested port will still be shown in the packet capture as it'll be the destination port of the packet. - Ricky_S_79564
Nimbostratus
The reason for :80 on the end is if i do not explicitally put that in and just leave it as {@http://@https://@} i get an error saying unable to launch application and below it says from http://aislive.invicta.cantium.net/ufs:80. So it looks like its looking for that port 80 on the end explicitally. - What_Lies_Bene1
Cirrostratus
I'm not sure you can use three expressions separately as you appear to be doing, I'd try this instead;
If you still get no luck I would suggest you do a tcpdump on the F5 and capture the server responses on the 'internal' VLAN, which should be unencrypted and will hopefully give you a better idea of what the server is sending back.{@http://mydomain/ufs:80@https://mydomain/ufs:443@ @http://mydomain/ufs:8080@https://mydomain/ufs:443@ @http://mydomain/ufs@https://mydomain/ufs@}
- Ricky_S_79564
Nimbostratus
sorry i wrote that out as quick form. i do infact have it setup like this: - hoolio
Cirrostratus
I don't think it will fix the issue, but you could combine the regexes into one. Also, you could be more specific and escape the periods in the "find" portion of the stream expression to match a period instead of any single character.when HTTP_REQUEST { Disable the stream filter for all requests STREAM::disable set debug 1 if {$debug}{ set uri "[HTTP::host][HTTP::uri]" } } when HTTP_RESPONSE { Check if response type is text if {[HTTP::header value Content-Type] contains "text"}{ Replace any http:// instance with http:// STREAM::expression {@http://aislive\.invicta\.cantium\.net(:8080|:80)?@https://aislive.invicta.cantium.net@} Enable the stream filter for this response only STREAM::enable if {$debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Enabling stream filter for response to $uri - [HTTP::header Content-Type]"} } else { Debug only. You can remove when testing is complete if {$debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Not enabling match for response to $uri - [HTTP::header Content-Type]"} } } when STREAM_MATCHED { if {$debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Rewriting [STREAM::match] for $uri"} }
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