Reverse proxy

Source: Wikipedia, the free encyclopedia.
A proxy server connecting the Internet to an internal network.
Example scenario: A client on the Internet (cloud on the left) makes a request to a reverse proxy server (red oval in the middle). The proxy inspects the request, determines that it is valid and that it does not have the requested resource in its own cache. It then forwards the request to some internal web server (oval on the right). The internal server delivers the requested resource back to the proxy, which in turn delivers it to the client. The client on the Internet is unaware of the internal network, and cannot tell whether it is communicating with a proxy or directly with a web server.

In computer networks, a reverse proxy (or surrogate server) is a proxy server that appears to any client (such as a browser) to be an ordinary web server, but in reality merely acts as an intermediary that forwards the client's requests to one or more ordinary web servers.[1][2] Reverse proxies help increase scalability, performance, resilience, and security, but they also carry a number of risks.

Description

Companies that run web servers often set up reverse proxies to facilitate the communication between an Internet user's browser and the web servers. An important advantage of doing so is that the web servers can be hidden behind a firewall on a company-internal network, and only the reverse proxy needs to be directly exposed to the Internet.

Reverse proxies should not be confused with

forward proxies
, which are used when it is the client who is restricted to a private, internal network; in this case, the client can ask a forward proxy to retrieve resources from the public Internet on behalf of the client.

Implementations

Reverse proxy servers are implemented in popular open-source web servers, such as Apache, Nginx, and Caddy, which makes them a hybrid between a reverse proxy server and a web server. Dedicated reverse proxy servers, such as the open source software HAProxy and Squid, are used by some of the biggest websites on the Internet.

Uses

Large websites and content delivery networks use reverse proxies, together with other techniques, to balance the load between internal servers. Reverse proxies can keep a cache of static content, which further reduces the load on these internal servers and the internal network. It is also common for reverse proxies to add features such as compression or TLS encryption to the communication channel between the client and the reverse proxy.[3]

Risks

  • A reverse proxy can track all IP addresses making requests through it and it can also read and modify any non-encrypted traffic. Thus, it can log passwords or inject malware, and might do so if compromised or run by a malicious party.
  • When the transit traffic is
    TLS certificate
    and its corresponding private key, extending the number of systems that can have access to non-encrypted data and making it a more valuable target for attackers.
  • The vast majority of external data breaches happen either when hackers succeed in abusing an existing reverse proxy that was intentionally deployed by an organisation, or when hackers succeed in converting an existing Internet-facing server into a reverse proxy server. Compromised or converted systems allow external attackers to specify where they want their attacks proxied to, enabling their access to internal networks and systems.
  • Applications that were developed for the internal use of a company are not typically hardened to public standards and are not necessarily designed to withstand all hacking attempts. When an organisation allows external access to such internal applications via a reverse proxy, they might unintentionally increase their own attack surface and invite hackers.
  • If a reverse proxy is not configured to filter attacks or it does not receive daily updates to keep its attack signature database up to date, a
    zero-day
    vulnerability can pass through unfiltered, enabling attackers to gain control of the system(s) that are behind the reverse proxy server.
  • Using the reverse proxy of a third party (e.g.,
    triad of confidentiality, integrity and availability
    in the hands of the third party who operates the proxy.
  • If a reverse proxy is fronting many different domains, its outage (e.g., by a misconfiguration or DDoS attack) could bring down all fronted domains.[7]
  • Reverse proxies can also become a single point of failure if there is no other way to access the back end server.

See also

References

  1. ^ "Forward and reverse proxies". The Apache Software Foundation. Archived from the original on 28 August 2018. Retrieved 26 August 2018.
  2. ^ Reese, Will (September 2008). "Nginx: the high-performance web server and reverse proxy". Linux Journal (173).{{cite journal}}: CS1 maint: url-status (link)
  3. ^ "Proxy servers and tunneling". MDN Web Docs. Archived from the original on 26 November 2020. Retrieved 6 December 2020.
  4. ^ "squid-cache wiki entry on "SpoonFeeding"". Francesco Chemolli. Archived from the original on 25 January 2019. Retrieved 9 February 2011.
  5. ^ "Possible to add basic HTTP access authentication via HAProxy?". serverfault.com. Archived from the original on 4 October 2018. Retrieved 27 April 2016.
  6. ^ "forward_auth (Caddyfile directive) - Caddy Documentation". caddyserver.com. Retrieved 22 May 2022.
  7. ^ "Cloudflare outage knocks out major sites and services, including Discord". finance.yahoo.com. Archived from the original on 22 June 2020. Retrieved 14 December 2020.