Squid proxy server (1)

                                                             搭建代理传统squid代理服器

1. Experimental topology:
Squid proxy server (1)
2. Experimental steps
1) Install the Squid proxy server software on server B (mount the CD, decompress it) 2) Execute make && make install after
Squid proxy server (1)
compiling and installing 3) Create link files, create users and groups 4 ) Use the squid service script (in order to facilitate the start and stop of the service) Vim squid, the content is as follows: set the permissions as shown in the figure below, and add it as a system service. 5) Modify the configuration file Vi /etc/squid.conf The main modifications are the following configuration items, some configuration items need to be modified, and some configuration items need to be added. http_port 3128 Squid's default listening port tcp Modify cache_effective_group Squid's running group Add cache_effective_user squid Squid's running user Add visible_hostname centos1.lzg.com Current system hostname Add cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256 6) Add an allow policy to the firewall 7) Start the squid service execution: Squid -k parse checks whether the grammar is correct, there are a lot of content, generally ignore it, no error is prompted. Execute squid -z to initialize the cache directory, this step must be done, wait for a while after the execution.
Squid proxy server (1)


Squid proxy server (1)


Squid proxy server (1)

Squid proxy server (1)

Squid proxy server (1)








Squid proxy server (1)

Squid proxy server (1)



Execute squid to start the service. You can also use service squid start to start the service. It is best to start the service with squid for the first time.

Then check the port
Squid proxy server (1)
8) Build a website on server A (the default is Apache, and compile a webpage to welcome to beijing)
9) Modify the proxy server address of the ie browser on the
Squid proxy server (1)
client computer 10)
Don't forget to visit the website on the client computer Open port 80
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
Squid proxy server (1)
and then stop the proxy server service, visit the website again, and find that it cannot be accessed, indicating that the client is indeed surfing the Internet through the proxy server.
Squid proxy server (1)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324655070&siteId=291194637