SlideShare a Scribd company logo
Install Squid on CentOS / RHEL 5
Use yum command as follows:
# yum install squid
Output:
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package squid.i386 7:2.6.STABLE6-4.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 squid                   i386       7:2.6.STABLE6-4.el5 updates             1.2 M

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: squid                                  ######################### [1/1]

Installed: squid.i386 7:2.6.STABLE6-4.el5
Complete!



Squid Basic Configuration
Squid configuration file located at /etc/squid/squid.conf. Open file using a text editor:
# vi /etc/squid/squid.conf
At least you need to define ACL (access control list) to work with squid. The defaults port is TCP
3128. Following example ACL allowing access from your local networks 192.168.1.0/24 and
192.168.2.0/24. Make sure you adapt to list your internal IP networks from where browsing should be
allowed:
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks
Save and close the file. Start squid proxy server:
# chkconfig squid on
# /etc/init.d/squid start
Output:
init_cache_dir /var/spool/squid... Starting squid: .                      [   OK   ]

Verify port 3128 is open:
# netstat -tulpn | grep 3128
Output:
tcp        0          0 0.0.0.0:3128                        0.0.0.0:*                           LISTEN
20653/(squid)



Open TCP port 3128
Finally make sure iptables is allowing to access squid proxy server. Just open /etc/sysconfig/iptables
file:
# vi /etc/sysconfig/iptables
Append configuration:
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m
tcp -p tcp --dport 3128 -j ACCEPT
Restart iptables based firewall:
# /etc/init.d/iptables restart
Output:
Flushing firewall rules:                                   [                  OK   ]
Setting chains to policy ACCEPT: filter                    [                  OK   ]
Unloading iptables modules:                                [                  OK   ]
Applying iptables firewall rules:                          [                  OK   ]
Loading additional iptables modules: ip_conntrack_netbios_n[                  OK   ]

More Related Content

What's hot (20)

PDF
How to install nginx vs unicorn
baran19901990
 
PPTX
Installing OpenStack Juno using RDO on RHEL
openstackstl
 
PPT
Apache
Mindtree
 
PPT
Linux Server Start
Gavin Quan
 
PDF
Openstack installation using rdo multi node
Narasimha sreeram
 
PDF
Open erp on ubuntu
Iker Coranti
 
PDF
Nginx cheat sheet
Lam Hoang
 
PPTX
Install PostgreSQL on CentOS
Rangson Sangboonruang
 
PDF
DNF Failed To Open Cache
VCP Muthukrishna
 
PDF
Openstack kilo installation using rdo
Narasimha sreeram
 
PDF
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOS
Tũi Wichets
 
PDF
Openstack installation using rdo
Narasimha sreeram
 
ODP
Triangle OpenStack meetup 09 2013
Dan Radez
 
DOCX
Install elasticsearch, logstash and kibana
Chanaka Lasantha
 
PPTX
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Kentaro Ebisawa
 
PDF
A little waf
yang bingwu
 
PPTX
Proxy
leminhvuong
 
PDF
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 
PDF
IPTables Lab
Kaan Aslandağ
 
How to install nginx vs unicorn
baran19901990
 
Installing OpenStack Juno using RDO on RHEL
openstackstl
 
Apache
Mindtree
 
Linux Server Start
Gavin Quan
 
Openstack installation using rdo multi node
Narasimha sreeram
 
Open erp on ubuntu
Iker Coranti
 
Nginx cheat sheet
Lam Hoang
 
Install PostgreSQL on CentOS
Rangson Sangboonruang
 
DNF Failed To Open Cache
VCP Muthukrishna
 
Openstack kilo installation using rdo
Narasimha sreeram
 
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOS
Tũi Wichets
 
Openstack installation using rdo
Narasimha sreeram
 
Triangle OpenStack meetup 09 2013
Dan Radez
 
Install elasticsearch, logstash and kibana
Chanaka Lasantha
 
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Kentaro Ebisawa
 
A little waf
yang bingwu
 
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 
IPTables Lab
Kaan Aslandağ
 

Similar to Squid file (20)

PDF
Complete squid & firewall configuration. plus easy mac binding
Chanaka Lasantha
 
