Create Proxy on VPS with Squid with VPTS 2025
Proxies are an indispensable solution for multiple needs such as IP masking, network access management, security enhancement, and social media account farming. In this article...
Proxies are an indispensable solution for multiple needs such as IP masking, network access management, security enhancement, and social media account farming. In this article,VPTSwill guide you on how to create a proxy on a VPS using Squid – one of the most popular and efficient proxy servers today.
Buy proxies at VPTS
In the digital era, the need to use proxies is becoming increasingly popular—from securing connections and hiding IPs, to managing digital resources, automation, and farming social media accounts. One of the most effective and flexible ways to own a private proxy is creating a proxy on a VPS.
Why Create a Squid Proxy on a VPS?
- Easy to install and manage.
- Free, open source
- Supports flexible configuration: IP, port, whitelist, blacklist
- Stable operation, suitable for various individual and business models
Step 1: Prepare VPS
- First, you need a VPS running CentOS 7 with a minimum configuration of 1 vCPU and 512 MB RAM, and usingBvSshClientto log in
Step 2: Get Started
- After connecting to the VPS, run the Squid installation command:
yum install -y squid
- Configure Squid to run automatically on server reboot with the following command:
chkconfig squid on
service squid start
vi /etc/squid/squid.conf
- Configuration information for Squid will be contained in the file
/etc/squid/squid.conf.
- By default Squid runs on port 3128; if you want Squid to run on a different port, openfile/etc/squid/squid.conf and find the following line to change http_port 3128
You edit http_access deny all into http_access allow all
Step 3: Add user authentication for Proxy
To enhance security for the Proxy, you should create user accounts to access your proxy. Run the following commands:
yum install -y httpd-tools
touch /etc/squid/squid_passwd
chown squid /etc/squid/squid_passwd
Then, run the following command to create a user; the system will prompt you to enter a password:
htpasswd /etc/squid/squid_passwd USER_CỦA BẠN
For Debian and Ubuntu:
dpkg -L squid | grep ncsa_auth
RHEL/CentOS/Fedora :
rpm -ql squid | grep ncsa_auth
Reported result (use it to add in the next step)
/usr/lib64/squid/basic_ncsa_auth
Then go toNew SFTP window /etc/squid/squid.confadd to the first line of the file with the following content:
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/squid_passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
Additionally, to use Squid as a Proxy without being detected as proxy traffic, add to the end of the file /etc/squid/squid.conf following content:
via off
forwarded_for off
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
Then restart Squid for the above configurations to take effect:
service squid restart
Step 4: Multiple Proxies / 1 VPS
If you have multiple IPs assigned to your VPS and want to use each IP for a separate proxy, follow these steps:Configure in file/etc/squid/squid.conf
Configure additional IP in Squid
Delete default row:http_port 3128
And replace with the following structure:
http_port IP:PORT name=proxy1 acl proxy1 myip IP tcp_outgoing_address IP proxy1
In which:
proxy1is the identifier name for the proxy (you can choose another name)
IPis the specific IP address of the VPS
PORTis the port you want to open
Specific example:
http_port 51.199.10.15:3128 name=proxy1
acl proxy1 myip 51.199.10.15
tcp_outgoing_address 51.199.10.15 proxy1
To add multiple Proxies with multiple different IPs, just copy the section and edit it with your other IP details. Here I have added two more IPs to the squid.conf filehttp_port 51.199.10.15:3128 name=proxy1 acl proxy1 myip 51.199.10.15 tcp_outgoing_address 51.199.10.15 proxy1
http_port 51.199.10.16:3128 name=proxy2 acl proxy2 myip 51.199.10.16 tcp_outgoing_address 51.199.10.16 proxy2
http_port 51.199.10.17:3128 name=proxy3 acl proxy3 myip 51.199.10.17 tcp_outgoing_address 51.199.10.17 proxy3
Save and restart Squid:
service squid restart
If you do not want to use your VPS as a proxy server, you can remove Squid from the VPS using the following command:
yum remove squid -y
Link check proxy IPv4 : https://proxy6.net/en/checker
NOTE: You can watch the video more clearly at the link below ⇓
Tutorial video
CONCLUSION
Through this article,VPTShopes to have helped you master creating private proxies on a VPS using Squid, from basic installation to advanced configuration of multiple proxies on a single server. network.
Using private proxies on a VPS brings many benefits:
- Proactive control over IP, Port, and security
- Optimized access speeds, supporting account management, SEO, and automation
- Low cost, easy management, fast deployment
VPTS – Comprehensive Digital Infrastructure Solutions Provider
VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.
Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.
VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.
VPTS Team Contact Information
Website: https://vpts.shop
Facebook: https://www.facebook.com/trang.vpsttt/
Zalo OA: https://zalo.me/vpstttgroup
Hotline: 0328 812 674