How to Create a Proxy on VPS CentOS 7 using Squid Proxy
Are you looking for a way to create a proxy on your VPS running CentOS 7? Look no further, as this article will guide you through the process of setting up a Squid proxy on your VPS. A proxy server acts as an intermediary between your device and the internet, allowing you to access websites and services anonymously. This can be useful for various reasons, such as bypassing geo-restrictions or improving online security. So, let’s get started and learn how to create a proxy on VPS CentOS 7 using Squid Proxy.
Introducing Squid Proxy
Squid proxy is one of the most widely used free open source software proxy solutions in the online community. Squid proxy is responsible for forwarding requests from the client side and at the same time plays a control role to create safety for clients’ Internet access.
In short: Squid is a caching proxy for the web that supports HTTP. HTTPS, FTP… help us improve response time and reduce bandwidth usage.
Instructions for installing Squid Proxy on VPS CentOS 7
After the vps is setup, log in to the vps’s ssh and execute the commands below one by one.
1. Install Squid
yum -y install squid
2. Configure Squid to run automatically every time the Server restarts.
chkconfig squid on
3. Start Squid.
service squid start
4. Reconfigure squid
Change Port at line: http_port xxx (xxx is the port you want)
Change http_access deny all to http_access allow all
Press Ctrl + X, select Y to save the file, Ctrl + O, select Enter to go back
service squid restart
5. Mở firewall:
firewall-cmd --permanent --add-port=xxxx/tcp
(xxx is the port that you changed in step 4, if not changed in step 4, the default is 3128)
After completing this step, you can use the proxy with the format IP:Port.
If in this step you encounter an error Error firewall-cmd command not found, you need to fix the error.
– Install firewalld
sudo yum install firewalld -y
– Launch the 3 command lines below to start firewalld and enable it to start automatically on system boot.
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo systemctl status firewalld
After fixing the firewall-cmd command not found error, repeat step 5.
With simple steps you can create a Proxy from VPS Centos 7, wish you success