TXT
Linuxserver harden
Gregory Hanis
 
PDF
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
Krisman Tarigan
 
PDF
Squid proxy-configuration-guide
jasembo
 
PPT
Squid server
Rohit Phulsunge
 
PDF
Squid proxy server
Green Jb
 
PDF
17937858 squid-server - [the-xp.blogspot.com]
Krisman Tarigan
 
ODP
Firewalld : A New Interface to Your Netfilter Stack
Mahmoud Shiri Varamini
 
PPS
Linux11 Proxy Server
Jainul Musani
 
PDF
17) 11 (may, 2003) squid master this proxy server
swarup1435
 
PDF
Firewall and proxy servers howto
Kumar
 
PPTX
Firewall
khalid abdelazim
 
PDF
03 linuxfirewall1
Iwan Threads
 
PDF
Manage Network Security (Firewall) in RHEL - RHCSA (RH134).pdf
RHCSA Guru
 
PDF
Linux internet server security and configuration tutorial
annik147
 
DOCX
How to install squid proxy on server or how to install squid proxy on centos o
Proxiesforrent
 
ODP
Mcollective introduction
Javier Turégano Molina
 
PDF
Athenticated smaba server config with open vpn
Chanaka Lasantha
 
PDF
CentOS Linux Server Hardening
MyOwn Telco
 
PPTX
12 - System Security in Red Hat
Shafaan Khaliq Bhatti
 
Complete squid & firewall configuration. plus easy mac binding
Chanaka Lasantha
 
Linuxserver harden
Gregory Hanis
 
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
Krisman Tarigan
 
Squid proxy-configuration-guide
jasembo
 
Squid server
Rohit Phulsunge
 
Squid proxy server
Green Jb
 
17937858 squid-server - [the-xp.blogspot.com]
Krisman Tarigan
 
Firewalld : A New Interface to Your Netfilter Stack
Mahmoud Shiri Varamini
 
Linux11 Proxy Server
Jainul Musani
 
17) 11 (may, 2003) squid master this proxy server
swarup1435
 
Firewall and proxy servers howto
Kumar
 
03 linuxfirewall1
Iwan Threads
 
Manage Network Security (Firewall) in RHEL - RHCSA (RH134).pdf
RHCSA Guru
 
Linux internet server security and configuration tutorial
annik147
 
How to install squid proxy on server or how to install squid proxy on centos o
Proxiesforrent
 
Mcollective introduction
Javier Turégano Molina
 
Athenticated smaba server config with open vpn
Chanaka Lasantha
 
CentOS Linux Server Hardening
MyOwn Telco
 
12 - System Security in Red Hat
Shafaan Khaliq Bhatti
 
Ad

Recently uploaded (20)

PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
Dimensions of Societal Planning in Commonism
StefanMz
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Ad

Squid file

  • 1. Install Squid on CentOS / RHEL 5 Use yum command as follows: # yum install squid Output: Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package squid.i386 7:2.6.STABLE6-4.el5 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: squid i386 7:2.6.STABLE6-4.el5 updates 1.2 M Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.2 M Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: squid ######################### [1/1] Installed: squid.i386 7:2.6.STABLE6-4.el5 Complete! Squid Basic Configuration Squid configuration file located at /etc/squid/squid.conf. Open file using a text editor: # vi /etc/squid/squid.conf At least you need to define ACL (access control list) to work with squid. The defaults port is TCP 3128. Following example ACL allowing access from your local networks 192.168.1.0/24 and 192.168.2.0/24. Make sure you adapt to list your internal IP networks from where browsing should be allowed: acl our_networks src 192.168.1.0/24 192.168.2.0/24 http_access allow our_networks Save and close the file. Start squid proxy server:
  • 2. # chkconfig squid on # /etc/init.d/squid start Output: init_cache_dir /var/spool/squid... Starting squid: . [ OK ] Verify port 3128 is open: # netstat -tulpn | grep 3128 Output: tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 20653/(squid) Open TCP port 3128 Finally make sure iptables is allowing to access squid proxy server. Just open /etc/sysconfig/iptables file: # vi /etc/sysconfig/iptables Append configuration: -A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT Restart iptables based firewall: # /etc/init.d/iptables restart Output: Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]