00:00

Forward Proxy vs Reverse Proxy

Last updated:

Forward and reverse proxies look alike on a diagram. Both sit in the middle and pass requests along. The real difference is whose side they are on. A forward proxy represents the clients; a reverse proxy represents the servers.

This page puts the two side by side, shows the same request through each, and gives a decision table. For the full story of each, read Forward Proxy and Reverse Proxy.

1. What Are Forward and Reverse Proxies?

A forward proxy is deployed by the client side, such as a company or a user, and forwards outbound requests to any destination on their behalf.

A reverse proxy is deployed by the server side, the owner of a website or API, and receives inbound requests for its own servers.

A quick test: if the proxy can reach many unknown sites for known users, it is a forward proxy. If it serves many unknown users for known servers, it is a reverse proxy.

2. Architecture Comparison

Forward proxy compared with reverse proxy Top lane: users inside a network go through a forward proxy to reach websites on the internet; the websites see the proxy, so the users are hidden. Bottom lane: users on the internet reach a reverse proxy, which forwards requests to private servers; the users see only the proxy, so the servers are hidden. FORWARD PROXY · ACTS FOR CLIENTS Usershidden Forward Proxyclient-side Websitessee proxy IP REVERSE PROXY · ACTS FOR SERVERS Userssee proxy only Reverse Proxyserver-side Servershidden
Same middle position, opposite loyalty: the forward proxy hides clients, the reverse proxy hides servers.

3. The Same Request Through Each Proxy

Through a forward proxy

  1. An employee's browser is configured with proxy.corp.example:3128.
  2. It requests https://news.example.org by sending CONNECT news.example.org:443 to the proxy.
  3. The proxy checks company policy, opens the tunnel, and the news site sees the company's proxy IP.

Through a reverse proxy

  1. A visitor types https://shop.example.com; DNS points to the shop's reverse proxy.
  2. The proxy terminates TLS, picks a healthy app server and forwards the request.
  3. The visitor never learns the app server's address.

Notice who configures what. With a forward proxy, the client must point at the proxy. With a reverse proxy, the client does nothing; DNS points at the proxy.

Both proxies can keep logs, but only the forward proxy sees every site a user visits. That is why forward proxy logs need strict access control and short retention.

What each party can see

  • The forward proxy sees the user (if authenticated), every destination hostname, timing and data volume. With HTTPS it does not see paths or content.
  • The reverse proxy sees the full decrypted request for its own site, including path, headers, cookies and body, but nothing about the user's other browsing.
  • The website sees the forward proxy's IP address, not the user's, unless the proxy forwards it in a header.
  • The user sees only the reverse proxy's address, never the backend servers.

4. Key Differences Explained

  • Protected party: forward hides clients from servers; reverse hides servers from clients.
  • Owner: forward proxies belong to the client's organisation; reverse proxies belong to the service owner.
  • Destinations: forward proxies reach any site that policy allows; reverse proxies reach only their configured backends.
  • TLS: a forward proxy usually tunnels HTTPS without decrypting it; a reverse proxy usually terminates TLS with the site certificate.
  • Typical features: forward focuses on filtering, logging and egress control; reverse focuses on load balancing, caching and security.

Common misconceptions

  • "The software decides the type." It does not. Nginx, Envoy and even Squid can be configured as either; the deployment and the owner decide the role.
  • "A forward proxy makes browsing secure." It controls and logs traffic, but it does not encrypt anything. HTTPS provides the encryption.
  • "Only large companies need a reverse proxy." Even a single server benefits from TLS termination, compression and hiding the application port.
  • "Clients can always see the reverse proxy." They cannot. To the client, the reverse proxy simply is the website.

5. Practical Implementation

The configurations show the different perspective. The forward proxy (Squid) lists who may use it. The reverse proxy (Nginx) lists which servers it fronts.

squid.conf (forward)
http_port 3128
acl office src 10.20.0.0/16
acl CONNECT method CONNECT
acl SSL_ports port 443
http_access deny CONNECT !SSL_ports
http_access allow office
http_access deny all
nginx.conf (reverse)
upstream shop_backend {
    server 10.0.1.11:8080;
    server 10.0.1.12:8080;
}
server {
    listen 443 ssl;
    server_name shop.example.com;
    ssl_certificate     /etc/nginx/certs/shop.crt;
    ssl_certificate_key /etc/nginx/certs/shop.key;
    location / {
        proxy_pass http://shop_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
client-view.sh
# Forward proxy: the client must opt in
curl -x http://proxy.corp.example:3128 https://news.example.org/

# Reverse proxy: the client just calls the public name
curl https://shop.example.com/

6. Advantages and Disadvantages

Forward proxyReverse proxy
Main benefitControl and visibility of outbound trafficProtection, scaling and speed for services
Extra benefitShared caching, fixed egress IPTLS in one place, caching, load balancing
Main drawbackClients need configurationMust be highly available
Risk if misconfiguredOpen proxy abused by attackersSpoofed headers or exposed backends

7. Forward Proxy vs Reverse Proxy Comparison

AspectForward proxyReverse proxy
Acts on behalf ofClientsServers
HidesClient identityServer identity and topology
Configured byClient or network adminService owner (DNS points to it)
Traffic directionOutbound (inside to outside)Inbound (outside to inside)
TLS handlingUsually tunnels with CONNECTUsually terminates TLS
Common toolsSquid, corporate secure web gatewaysNginx, HAProxy, Envoy, Traefik
Typical usesFiltering, auditing, egress controlLoad balancing, caching, security

8. Real-World Use Cases

  • Both in one request: an employee behind a corporate forward proxy visits a site that runs behind a reverse proxy. The request passes through both, and neither side sees the other's internals.
  • Microservices: an ingress reverse proxy handles inbound traffic, while an egress forward proxy controls calls to third-party APIs.
  • Developer tools: local debugging proxies such as mitmproxy act as forward proxies; local dev servers often use a reverse proxy to combine front end and API on one origin.

When you draw an architecture, place forward proxies on the client's side of the boundary and reverse proxies on the service's side. That single rule removes most of the confusion in design reviews.

Example: ingress and egress around one service

Consider a payment service running in Kubernetes. Customer requests arrive through an ingress controller, the reverse proxy, which terminates TLS and routes /pay to the service. When the service calls the card network's API, the request leaves through an egress proxy, the forward proxy, which allows only that partner's hostname and gives the partner one fixed IP address to allow-list. The same service therefore sits between two proxies, each guarding a different boundary.

9. Best Practices

  • Name them by role: state "egress proxy" or "ingress proxy" in architecture docs to avoid confusion.
  • Forward proxies: restrict who can use them, allow CONNECT only to port 443, and protect browsing logs.
  • Reverse proxies: run redundant instances, block direct access to backends, and set forwarded headers correctly.
  • Do not mix roles on one instance unless the rules are clearly separated; an exposed forward-proxy rule on a public reverse proxy creates an open proxy.

Finally, monitor both. For a forward proxy, watch blocked requests and unusual destinations, which can reveal malware. For a reverse proxy, watch error rates, latency and traffic per backend, which reveal failing or overloaded services.

10. Summary

  • Both proxies sit in the middle; the difference is whom they represent.
  • Forward proxy: client-side, outbound, hides users, configured by clients.
  • Reverse proxy: server-side, inbound, hides servers, reached through DNS.
  • Forward proxies tunnel HTTPS; reverse proxies usually terminate it.
  • Real systems often use both: egress proxies and ingress proxies.

A VPN also routes traffic through a middle server. See how it differs in Forward Proxy vs VPN.