What is a Transparent Proxy
A transparent proxy, also known as an inline proxy, intercepting proxy or forced proxy, is a server that intercepts the connection between an end-user or device and the internet. It is called “transparent” because it does so without modifying requests and responses. Squid Transparent Proxy Server is a popular open source transparent proxy tool.
For example, a user on a corporate network may be surfing the Internet. The user requests to view a news article on cnn.com, and views the same content as they would on their local connection at home.
However, unbeknownst to the user, the news article is delivered not from the cnn.com origin server, but rather from a transparent proxy running on the corporate network. The user’s experience is exactly the same. However, the user’s employer now has the ability to monitor their behavior, and also restrict access to certain websites.
Transparent Proxies and Forced Proxies
Transparent proxies are sometimes known as forced proxies because they can be applied to a user’s connection without any change to their computer’s proxy settings.
As a result, a transparent proxy can be “forced” on a user without their consent or knowledge (although in many cases users are informed about the presence of a proxy). Some websites maintain unofficial transparent proxy lists, to help users become aware they are monitored.
Transparent proxies, by definition, are set up by the operator of a network or a website, and not by the end-user.
Transparent Proxy Settings
When you set up a transparent proxy, some of the common proxy settings are:
- Authentication—provides the server with the same credentials as the users behind the proxy
- Interception—defines how the proxy should intercept traffic, at the operating system level or at the router level
- Caching—defines whether the proxy server should cache content for returning users
- Reverse proxy—you can place the proxy in front of a web server to accelerate performance for users (as opposed to setting it to intercept remote access)
- Filtering chat, data streaming, torrent threads, etc—configure the transparent proxy not to allow users to access certain protocols or ports
Uses for Transparent Proxy on Client Side
You can deploy a transparent proxy on the client side, meaning that all traffic to and from a client endpoint is intercepted by the proxy. Use cases for client-side transparent proxies include:
Content Filtering
You can use a transparent proxy to filter out unwanted content, defined via proxy settings. For example, when a specific website is requested, the proxy can refrain from forwarding the request to the web server. Instead, it intercepts the connection and displays an error or notice to the user.
Gateway Proxies
You can use a gateway proxy to modify or block network traffic based on rules. For example, a firewall is a transparent proxy, which allows traffic to pass between an internal network and the Internet, but blocks traffic if it violates the firewall’s rule table.
Transparent Caching
If multiple people are accessing the same content from the same location—for example, many students viewing the same news site via their university network—it is more efficient to initially cache the content, and serve it from cache to subsequent users. A transparent proxy can do this for an organization, facility or neighborhood.
Traffic Monitoring
If you operate a network, you can set up a transparent proxy to monitor user traffic and behavior.
Traffic monitoring can also have illegitimate uses—for example, an unscrupulous public wifi operator can monitor user’s connections and steal data and credentials.
Authentication
Public wifi spots and cellular Internet operators sometimes use transparent proxies to force users to authenticate themselves on the network, and agree to terms of service. Only after a user authenticates and agrees, are they allowed to surf.
Users may not realize that even after the initial authentication screen, the entire connection is intercepted and could be monitored by the operator, via the transparent proxy.
Uses for Transparent Proxy on the Server Side
TCP Intercept for DoS Protection
TCP intercept is a type of transparent proxy which you can use to protect a server against a SYN-flood Denial of Service (DoS) attack. It intercepts all traffic to a web server, accepts client requests, and performs a three-way handshake. If successful, it performs a three-way handshake with the server, and joins the two half-connections between client and server.
The TCP intercept watches TCP requests, and waits (typically 30 seconds) for connections to be established. When the number of inactive connections exceeds a certain threshold, the TCP intercept enters “aggressive mode”. In this mode, each new arriving connection causes the oldest inactive connection to be deleted.
This technique is no longer effective against modern, large scale Distributed Denial of Service (DDoS) attacks. Attackers controlling high-powered servers, or millions of zombie computers, can create SYN floods that easily overwhelm a TCP intercept controller.
This is why many organizations are using cloud-based services like Imperva’s DDoS Protection. Cloud-based DDoS services are able to scale up on-demand to handle large scale attacks, and can also protect against other types of DDoS. For example, DDoS services can prevent protocol attacks and application layer attacks, which do not occur at the TCP layer.
Transparent Proxy and CDN for Front-End Optimization
A Content Delivery Network (CDN) is a globally distributed network of proxy servers, which caches and serves content to users near their geographical location.
A CDN, such as Imperva’s Global Content Delivery Network, is a type of transparent proxy operating on the server side, whose purpose is to perform front-end optimization to improve the end-user experience. It intercepts traffic to a web server and instead of letting the user access the origin server directly, it offers the same content from its cache. This results in improved performance for user and reduced system resources required on the server.