SQUID is the most popular Proxy server for Linux systems. It also used for the web filtering. Its widely used for increasing web server speed by caching repeated data.
This article will help you to Install and Configure SQUID Proxy Server on CentOS, Redhat and Fedora Linux systems.
Squid Installation and Configuration
yum install squid -y
Edit squid configuration file
Before you edit default configuration file it is highly recommended to keep backup.
cp /etc/squid/squid.conf /etc/squid/squid.conf.backup
Open configuration file and add below mentioned parameters
Add transparent proxy setting and add and allow our network
Allow LAN Network
acl our_network src 192.168.2.0/24
# Allow Network ACL Allow/Deny Section#
http_access allow our_network
# Transparent Proxy Parameters
http_port 3128 intercept
Save & Exit from vim editor
Now start squid service and make sure it is added on startup.
systemctl start squid
systemctl enable squid
Add port redirection and masquerading rules in RHEL7/CentOS7 firewall using firewall-cmd tool.
firewall-cmd –permanent –zone=public –add-forward-port=port=80:proto=tcp:toport=3128:toaddr=192.168.2.100
firewall-cmd –permanent –zone=public –add-port=3128/tcp
firewall-cmd –permanent –add-masquerade