Squid Proxy Setup Guide

🧭 Overview

This guide explains how to deploy a secure Squid HTTP/HTTPS proxy and use it with ProxyChains.

1️⃣ Install Squid

apt update
apt install squid apache2-utils -y
    

2️⃣ Create Proxy User

htpasswd -c /etc/squid/passwd USERNAME
htpasswd /etc/squid/passwd USERNAME2
    

3️⃣ Configure Squid Authentication

nano /etc/squid/squid.conf
    
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic realm Squid Proxy
acl authenticated proxy_auth REQUIRED

http_access allow authenticated
http_access deny all
    

4️⃣ Restart Squid

systemctl restart squid
systemctl status squid
    

5️⃣ Test Proxy

curl -x http://USERNAME:PASSWORD@proxy.zerosploit.net:3128 https://httpbin.org/ip
    

✔ If the IP changes, the proxy is working

6️⃣ Install ProxyChains

apt install proxychains4 -y
    

7️⃣ Configure ProxyChains

nano /etc/proxychains4.conf
strict_chain
proxy_dns
http proxy.zerosploit.net 3128 USERNAME PASSWORD
    

8️⃣ Use ProxyChains

proxychains curl https://httpbin.org/ip
proxychains nmap -Pn example.com
proxychains ssh user@target
    

🔐 Security Notes