web proxy service can be configured to operate in either transparent or non-transparent mode – but what are the differences, and how should you choose between them?
In transparent mode, there are no special configuration steps needed to setup client browsers, thus allowing the proxy service to be activated and in-use almost immediately. Once activated, all traffic destined for the Internet arriving on port 80 is automatically redirected through the proxy. With the latest Guardian products you can even use NTLM with Active Directory in conjunction with transparent proxying allowing for single sign on and minimal network configuration.
Both transparent and non-transparent proxying can be used together at the same time. Enabling transparent does not stop non-transparent from working. In situations where transparent is the norm but a specific application requires non-transparent you can simply configure the proxy settings in that application. Both modes have pros and cons. This article explains how to decide on the most appropriate mode for your network.
When to avoid transparent proxying
Transparent mode should be avoided in the following situations:
- When you want to filter HTTPS sites – Content filtering cannot be applied to HTTPS traffic because transparent proxying cannot redirect HTTPS. HTTPS pages are encrypted, so content filtering cannot be applied to HTTPS pages – only filtering on the unencrypted URL will work. In general, transparent proxying is not robust enough to guarantee restrictions on web downloads or access to inappropriate sites. What you can do, however, is block all HTTPS through traffic using outgoing firewall rules and then those few that require HTTPS can have their browser settings configured to manual proxy settings.
- When using proxy authentication – Proxy authentication cannot be used when operating in transparent mode. This is because the browser does not know that a proxy is being used (i.e. the proxy is transparent) and consequently does not know how to respond to a proxy authentication request.
- When using Ident for authentication – Ident with transparent proxying is possible, but all Ident servers must be configured to accept any request, not just one qualified by correct destination IP and ports.
- When using web-enabled client applications – Applications that connect to the Internet are often confused by transparent proxying. This can normally only be resolved by configuring the client application with the proxy details.
- When you want to use the SSL Login authentication method. – It is not possible to be redirected to the requested website once logged in – this requires the use of the Guardian proxy in non-transparent mode.
- When exceptions are required – If a client needs to have direct access to a particular domain without going through the proxy, transparent mode should not be used as such a setup is very difficult to configure and manage.
- When you have no local DNS server – If your computers are using transparent proxying and you have no local caching DNS server then all requests will require a DNS lookup to your ISP slowing down browsing. Using manual proxy settings will cause the proxy to do the DNS lookups, which it will cache, and speed up web browsing. An example might be in a basic Web Cafe with no firewall or router that has a caching DNS.
Why use non-transparent proxying?
The main reason to use non-transparent (or manual proxying) is so that the web browser and other client applications know that a proxy is being used, and so can act accordingly. Initial configuration of a non-transparent proxy might be trickier, but ultimately provides a much more powerful and flexible proxying service.
Another advantage of non-transparent proxying is that spyware and worms that use the web for transmission may not be able to function because they don’t know the proxy settings. This can reduce the spread of malicious software and prevent bandwidth from being wasted by infected systems.
Configuring proxy settings in non-transparent mode
When using non-transparent proxying, appropriate proxy settings must be configured on client machines and browsers. This can be achieved in a number of different ways:
- Manually – Proxy settings can be entered manually in most web browsers and web-enabled applications. Usually such settings are entered as part of the applications Connection Settings or similar. The address of the proxy is required, along with the proxy port number. These settings are displayed on the “Services / web proxy” and “Guardian / web proxy” pages as part of the “Automatic configuration script” region.
- Automatic configuration script – The Smoothwall proxy provides aproxy.pac file that can be used to automatically configure proxy settings in most Internet browsers. To use the automatic configuration script, enter the URL displayed in the “Automatic configuration script” region of the “Services / web proxy” and “Guardian / web proxy” pages into your browser software.
- Microsoft Windows 2000 domain – In a Windows 2000+ domain, proxy settings can be configured in the domain security policy. This eliminates the need to manually configure any part of the users system.
- Automatic discovery – Many browsers support automatic discovery of proxy settings using the WPAD (Web Proxy Auto-Discovery) protocol. This is relatively easy to configure if you have a local DNS server.
- Using DHCP to distrubute proxy settings – DHCP can also be used to set proxy settings. That might be a better method than using security policies. Currently the DHCP server on the Smoothwall firewalls cannot be used for giving out proxy.pac locations.
- Microsoft Windows login script – The Windows login script can be used to import a registry file which will automatically configure the system wide proxy settings.
- .ini files – Browsers like Firefox can be configured automatically with ini files. Such files could be copied or modified as part of the login script on a Microsoft Windows or Linux network.
- Third party solutions – Third party applications are available for Windows which can, at login, automatically configure web browser proxy settings. These range from simple programs designed specifically to automate proxy configuration, or more sophisticated applications that provide a range of services such as monitoring the users desktop.
When to use transparent proxying
- When minimal or no network configuration is required.
- Transparent proxying can be useful in mixed environments containing Unix, Linux, Apple Mac and Microsoft Windows systems. This allows quick access to the web proxy for everyone, without having to configure a multitude of different platform specific applications and browsers.
- Transparent mode can be used for convenience if Guardian is being used to provide non-HTTPS filtering. However, if Guardian is being used to guarantee prevention of abuse, non-transparent proxying should be used or instead use transparent and have outgoing HTTPS blocked at the firewall.
- In a transparent proxy connection, the client sends all requests through its default gateway. The destination IP address in the packet from the client is the actual destination’s IP address (e.g., google.com’s IP address) and not the firewall. Since the firewall lies along the routing path to the client’s default gateway, or is the client’s default gateway, it is able to inspect the proxy application layer data as specified. After inspecting the data, the firewall passes the packet on. The client is responsible for its own DNS lookups. In a transparent connection, the client is unaware of the firewall.
- In a non-transparent proxy connection, the client (e.g., a Web browser) sends all requests to the firewall. The client’s connections settings explicitly specify that all requests be sent to the firewall as a proxy. The destination IP address in the packet from the client is the firewall’s IP address, even though the site it wants to access is, for example, google.com. The firewall inspects the proxy application layer data as specified, NATs the packets, and passes them on to the final destination. The firewall is responsible for DNS lookups. In a non-transparent connection, the client is completely aware of the firewall.
Although a non-transparent connection may sound more complicated, it may be beneficial (or even necessary) depending on routing or if you use certain authentication methods or non-standard ports. The following proxies can be configured to be non-transparent:
One thought on “Transparent Proxy vs. Non-Transparent Porxy”
Some protocols are not proxied because of the sheer complexity involved in developing a proxy for that particular protocol. However, the list of protocols that are too complex or too hard to proxy is surprisingly short. So for that reason, it is more accurate to say that most protocols can be proxied but exactly which protocols are supported by any particular proxy server needs to be checked out on a case by case basis.