Lably
Skip to content

Proxy server

Computer system that receives and forwards requests

  • 21 min read
  • 3 chapters

Related on Lably

Through Computer network, Intermediary and Server (computing)

Instead of connecting directly to a server that can fulfil a request for a resource, such as a file or web page, the client directs the request to the proxy server, which evaluates the request and performs the required network transactions. This serves as a method to control the complexity of the request or provide additional benefits such as load balancing, privacy or security. Proxies were devised to add structure and encapsulation to distributed systems.

Types

A proxy server may reside on the user's local computer, or at any point between the user's computer and the destination servers. A proxy server that passes unmodified requests and responses is usually called a gateway or sometimes a tunneling proxy. A forward proxy is an Internet-facing proxy used to retrieve data from a wide range of sources (in most cases, anywhere on the Internet). A reverse proxy is usually an internal-facing proxy used as a front-end to control and protect access to a server on a private network. A reverse proxy commonly also performs tasks such as load-balancing, authentication, decryption, and caching.

Open proxies

An open proxy is a forwarding proxy server that is accessible by any Internet user. In 2008, network security expert Gordon Lyon estimated that "hundreds of thousands" of open proxies are operated on the Internet.

  • Anonymous proxy: This server reveals its identity as a proxy server but does not disclose the originating IP address of the client. Although discovered easily as a proxy server, it can be beneficial for some users as it hides the originating IP address.
  • Forwarding headers: Some proxies append HTTP headers to disclose client or proxy information that would otherwise be lost when a request is forwarded. Historically this has often been done with non-standard fields such as X-Forwarded-For, while the standardised Forwarded field provides a defined syntax for similar information. Such headers are deployment-dependent and should not be treated as inherently trustworthy, since they may be absent, modified, or contain values added by multiple proxies.

Reverse proxies

A reverse proxy (or surrogate) is a proxy server that appears to clients to be an ordinary server. Reverse proxies send requests to one or more ordinary servers that handle the request. The response from the original server is returned as if it came directly from the proxy server, leaving the client with no knowledge of the original server. Reverse proxies are installed in the vicinity of one or more web servers. All traffic coming from the Internet and with a destination of one of the neighborhood's web servers goes through the proxy server. The use of "reverse" originates in its counterpart, the "forward" proxy. The reverse proxy sits closer to the web server and serves only a restricted set of websites. There are several reasons for installing reverse proxy servers:

  • TLS termination: Reverse proxies often terminate TLS connections from clients and forward requests to backend servers. This can centralise certificate management, access control, logging, and request routing, and can reduce the TLS-related work performed by backend servers. Backend connections may use HTTP or HTTPS depending on the deployment and security requirements. Modern deployments usually perform TLS termination in software, optionally with hardware assistance, rather than requiring dedicated SSL acceleration hardware. Certificates for multiple names can be handled using mechanisms such as Subject Alternative Name certificates, wildcard certificates, and Server Name Indication (SNI).
  • Load balancing: the reverse proxy can distribute the load to several web servers, each serving its own application area. In such a case, the reverse proxy may need to rewrite the URLs in each web page (translation from externally known URLs to the internal locations).
  • Serve/cache static content: A reverse proxy can offload the web servers by caching static content like pictures and other static graphical content.
  • Compression: The proxy server can optimize and compress the content to speed up the load time.
  • Spoon feeding: reduces resource usage caused by slow clients on the web servers by caching the content the web server sent and slowly "spoon feeding" it to the client. This especially benefits dynamically generated pages.
  • Security: The proxy server is an additional layer of defense and can protect against some OS and web-server-specific attacks. However, it does not provide any protection from attacks against the web application or service itself, which is generally considered the larger threat.
  • Extranet publishing: a reverse proxy server facing the Internet can be used to communicate with a firewall server internal to an organization, providing extranet access to some functions while keeping the servers behind the firewalls. If used in this way, security measures should be considered to protect the rest of your infrastructure in case this server is compromised, as its web application is exposed to attack from the Internet.

Forward proxy vs. reverse proxy

A forward proxy is a server that routes traffic between clients and another system, which is, in most cases, external to the network. This means it can regulate traffic according to preset policies, convert and mask client IP addresses, enforce security protocols, and block unknown traffic. A forward proxy enhances security and policy enforcement within an internal network. A reverse proxy, instead of protecting the client, is used to protect the servers.

A reverse proxy accepts a request from a client, forwards that request to another one of many other servers, and then returns the results from the server that specifically processed the request to the client. Effectively, a reverse proxy acts as a gateway between clients, users, and application servers and handles all the traffic routing whilst also protecting the identity of the server that physically processes the request.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication