Difference between forward proxy server and reverse proxy server

Reading time: 20 minutes

In this article, we will explore the two topics namely forward proxy server and reverse proxy server.

Forward Proxy


The proxy event in this case is that the "forward proxy" retrieves data from another web site on behalf of the original requestee.

Consider three computers (X, Y and Z) connected to the internet.

X = your computer, or "client" computer on the internet
Y = the proxy web site: proxy.opengenus.org
Z = the web site you want to visit: opengenus.org

Normally, one would connect directly from X --> Z.

However, in some scenarios, it is better for Y to connect to Z on behalf of X, which chains as follows: X --> Y --> Z.

Forward Proxy Server

Reasons why X would want to use a forward proxy server Y:

  1. X is unable to access Z directly because:

    • Someone with administration authority over X's internet connection has decided to block all access to site Z such as:

      • The system administrator has blocked access to the spam site to prevent users from inadvertently fooling themselves.
      • Employees at a large company have been wasting too much time on facebook.com, so management wants access blocked during business hours.
      • A local elementary school disallows internet access to the playboy.com web site.
      • A government is unable to control the publishing of news, so it controls access to news instead, by blocking sites such as wikipedia.org. See TOR or FreeNet.
    • The administrator of Z has blocked X such as:

      • The administrator of Z has noticed hacking attempts coming from X, so the administrator has decided to block X's ip address (and/or netrange).
      • Z is a forum web site. X is spamming the forum. Z blocks X.
  2. X does not want to reveal his/ her identity to administrator of Z

    There are several reason why X might want to do so such as:

    • X intends to spam Z
    • X intends to make a hacking attempt

Forward Proxies are good for:

  • Content Filtering
  • eMail security
  • NAT’ing
  • Compliance Reporting

Reverse Proxy


Consider three computers (X, Y and Z) connected to the internet.

X = your computer, or "client" computer on the internet
Y = the proxy web site: proxy.opengenus.org
Z = the web site you want to visit: opengenus.org

In some scenarios, it is better for the administrator of Z to restrict or disallow direct access, and force visitors to go through Y first. So, as before, we have data being retrieved by Y --> Z on behalf of X, which chains as follows: X --> Y --> Z.

What is different this time compared to a "forward proxy," is that this time the user X does not know he is accessing Z, because the user X only sees he is communicating with Y. The server Z is invisible to clients and only the reverse proxy Y is visible externally. A reverse proxy requires no (proxy) configuration on the client side.

The client X thinks he is only communicating with Y (X --> Y), but the reality is that Y forwarding all communication (X --> Y --> Z again).

Reverse Proxy Server

Reasons why Z would want to set up a reverse proxy server:

  1. Z wants to force all traffic to its web site to pass through Y first.
    a) Z has a large web site that millions of people want to see, but a single web server cannot handle all the traffic. So Z sets up many servers, and puts a reverse proxy on the internet that will send users to the server closest to them when they try to visit Z. This is part of how the Content Distribution Network (CDN) concept works.
    Examples:
  • Apple Trailers uses Akamai
  • Jquery.com hosts its javascript files using CloudFront CDN (sample)
  1. The administrator of Z is worried about retaliation for content hosted on the server and does not want to expose the main server directly to the public.
    a) Owners of Spam brands such as "Canadian Pharmacy" appear to have thousands of servers, while in reality having most websites hosted on far fewer servers. Additionally, abuse complaints about the spam will only shut down the public servers, not the main server.

In the above scenarios, Z has the ability to choose Y.

Reverse Proxies are used for:

  • Content Distribution Network (CDN)