Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 28-11-2013, 10:21 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Xây dựng một Proxy Server trên centos với Squid Proxy
Xây dựng một Proxy Server trên centos với Squid Proxy


1. Cài đặt và cấu hình Squid trên Server


Mã:
[root@lan ~]# 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     // Thay đôi port cho proxy

acl CONNECT method CONNECT  acl lan src 192.168.0.0/255.255.255.0   // Thêm (Chỉ cho phép LAN) 

http_access allow localhost  http_access allow lan  // Thêm (Chỉ cho phép LAN)

http_access deny all   visible_hostname lan.quantrinet.com 

// Thêm dòng     # forwarded_for on  forwarded_for off       header_access Referer deny all  

// Thêm   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



2. Cấu hình kết nối đến proxy server
[trên Client]

Open Internet Explore -> Chọn [Tools] -> [Internet Options] -> Chọn Connections Tab





Chọn tiếp LAN Setting và điền vào thông tin của Proxy Server






Done!

Chúc các bạn thành công!
  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:23 AM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.