天天看點

centos7配置squid代理伺服器

伺服器清單:

squid伺服器配置:

a. 内網配置:

cat /etc/sysconfig/network-scripts/ifcfg-eth0

centos7配置squid代理伺服器

b. 外網配置:

cat /etc/sysconfig/network-scripts/ifcfg-eth1

centos7配置squid代理伺服器

c. 安裝:

yum -y install squid

d. 修改配置檔案:

vim /etc/squid/squid.conf

centos7配置squid代理伺服器

e. 配置檔案原代碼:

f. 配置防火牆規則(開啟3128端口):

iptables -I INPUT -p tcp --dport 3128 -j ACCEPT

g. 關閉apache:

systemctl stop httpd

web1伺服器配置:

centos7配置squid代理伺服器

b. 關閉防火牆:

systemctl stop firewalld

web2伺服器配置(參照web1):

浏覽器通路(192.168.8.252):

a. 頁面一:

centos7配置squid代理伺服器

b. 頁面二:

centos7配置squid代理伺服器

 本文轉自 Lee_吉 51CTO部落格,原文連結:http://blog.51cto.com/12173069/2061841

繼續閱讀