Anonymous Proxy Server on a VPS: Squid, 3proxy and Dante Setup
- November 20, 2026
- 9:00 am
- By Adrien Roche
- Networking

What an anonymous proxy server is, and why a VPS is the honest way to get one
A proxy relays your connections, so the destination sees the proxy's IP. What it reveals beyond that depends on headers. A transparent proxy adds your real address in X-Forwarded-For; an anonymous proxy drops it but still sends Via, so the site knows a proxy is involved; an elite or high-anonymity proxy sends neither. Every setup below is elite: Squid with forwarding headers off, 3proxy in anonymous mode, and SOCKS5, which never touches application data.
Be clear about what "anonymous" covers. The website cannot see your IP. Your VPS provider still sees traffic leaving its network, the proxy logs what you tell it to, and plain HTTP or SOCKS adds no encryption, so this defeats website-side tracking and geo-blocks, not a hostile network. It is also per-application. If you want the whole machine tunnelled, a WireGuard VPN server on the same VPS is the better tool; if the network you sit on detects and blocks ordinary proxies, that is a job for the obfuscated transports in our V2Ray guide.
Public "anonymous proxy lists" are unknown boxes with shared, often burned IPs. A VPS gives you one dedicated IP, logs you control and no neighbours. Three daemons cover almost every need:
| Squid | 3proxy | Dante | |
|---|---|---|---|
| Protocols | HTTP/HTTPS (CONNECT) | HTTP + SOCKS4/5 (+ FTP, POP3, port mapping) | SOCKS5 (and SOCKS4) |
| Authentication | Basic auth via basic_ncsa_auth + htpasswd file | users list or file, auth strong | System accounts, socksmethod: username |
| Header control | forwarded_for delete, via off | proxy -a | Not applicable (SOCKS) |
| Bind to a chosen IP | http_port IP:3128 + tcp_outgoing_address | -i / -e per service | internal / external |
| Install on Debian/Ubuntu | apt install squid | Build from source | apt install dante-server |
Squid: an HTTP proxy with password auth and forwarding headers off
Squid is the mature choice when you only need HTTP and HTTPS. Paths are those of the Debian and Ubuntu package.
1. Install Squid and create the password file
sudo apt update
sudo apt install -y squid apache2-utils
sudo htpasswd -c /etc/squid/passwd alice
sudo chown root:proxy /etc/squid/passwd
sudo chmod 640 /etc/squid/passwdhtpasswd comes from apache2-utils; drop -c for further users. Squid runs as proxy on Debian, hence the group.
2. Replace squid.conf with a minimal one
The stock /etc/squid/squid.conf is thousands of commented lines and only allows localhost. Keep it as reference and write a short one:
sudo mv /etc/squid/squid.conf /etc/squid/squid.conf.orig
sudo nano /etc/squid/squid.confhttp_port 3128
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm proxy
auth_param basic credentialsttl 2 hours
acl authenticated proxy_auth REQUIRED
acl SSL_ports port 443
acl Safe_ports port 80 443
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow authenticated
http_access deny all
forwarded_for delete
via off
cache deny all
access_log /var/log/squid/access.log squidThree lines carry the anonymity. forwarded_for delete removes X-Forwarded-For entirely (the default on writes your client IP into it; off merely replaces it with unknown). via off stops Squid announcing itself. cache deny all keeps no page on disk. Safe_ports keeps SMTP and arbitrary ports unreachable. On a multi-IP server, http_port 203.0.113.10:3128 plus tcp_outgoing_address 203.0.113.10 pins one address.
3. Check the syntax and start
sudo squid -k parse
sudo systemctl restart squid
sudo systemctl enable squidSquid is HTTP-only; for SOCKS5 use 3proxy or Dante.
3proxy: HTTP and SOCKS5 from one config, with per-IP binding
3proxy serves HTTP and SOCKS on one user list, binds each service to a chosen address and speaks IPv6. It is not packaged in Debian or Ubuntu, so build it from upstream.
1. Build and install
sudo apt install -y build-essential git
git clone https://github.com/3proxy/3proxy.git
cd 3proxy
ln -s Makefile.Linux Makefile
make
sudo make installThe current Makefile.Linux installs a 3proxy.service unit running 3proxy /etc/3proxy/3proxy.cfg as the proxy user (present on Debian and Ubuntu); that file chroots into /usr/local/3proxy and includes a default config with a web admin on port 8080. For a single-purpose proxy, replace /etc/3proxy/3proxy.cfg with one flat file:
2. Users, ACLs, addresses
nscache 65536
nserver 1.1.1.1
nserver 9.9.9.9
log @3proxy
maxconn 500
auth strong
users alice:CL:S3cretPass bob:CL:0therPass
allow alice
proxy -p3128 -a -i203.0.113.10 -e203.0.113.10
socks -p1080 -i203.0.113.10 -e203.0.113.10
flush
allow bob
proxy -p3128 -a -i203.0.113.11 -e203.0.113.11
socks -p1080 -i203.0.113.11 -e203.0.113.11auth strong demands a username and password on both HTTP and SOCKS5. -a puts the HTTP service in anonymous mode: nothing about the client is reported. -i is the listening address, -e the source address for outgoing connections, so on a multi-IP server each user gets their own exit; flush empties the access list so the next allow starts a fresh ACL. Rules read allow <users> <source> <target> <ports>, so deny * * * 25 above an allow blocks SMTP. For IPv6 exits, give -e an IPv6 address and add -6 (IPv6 only) or -64 (prefer IPv6).
3. Start it
sudo systemctl enable --now 3proxy
systemctl status 3proxy
sudo journalctl -t 3proxy -n 20Dante: a dedicated SOCKS5 server
For SOCKS5 only from a packaged daemon, install dante-server. It authenticates against system accounts, which is why the privileged user must be root with the username method.
sudo apt install -y dante-server
sudo useradd -r -s /usr/sbin/nologin socksuser
sudo passwd socksuserReplace /etc/danted.conf with:
logoutput: syslog
internal: 203.0.113.10 port = 1080
external: 203.0.113.10
socksmethod: username
clientmethod: none
user.privileged: root
user.unprivileged: nobody
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
socks block {
from: 0.0.0.0/0 to: 0.0.0.0/0 port = 25
log: connect error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: connect
log: connect disconnect error
}sudo systemctl restart danted
sudo systemctl enable dantedinternal and external accept an IP or an interface name; the address avoids guessing between eth0 and ens3. Rules match in order, first hit wins, so the SMTP block sits before the pass. Dante 1.4 uses socksmethod; 1.3 configs used method.
Firewall it, then test with curl
Password auth is one layer; a firewall rule limited to your own addresses is the second, and the one that keeps the port out of scanner results.
sudo ufw allow OpenSSH
sudo ufw allow from 198.51.100.7 to any port 3128 proto tcp
sudo ufw allow from 198.51.100.7 to any port 1080 proto tcp
sudo ufw enable
sudo ss -tlnp | grep -E ':3128|:1080'If your home IP changes, allow your ISP's range or rely on auth alone, but never expose an admin port. The ss line confirms each daemon is bound where you expect; our guide on checking open ports on Linux covers the other views. Then, from your own machine, not from the VPS:
curl -x http://alice:S3cretPass@203.0.113.10:3128 https://ifconfig.me
curl -x socks5h://alice:S3cretPass@203.0.113.10:1080 https://ifconfig.me
curl -x http://alice:S3cretPass@203.0.113.10:3128 http://httpbin.org/headersThe first two must print the server's IP. The third fetches a plain-HTTP page that echoes request headers: with the configs above there is no Via and no X-Forwarded-For. Prefer socks5h:// to socks5://: the h makes the proxy resolve hostnames, so DNS leaves from the VPS rather than your ISP's resolver. Bad credentials return 407 from Squid or 3proxy and a dropped handshake from Dante; a hang means the firewall.
Using it in browsers, bots and antidetect browsers
Firefox: Settings, Network Settings, Manual proxy configuration; enter the HTTP proxy, or the SOCKS host as SOCKS v5 with Proxy DNS when using SOCKS v5 ticked; FoxyProxy stores credentials per profile. Chrome and Chromium follow the system proxy or --proxy-server="http://203.0.113.10:3128" and support no authentication at all for SOCKS5, so give them the HTTP port, or switch 3proxy to auth iponly (Squid: a src ACL) and allow your address instead of a password. Also disable WebRTC (media.peerconnection.enabled in Firefox), which can leak your real address.
Bots and scrapers: Python requests takes proxies={"https": "http://alice:S3cretPass@203.0.113.10:3128"}; SOCKS needs pip install "requests[socks]" and a socks5h:// URL. Playwright takes proxy={"server": "http://203.0.113.10:3128", "username": "alice", "password": "S3cretPass"} at launch and, driving Chromium, again wants the HTTP port for credentials.
Antidetect browsers (Multilogin, GoLogin, AdsPower, Dolphin Anty) take a proxy per profile as host, port, username, password, HTTP or SOCKS5, with a built-in check that shows the exit IP. The usual mistake is a profile timezone and language that contradict the VPS IP's country; the account is flagged however clean the proxy is.
Abuse, legal notes and why the IP's history matters
An open proxy, no auth and no source restriction, is found by scanners within hours and used for spam and credential stuffing. The abuse reports reach your provider and the IP lands on blocklists, which is why every config above denies by default. Keep logs long enough to answer an abuse ticket, and keep SMTP blocked. Running a proxy is legal in most jurisdictions; what goes through it is your responsibility under your provider's terms, and scraping against a site's terms is between you and that site, proxy or not.
Reputation is the part no config file fixes. A datacenter IP is recognised by its ASN, and one previously used for abuse arrives pre-flagged: Google shows a captcha on the first search, Cloudflare challenges every page. Before building on an IP, check it on Spamhaus and AbuseIPDB and open a few sites through it. A dedicated IP nobody else shares means the reputation from that day on is yours alone.
Know when this is the wrong product. A VPS proxy is one static datacenter IP. Residential and rotating proxies are consumer ISP addresses rented per gigabyte and changed per request; they exist for targets that reject datacenter ranges outright, such as sneaker drops or some social platforms, and no Squid tuning makes a datacenter IP look residential. For API access, trading and Discord bots, moderate-rate scraping or accounts that need one stable address, the VPS is cheaper, quicker and entirely yours.
That is the role of a Bot VPS with a dedicated IPv4 from rdp.monster: full root or admin access, dedicated CPU and RAM, unlimited (fair-use) bandwidth, no KYC, payment in crypto or fiat, from $8.99 per month, and the server is online about 10 seconds after payment confirms, roughly the time it takes to paste the Squid config above.
Frequently Asked Questions
Is a VPS proxy really anonymous?
HTTP proxy or SOCKS5: which one should I run?
socks5h the proxy also resolves DNS. HTTP proxies understand only web traffic but support password authentication in every browser and in Chromium, which refuses to authenticate to SOCKS5. 3proxy serves both from the same user list, so the practical answer is to run both ports and pick per client: HTTP for browsers and Playwright, SOCKS5 for bots, game clients and Telegram.Can I use a VPS proxy for scraping without getting blocked?
How many users and connections can one small VPS proxy handle?
maxconn (100 by default) and Squid with the workers and file-descriptor limits in its config. Watch ss -s and the daemon's log under load, raise LimitNOFILE in the systemd unit if you see too-many-open-files errors, and keep the number of concurrent scrapers proportional to what the target site tolerates.Adrien Roche, Infrastructure & Hosting Editor
Systems engineer with 10+ years operating Windows Server and Linux fleets. Adrien runs the rdp.monster infrastructure documentation and writes our guides on RDP, VPS hosting, server administration, networking and privacy tooling.




