Forum Discussion
Forward explicit SSL proxy server
Dear all,
Trying to figure out why HTTPS traffic is not passing the forward proxy. I followed the following article, configured the HTTP and SSL profiles and the two virtual servers accepting HTTP and HTTPS traffic. The only thing that we dont use is the APM part.
Result is that when using the explicit IP address configured in HTTP virtual server and the local browser client is that it works just fine when accessing HTTP websites. When I try to access a website with HTTPS using the explicit IP address configured in my browser I can see an HTTP CONNECT and the virtual server replies with service unavailable HTTP 503. This happens with all HTTPS sites. If I change the proxy setting in the browser the HTTPS (port 443) to request is simply being reset.
https://support.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm-secure-web-gateway-implementations-12-0-0/7.html
Does anyone has experience in deploying Big IP LTM as a explicit forward proxy using HTTP and clientSSL profiles only without the use of Irules?
- APNimbostratus
Hi Kevin,
What's the trick to forwarding the HTTP traffic out the back of the Explicit VIP? The SSL traffic traverses the tcp-forward tunnel to the wildcard VS where it can be managed. How would I forward everything else (in particular, HTTP) where I want (e.g. to another VS or gateway pool)?
I've tried using the HTTP_PROXY_REQUEST event and proxy disable to send it various places. I can successfully send it to another VS however what I really want to do is send it through a security device. The SSL Intercept iApp 1.0 does this for HTTPS via an ingress pool, however I can't get this working for HTTP?
Without a fancy iRule solution, I guess creating routes is the only way to get it where I want.
Any tips?
- MarvinCirrocumulus
Kevin, I have a very specific issue that an internal client is trying to access an external webservice using the explicit forward proxy with a SOAPui client and it works just fine. Also usign a webbrowser it works great. However when they try to communicate using an IBM AIX MQ server they are unable to connect to the external HTTPS webservice.
What I have seen in the packet capture is that the client does not send SNI information and the server does not respond with a server hello. The level of encryption and cipher support is not a problem using TLS1.2. Almost sure that SNI support is the problem, so how am I able to inject the SNI information uing the forward proxy? How to deal with this issue when there are similar problems with different external webservices? To be able to alter this behavior I guess the SSL forward proxy license is required, correct?
Looking forward to your fast response. Thanks!
- Kevin_StewartEmployee
There are at least three ways to get HTTP traffic to go through your inspection devices.
-
Use the new SSL Intercept 1.5 iApp, which supports this use case and much more.
-
If you're doing this across two boxes, set the internal box's default route to the internal self-IP of the second box. Or if on a single box, create a route domain that separates a "dmv internal" VLAN from a "dmv external" VLAN, and then make the box's default route the dmv external VLAN self-IP. So you'd have a client side VLAN, Internet side VLAN, and two internal VLANs through which your decrypted traffic would flow from ingress to egress.
-
Use an iRule to force traffic through the inspection zone. In the iRule attached to the http-explicit VIP, the HTTP_REQUEST event will only fire for HTTP traffic. HTTPS traffic is sent directly to the wildcard TCP VIP. The only caveat to this is that by the time the HTTP_REQUEST event fires, the outgoing traffic hasn't been IP translated yet. In other words, the source address and port are still the http-explicit VIP's address and port. Here's what the iRule might look like:
when RULE_INIT { User-Defined: optional internal DNS cache (in seconds) set static::DNSCACHE_TIME 20 User-Defined: path for the decrypted traffic. This can be a wildcard VIP on the other side of a route domain and VLAN for inline layer 2 devices, or the inbound IP address of an inline layer 3 device. In any case it's defined as a pool so that you can effectively load balance across multiple security devices set static::L2_SERVICE_POOL "my_service_pool" } when CLIENT_ACCEPTED { Check for service availability. If services are down, bypass SSL inspection and just exit The default path for HTTP explicit traffic, via http-explicit, is the system default route. If the inline security devices are available, you're going to trigger commands in the HTTP_REQUEST event. Otherwise let the traffic follow its native path to the system default gateway if { [active_members $static::L2_SERVICE_POOL] > 0 } { At least one security service is available set PROXY_ON 1 } else { No security services are available - exit via system default route without inspection set PROXY_ON 0 Enable outbound SNAT from here (as required) snat automap } } when HTTP_REQUEST { This event is only triggered for HTTP requests HTTPS (CONNECT) requests are sent to the ingress TCP VIP by default if { $PROXY_ON } { Pick an active service pool member. We're routing here. Normally you'd just turn off address translation in the VIP, but since you actually need this enabled for HTTPS traffic, you're going to use a combination of 'node' and 'nexthop' to effectively creating a routed path. First pick an inline security service pool member. pool $static::L2_SERVICE_POOL set next_service [lindex [LB::select] 3] The incoming destination address is local, so resolve the host and re-inject the true destination address via node command, and account for non-standard ports set proto 1 catch { if { [HTTP::host] contains ":" } { set host [lindex [split [HTTP::host] ":"] 0] set port [lindex [split [HTTP::host] ":"] 1] } else { set host [HTTP::host] set port 80 } set this_host [lindex [RESOLV::lookup -a ${host}] 0] Optionally create a local table to cache DNS responses so that you're not always doing two DNS queries per request if { [table lookup -subtable DNSCACHE ${host}] ne "" } { set this_host [table lookup -subtable DNSCACHE ${host}] } else { set this_host [lindex [RESOLV::lookup -a ${host}] 0] table set -subtable DNSCACHE ${host} ${this_host} $static::DNSCACHE_TIME } Then set the traffic path in the direction of the resolved node node ${this_host} ${port} } } } when LB_SELECTED { Only do this for HTTP traffic. The true destination address was re-inserted via node command above, so set the nexthop route to the target VLAN self-IP. So if this is HTTP traffic and the inline security services are available, you're going to instruct the outgoing traffic to go through the selected inline security service, thus forcing a routed path if { [info exists proto] } { LB::reselect nexthop ${next_service} } }
-
- MarvinCirrocumulus
Dear all use my config but only change the virtual server port from 443 to all and then it works fine, problem solved!
- rtenggarioNimbostratus
Hi Andrew, i configure the same thing like what you do. i can open http and https web (youtbe) the problem when open the facebok or download large file via browser. seems like only open 1 connection, it very slow to download or load the facebook web face this problem before?
i run VE, with 8GB RAM and 4 core cpu. i dont think throughput issue.
thanks in advance.
- Pedro_Roure_249Altostratus
Hi all,
I'm having exactly the same problem: HTTP works and HTTPS not work with an 503 Service Unavailable. The only difference is that i made the implementation through an SWG iApp. Any ideas ?
- Stanislas_Piro2Cumulonimbus
You can find here working simple configuration of http proxy without swg (tested on version 13.1)
 
- Abed_AL-RCirrostratus
- Stanislas_Piro2Cumulonimbus
I updated the link.
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