Squid Proxy is a cache that fully supports popular protocols such as HTPS,HTTPS,FTP, which is placed in front of the web server and improves the speed and performance of the web server by caching these repeated requests. iterate and filter web traffic.
mục lục
- Install Squid
- Step 1: To install squid use the command
- and press y to agree to install
- Step 2: Then start the service with the command
- Step 3: Start squid with the server using the command
- Step 4: To test use the command
- Step 5: Go to the config file using the command
- Step 6: Allow ip ranges to use squid proxy using the command
- Step 7: Enable more secure ports to access via Squid proxy similar to for web port connection using command
- Step 8: The default port of squid proxy is 3128, you can change another port
- Step 9: To create a login account for Squid proxy install the necessary tools using the command
- Step 10: To create a file and assign permissions to the file use the command
- Step 11: To create a hung user for squid proxy use the command
- Step 12: go to the config file of squid proxy and add user authentication configuration commands
- Step 13: To restart squid proxy service use command
- Step 14: To block any web when using proxy use command
- vi /etc/squid/blocked_sites
- and add to site eg:domain.com then save and exit
- Step 15: Go to the squid config file and add the web block file path using the command
- Step 16: Then save and restart squid proxy using command
- Step 17: Go to the client, connect to the proxy and check
- Step 18: Check the connection of blocked websites
- Conclusion
Install Squid
Step 1: To install squid use the command
yum install squid
and press y to agree to install
Step 2: Then start the service with the command
systemctl start squid
Step 3: Start squid with the server using the command
systemctl enable squid
Step 4: To test use the command
systemctl status squid
Step 5: Go to the config file using the command
vi /etc/squid/squid.conf
Step 6: Allow ip ranges to use squid proxy using the command
acl localnet src ip 14.241.230.0/24
Step 7: Enable more secure ports to access via Squid proxy similar to for web port connection using command
acl Safe_ports port 80
Step 8: The default port of squid proxy is 3128, you can change another port
Step 9: To create a login account for Squid proxy install the necessary tools using the command
yum – y install httpd-tools
Step 10: To create a file and assign permissions to the file use the command
touch /etc/squid/passwd && chown squid /etc/squid/passwd
Step 11: To create a hung user for squid proxy use the command
htpasswd /etc/squid/passwd hung
Step 12: go to the config file of squid proxy and add user authentication configuration commands
Step 13: To restart squid proxy service use command
systemctl restart squid
Step 14: To block any web when using proxy use command
vi /etc/squid/blocked_sites
and add to site eg:domain.com then save and exit
Step 15: Go to the squid config file and add the web block file path using the command
acl blocked_sites dstdomain “/etc/ squid/blocked_sites”
http_access deny blocked_sites
Step 16: Then save and restart squid proxy using command
Systemctl restart squid
Step 17: Go to the client, connect to the proxy and check
Step 18: Check the connection of blocked websites
Conclusion
We have just completed the steps of installing and configuring our own squid proxy server, where we can manage ips and websites when connecting to the server.