For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Tim_Watts_29480's avatar
Tim_Watts_29480
Icon for Nimbostratus rankNimbostratus
Oct 10, 2016

F5 - is it just a reverse proxy (as far as fronting 100 webservers)

Hi,

 

I have someone trying to sell me the virtues of F5 loadbalancers, so I can present 100+ virtual servers running webservers on a single public (aka publically routeable) IPv4 address instead of one public IP per virtual server as currently.

 

I don't think it's going to work for my existing systems, but I am happy to be proven wrong. So can I chuck a couple of questions out to you good folks who know this product, and thank you in advance for your time :)

 

1) Is the F5 basically a reverse HTTP proxy appliance (in the above context) or would it also use NAT-ing?

 

2) I note in the documents, it can set an X-Forwarded-For header (that's a start), so I can at least change the apache config to log that IP in the access logs instead of the source address of the TCP connection.

 

3) Can the F5 cope with broken SSL certificates on the target servers (specifically CN mismatch)? (Don't ask - there is a reason) - ie the equivalent of --no-check-certificate in wget ?

 

The above is potentially OK, apart from the extra work it will cause me tweaking custom configs on 700+ named vhosts across 100+ servers.

 

The stuff I think will not work is:

 

a) mod_authz_host will break (Apache "Allow from" handler) as there's no way mod_authz_host can used X-Forwarded-For in apache 2.2. I need to be able to allow Nagios and various security scanners to bypass HTTP AUTH protection from a limited set of IP addresses. We have no split voew DNS capabilities, so everything internal will try to come via the F5 too.

 

b) fail2ban: There also seems to be no way to change the IP reported in apache error logs and even if there is, fail2ban will simply drop in a netfilter rule to block an IP address it will never see. At worse, it will block the loadbalancer, effectively DOSing the server.

 

Don't get me wrong, I am sure the F5 is a fine appliance and I'm not here to disrespect it, but I don't think it will work for my existing systems from a purely computer science point of view.

 

But I am happy to be proved wrong if it can do some seriously magic SNAT operations.

 

Seemed the easiest way was to ask the experts :)

 

Kind regards and thanks for your time,

 

Tim Watts

 

