1.安装squid服务程序
[root@dsrw ~]# yum install squid -y
Installing:
squid x86_64 7:4.4-4.module+el8+2479+dae5d0d3 AppStream 3.6 M
安装依赖关系:
libecap x86_64 1.0.1-1.module+el8+2479+dae5d0d3 AppStream 29 k
Enabling module streams:
squid 4 事务概要
安装 2 软件包
2.配置squid正向透明代理(3129端口)
[root@dsrw ~]# vim /etc/squid/squid.conf
http_access allow all
http_port 3128
http_port 3129 transparent
cache_dir ufs /var/spool/squid 100 16 256
[root@dsrw ~]# systemctl restart squid
[root@dsrw ~]# systemctl enable squid
3.配置squid防火墙策略
[root@dsrw ~]#firewall-cmd --permanent --add-port=3129/tcp
[root@dsrw ~]#firewall-cmd --permanent --add-service=squid
[root@dsrw ~]#firewall-cmd --add-masquerade --permanent
[root@dsrw ~]# firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=3129:toaddr=192.168.10.2
[root@dsrw ~]# firewall-cmd --reload
4.win7客户机设置
![图片[1]-14.4 透明正向代理-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/02/图片2.png)
![图片[2]-14.4 透明正向代理-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/02/图片3.png)
![图片[3]-14.4 透明正向代理-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/02/QQ截图20230221020037-1024x444.jpg)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容