HowTo Block Internet Explorer Browser With Squid Proxy Server on a Linux/Unix Server
I want to block Internet Explorer (MS-IE) browser on a squid proxy server running on a Linux or Unix-like systems. How can I block IE on a squid proxy server version 3.x?
You need to setup an acl on a squid proxy server to block Microsoft Internet Explorer or any other browser of your choice. This tutorials explains how to block [donotprint][/donotprint] Internet Explorer browsers with Squid proxy running on a Ubuntu Linux and CentOS Linux version 6.x server. This is also useful to fix an known vulnerability coming from a specific version of browser. Please note the following acl based on user-agents and it can be spoofed easily.
Warning: Please note that third-party browser add-ons or bots can alter the user-agent string on the client side itself. So the following may not work at all.
Syntax to block squid using User-Agent header
The acl syntax is as follows tn match on User-Agent header:
acl acl_name_here browser User_Agent_Here
Step 1: Edit squid.conf
Type the following command:
sudo vi /etc/squid/squid.conf
Step 2: Enable User-agent log in squid.conf
Make sure access_log set to combined (default is squid):
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.