11 Replies

  • Tim,

     

    I have worked in the Application Delivery space for over 10 years and F5 is by far the best system I have worked with (and I don't work directly with F5 so not a sales pitch).

     

    The F5 systems are split into software modules doing different things but at its core is LTM which is basically a fancy Reverse Proxy which can route and/or NAT traffic (both static NAT and SNAT). However it also have a very powerful and flexible traffic manipulation features including iRules for scripting and a number of profiles, like HTTP, that can add/remove/modify traffic like adding the XFF header for HTTP traffic.

     

    With SSL you can off load your SSL to the F5 appliances for different cert on the client side than used on the server side, this can also allow less secure SSL on the server side without compromising security on the client side without a problem.

     

    The one thing that will stop you hosting 100+ sites on a single IP is that each SSL Cert will need a different IP, so unless everything is on the same domain and you have a Wildcard Certificate you will need more that one IP

     

    With mod_authz_host would need more info about your setup and issues with it. If it cannot use XFF then anything using IP restrictions can be moved to the F5 with very simple iRules or if want to allow IPs without authentication for scanning and iRule to set different SNAT address based on a list (Data Group) of allow IPs.

     

    I have not come across fail2ban before but it may be able to update the F5 appliances using iControl (F5's configuration API) to block IPs directly on the F5s.

     

    Alternativly looking at modules like ASM (WAF), APM (remove auth and client VPN) and/or AFM (datacentre firewall) might provide you with a solution.

     

    Hope this helps

     

    AMG

     

  • Hi AMG,

     

    Yes - that is hugely helpful - thanks for taking the time. It appears that I have understood the architecture of the F5 appliance correctly.

     

    Regarding SSL - I use TLS/SNI with apache and nginx so we can bind as many certs to one IP as we like. We have 4 wildcard certs (for subdomains of our primary .ac.uk) and various single CN certs for external (.org, .eu and other) domains, as these are relatively expensive in comparison to the JISC supplied .ac.uk wildcard certs. On some sites, we don't even have correct certs as we have 2-3 people logging in to edit content and the rest of the website viewers use HTTP. It would not be viable to have the 400+ certs to cover all those edge cases, at least not until one of the free SSL issuers takes off (if ever).

     

    The real show stopper is the fact that the rest of apache and linux lose sight of the true client IP for the "Allow from" and fail2ban operations - at least without a lot of work to re-implement the logic in the F5, assuming it can.

     

    Not its fault - we are looking at migrating hosting for 200 VMWare VMs, 100 of which are web front ends (one per academic project typically) - and there's a lot of legacy systems.

     

    Anyway - I think I have enough info to work with now.

     

    Thanks again :)

     

    Tim

     

  • All the above is quite simple on LTM. Which fail2ban logic would you like to a apply? I would also recommend using HSL from the F5 to your logging / Nagios solution to preserve client IP details. Also what is the mod_auth achieving? It is almost certainly replicable.

     

  • Also, just a personal observation: If you are fronting 100+ web services, I very much recommend:

     

    1) Creating a dynamic type of origin server pool (e.g a phantom pool consisting of 100s of fallow members that can be dynamically populated)

     

    2) A heterogeneous server arsenal (e.g a team of Ngninx Servers JUST for content that lives under /images, a team of Apache Servers for .js content, a team of Microsoft for asp[x], etc)

     

    THESE are the type of things you can do with [only] F5, and play to it's strengths.

     

    //Jan

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Have you considered installing the "mod_extract_forwarded" Apache module to get at the addresses in XFF for mod_authz_host?

     

  • F5 is a monstrosity octopus. Does almost anything.

     

    However, it's recommended to only pick the features you actually need. The "best license bundle" could mislead people into using all the available modules, and that would be a horrible idea outside lab scenario.

     

    My best advice to newcomers looking to use F5 is to use 1-4 modules PER CLUSTER, never more than that. If you want to use more modules, get yourself another cluster for the extra features.

     

    • Hannes_Rapp_162's avatar
      Hannes_Rapp_162
      Icon for Nacreous rankNacreous

      Was asked to clarify this.

       

      Why I advise to keep the number of provisioned BigIP modules to 4 or less than that (even when there are no capacity constraints) ? If I had to pick just one reason - retain better chances for seamless software upgrades. If I had to pick two - my second reason is the overall appliance stability.

       

      After X number of tools, Swiss Knives get too bulky and lose their appeal :)

       

    • JG's avatar
      JG
      Icon for Cumulonimbus rankCumulonimbus

      As with everything, there is the need to identify first the business need, or what problems one is to solve. The choice of product will then be much clearer.

       

  • F5 is a monstrosity octopus. Does almost anything.

     

    However, it's recommended to only pick the features you actually need. The "best license bundle" could mislead people into using all the available modules, and that would be a horrible idea outside lab scenario.

     

    My best advice to newcomers looking to use F5 is to use 1-4 modules PER CLUSTER, never more than that. If you want to use more modules, get yourself another cluster for the extra features.

     

    • Hannes_Rapp's avatar
      Hannes_Rapp
      Icon for Nimbostratus rankNimbostratus

      Was asked to clarify this.

       

      Why I advise to keep the number of provisioned BigIP modules to 4 or less than that (even when there are no capacity constraints) ? If I had to pick just one reason - retain better chances for seamless software upgrades. If I had to pick two - my second reason is the overall appliance stability.

       

      After X number of tools, Swiss Knives get too bulky and lose their appeal :)

       

    • JG's avatar
      JG
      Icon for Cumulonimbus rankCumulonimbus

      As with everything, there is the need to identify first the business need, or what problems one is to solve. The choice of product will then be much clearer.