Proxy servers explained: forward, reverse and transparent proxies, PAC files and SOCKS
In short: A proxy is a server that makes requests on behalf of someone else. A forward proxy sits in front of users and handles their web traffic, for filtering, logging and caching. A reverse proxy sits in front of servers and accepts connections from the internet, handling TLS, load balancing and protection. Clients find forward proxies through explicit settings, PAC files or transparent interception.
The basic idea
Normally a client connects straight to a server. With a proxy in between, the client connects to the proxy, and the proxy opens its own connection to the server. The server sees the proxy, not the client. This middle position lets the proxy inspect, filter, cache, log, modify or spread the traffic.
Forward proxies
Organisations use forward proxies (often part of a secure web gateway) so that all user web traffic passes through one controlled point:
- block malicious and unwanted sites by category;
- scan downloads for malware;
- log who visited what, for security investigations;
- cache popular content (less common now that most traffic is encrypted and dynamic).
Cloud services such as Zscaler, Netskope, Cisco Umbrella and Cloudflare Gateway provide the same thing for users anywhere.
How clients find the proxy
- Explicit proxy: the browser or operating system is configured with the proxy's address and port (often 8080 or 3128). For HTTPS, the browser sends a
CONNECTrequest asking the proxy to open a tunnel. - PAC file: a small JavaScript file that tells the browser which proxy to use for which address, for example "go direct for internal sites, use the proxy for everything else". Pushed by Group Policy or MDM.
- WPAD: automatic discovery of the PAC file through DHCP or DNS. Convenient but has been abused by attackers; many organisations disable it.
- Transparent proxy: the network redirects web traffic to the proxy without any client settings. Easy to deploy, but harder with HTTPS and some applications.
Reverse proxies
A reverse proxy accepts connections from the internet on behalf of one or more internal servers. Nginx, HAProxy, Apache, F5, cloud load balancers and CDNs all act as reverse proxies. They can:
- terminate TLS, so certificates live in one place;
- spread requests across several servers (load balancing);
- hide internal server addresses and block attacks with a web application firewall (WAF);
- cache static content and compress responses.
Because the server now sees the proxy's address, reverse proxies add an X-Forwarded-For header (or use the PROXY protocol) with the original client IP, so logs remain useful.
SOCKS proxies
A SOCKS5 proxy forwards any TCP (and UDP) connection, not just web traffic, without understanding the application protocol. It is used by some applications and is what ssh -D creates for a quick encrypted tunnel.
Real-world example: the internal sites that broke
A company moved web filtering to a cloud proxy using a PAC file. The next morning, staff could not reach several internal web apps. The new PAC file sent everything to the cloud proxy, which could not reach private addresses. Adding rules to go direct for internal domains and private IP ranges fixed it.
Practice
What is the main difference between a forward and a reverse proxy?
What does a PAC file do?
How can a server behind a reverse proxy still see the original client IP?
Key takeaways
- Proxies make requests on behalf of clients or servers.
- Forward proxies filter, log and secure user web traffic.
- Reverse proxies terminate TLS, load balance and protect servers.
- Clients find forward proxies through explicit settings, PAC files, WPAD or interception.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.