yum -y install squid
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
base
100% |=========================| 1.1 kB 00:00
updates
100% |=========================| 951 B 00:00
addons
100% |=========================| 951 B 00:00
extras
100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for squid to pack into transaction set.
squid-2.6.STABLE6-4.el5.i 100% |========================| 139 kB 00:00
---> 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
Downloading Packages:
(1/1): squid-2.6.STABLE6-
100% |====================| 1.2 M 00:00
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!
[root@lan ~]#
vi /etc/squid/squid.conf
http_port
8080
// line 73: change
acl CONNECT method CONNECT
acl lan src 192.168.0.0/255.255.255.0
// line 2410: add (permit only LAN)
http_access allow localhost
http_access allow lan
// line 2527: add (permit only LAN)
http_access deny all
visible_hostname lan.server-linux.info
// line 2841: add (specify hostname)
# forwarded_for on
forwarded_for off
// line 3117: add (hide IP address)
header_access Referer deny all
header_access X-Forwarded-For deny all
header_access Via deny all
header_access Cache-Control deny all
// line 3437: add
header_access X-Forwarded-For deny all
header_access Via deny all
header_access Cache-Control deny all
[root@lan ~]#
/etc/rc.d/init.d/squid start
init_cache_dir /var/spool/squid... Starting squid:
[ OK ]
[root@lan ~]#
chkconfig squid on
No comments:
Post a Comment