当前位置:网站首页>Squid agent

Squid agent

2022-06-11 06:00:00 visionkiwi

Squid agent

There is an empty computer in the laboratory , Put on centos7.5 The system is ready to be built harbor play , It turns out that there is no net , I don't want to use local sources , The campus network also needs authentication to log in , So we used squid

Preparation

a centos7.5 System First, use the local source
a win10 System Two network cards are required
A switch centos and win Connect through a switch

I used a wireless network card here to plug in win10 On , Used to connect the campus network

squid linux edition

The local source configured by myself contains , So myself yum -y install squid

squid win10 edition

link :https://pan.baidu.com/s/13HIM6_UJYuKDZOvNrEqIjw
Extraction code :1804
– From Baidu network disk super member V4 The share of

Configure server (win10)

The installation to c disc

Then enter squid Folder , When entering etc–>squid–>squid.conf

http_access deny all  Change to  http_access allow all

Firewall settings

image-20211028143842548

Click Advanced settings on the right of the above figure –> Inbound settings –> New rules –> port –>3128–> Allow connections –> Future generations –>Squid Service. Here's the picture

image-20211028144501050

image-20211028144510662

image-20211028144521689

image-20211028144537520

image-20211028144610537

Use the same method to create UDP Inbound protocol for , The same is true for outbound protocols , One UDP, One TCP, All ports are 3128

 Modify and save in win10 The taskbar has a squid Right click on the icon to make sure it is start squid servier

 Then open the squid Terminal  perform 

squid -k parse
squid -z

Configure client (centos)

yum -y install squid

vi /etc/profile
# Add... At the bottom 
export http_proxy=http:// Server side ip:3128
export https_proxy=http:// Server side ip:3128
export no_proxy="127.0.0.1,localhost"

source /etc/profile

systemctl restart squid


 Last curl Try Baidu and it won't work , After my own experiments ping It won't work ,curl Will be able to .


 Connect the campus network through the wireless network card win10 The Internet , And then through squid agent , Give Way centos adopt win10 The self-contained network card is connected to each other , Realize Internet access 
原网站

版权声明
本文为[visionkiwi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020531050316.html