1.安装squid
yum install -y squid
2.编辑squid配置文件
vim /etc/squid/squid.conf
添加
acl local src 0.0.0.0/24 #允许0.0.0.0/24网段内所有客户机访问代理服务器
http_access allow local #该记录一定要添在deny all之前,允许本地访问
3.启动squid服务
systemctl start squid
systemctl enable squid
4、测试
1.linux客户端配置正向代理
export http_proxy=http://10.30.3.30:3128 #192.9.191.30是代理服务器ip,http
export https_proxy=http://10.30.3.30:3128 #https
echo "export http_proxy=http://10.30.3.30:3128" >>/etc/profile
echo "export https_proxy=http://10.30.3.30:3128" >>/etc/profile
source /etc/profile
yum -y install httpd
wget https://codeload.github.com/gflags/gflags/tar.gz/v2.1.2
2、谷歌测试
点击设置
访问百度成功