Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › 3proxy

How to Set Up Your Own Proxy Server on a Linux VPS

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safe way to run a private proxy on a Linux VPS is to choose one proxy daemon, bind it to an intentional address and port, restrict clients with IP rules or authentication, close every unrelated inbound port, and test from both an allowed and a denied network. Squid is usually the best fit for an HTTP forward proxy with filtering; 3proxy is a compact choice when you need HTTP and SOCKS from one service; Dante is designed around SOCKS4/SOCKS5, including UDP use cases.

This guide takes you from a new Ubuntu VPS to a verified, monitored proxy. The commands that are stable across installations are shown directly; service names, firewall syntax, package availability, and configuration paths can differ on other Linux distributions.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a VPS proxy does

A forward proxy accepts a connection from an approved client, makes the outbound connection itself, and returns the response. The VPS contributes a stable Internet-routable address. The proxy daemon supplies HTTP or SOCKS behavior. Access-control lists, authentication, and the VPS firewall decide who can reach and use it.

This is different from a reverse proxy, which publishes your own web application to the Internet. A forward proxy is an outbound relay for clients, so an unrestricted listener can quickly become an open proxy used by strangers. The design goal is not merely to make a port answer; it is to make every request pass an intentional authorization check.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Choose the daemon before opening a port

Daemon Protocol and typical use Control features Best fit Important caution
Squid HTTP forward proxy; filtering and caching Client-network ACLs, ordered allow/deny rules, logging, optional authentication Web traffic where HTTP policy or caching matters The stock configuration is a starting point, not a safe public policy. Set an explicit listener and deny unapproved clients.
3proxy HTTP and SOCKS services from one compact daemon Rules can match client, destination, port, and time; auth iponly supports address-based authorization and auth strong supports username/password authentication; TLS and mutual TLS are documented A small multi-protocol installation with detailed ACLs The project warns that omitting an internal interface makes the proxy an open proxy. Define both internal and external addresses deliberately.
Dante SOCKS4/SOCKS5, including UDP-oriented cases Separate client and SOCKS rule stages, route rules, logging, and username, PAM, or no-auth methods Applications that specifically require SOCKS semantics Use explicit rules. Dante documentation warns that some compatibility settings can introduce security issues.

Pick one daemon for the first deployment. Running several listeners before you have a clear firewall and ACL plan makes it easier to expose an unused port. You can add a second protocol later after the first service is logged, tested, and restricted.

Prepare the VPS and an administration path

Record the network facts

Write down the VPS public IPv4 address and, if you will use it, the public IPv6 address. Identify the addresses or networks from which clients will connect. A fixed office address is easiest to restrict. If clients roam between networks, plan for strong credentials or certificate-based access instead of widening an IP allow-list to the whole Internet.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the provider’s current acceptable-use policy before deployment. Forward proxies can generate abuse complaints and high bandwidth bills, and policies differ by provider and plan. Confirm that the VPS has the public-address family, bandwidth allowance, and abuse-contact process your use requires.

Create a non-root administrator

Use the provider console for the first login if necessary, create a named administrator, and install an SSH public key. Keep root login for emergency console recovery rather than routine administration. Apply operating-system updates before installing the proxy. Ubuntu groups firewall, AppArmor, authentication, and account-management guidance with its server hardening material; use those controls rather than treating the proxy as the only security boundary.

Decide the exposure before changing the firewall

  • SSH should be reachable only from your administration address or management network.
  • The proxy port should be reachable only from approved client addresses, unless authentication is deliberately replacing source-IP restriction.
  • All unrelated inbound traffic should remain denied.
  • Cloud security-group rules and the VPS host firewall must express the same policy; opening one while forgetting the other produces confusing failures.

Install one proxy service

Squid on Ubuntu

Ubuntu’s documented package installation is:

sudo apt update
sudo apt install squid

Before editing, preserve the shipped configuration:

sudo cp -p /etc/squid/squid.conf /etc/squid/squid.conf.orig

Package names and paths can differ on another distribution. Keep the configuration root-owned and readable only as broadly as the daemon requires.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3proxy or Dante

Install a distribution package when one is maintained for your release, or follow the project’s release and build instructions. Put the resulting configuration in a root-owned directory, record which account runs the daemon, and verify that password or certificate files cannot be read by ordinary users. Do not assume that a service is safe because it starts successfully: the listener and authorization rules still need to be inspected.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Bind an intentional listener

Squid’s port choice

Squid’s documented default TCP port is 3128. Canonical’s example changes the listener to http_port 8888. The number is an example, not a security control; an obscure port does not protect an unauthenticated service.

Add an explicit listener to the active configuration, for example:

http_port 8888

Whether Squid binds all addresses or one address depends on the directive and package defaults. If the VPS has multiple interfaces or address families, bind only where clients are expected, then enforce the same choice in the firewall.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3proxy’s internal and external addresses

3proxy uses an internal address for the client-facing side and an external address for outbound connections. The project’s documentation specifically warns: “If no internal interface is specified, your proxy will act as an open proxy.” Treat these directives as mandatory design decisions, not optional tuning. A representative layout using documentation-only addresses is:

internal 192.0.2.10
external 198.51.100.42

Replace those example addresses with the actual interfaces on your VPS. Do not use a wildcard internal address merely to avoid determining which interface should accept clients.

Dante’s internal and external settings

Dante separates server settings from client rules, SOCKS rules, and routes. Set the internal listener and the external egress interface explicitly in its configuration, then write rules for the permitted source networks and destinations. A service that listens on every interface but has no matching client rule should fail closed; verify that behavior from an unapproved network.

Write authorization rules before allowing traffic

Squid: allow a known client network, then deny everything else

Squid evaluates access rules in order. A minimal policy pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
acl my_clients src 198.51.100.24/32
http_access allow my_clients
http_access deny all

The address above is from a documentation-only network; replace it with the real client address or subnet. Put specific allows before the final deny. If you add authentication, keep the deny-all rule after the authenticated allow and protect the helper’s credential database. A source-IP rule is preferable when addresses are stable because it avoids distributing reusable passwords.

3proxy: choose IP-only or strong authentication

Use auth iponly when your ACL is based on known client addresses. Use auth strong when clients need username/password credentials, and protect the file that stores user records. 3proxy rules can constrain the client, destination, port, and time; use that granularity to prevent an account intended for web browsing from reaching unrelated services.

A conceptual sequence is to select the authentication method, define users or allowed source addresses, add explicit allow rules, and finish with a deny rule. Configure HTTP and SOCKS listeners only for protocols you actually need. If you enable TLS-protected proxy connections or mutual TLS, provision certificates whose Subject Alternative Names match the proxy hostname or address, as required by the project’s documentation.

Dante: keep client and SOCKS stages explicit

Dante has separate rule stages. A client rule controls who may establish a connection to the server; a SOCKS rule controls what an authenticated client may request through it. Configure both. Set clientmethod and socksmethod to the authentication methods you intend to support, and use the documented username or PAM methods when credentials are required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not enable compatibility options simply because an old client requests them. Dante’s reference warns that some such settings can have security consequences. If UDP is required, permit it in a narrowly scoped SOCKS rule and test it separately from ordinary TCP CONNECT traffic.

Lock the VPS firewall

Use the firewall system supported by your distribution. The following UFW example illustrates the policy; substitute the real administration and client addresses, and substitute the port selected for your daemon:

sudo ufw default deny incoming
sudo ufw allow from 198.51.100.24 to any port 22 proto tcp
sudo ufw allow from 198.51.100.24 to any port 8888 proto tcp
sudo ufw enable
sudo ufw status verbose

If your clients use a different address, protocol, or SOCKS port, add only that narrowly scoped rule. Do not add a blanket rule such as allowing the proxy port from any source unless you have a compelling, documented reason and strong authentication. Apply equivalent restrictions in the provider’s security group. Remember that an allow-list containing an old office address can look like a broken service after your network changes; update it deliberately rather than opening the port globally.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Start, enable, and inspect the daemon

Service names vary. On a systemd-based Ubuntu installation, the pattern is:

sudo systemctl enable --now squid
sudo systemctl status squid --no-pager
sudo ss -ltnp | grep 8888

Use the corresponding unit name for 3proxy or Dante. The socket inspection must show the intended address and port, not an unexpected wildcard listener. If the service refuses to start, validate the configuration with the daemon’s own check mode where available, then inspect the journal:

sudo journalctl -u squid -b --no-pager

Replace squid with the relevant unit. 3proxy supports configurable logfile or syslog output, and Dante documents logging destinations and rule processing. Choose a destination with enough retention to investigate failed logins and abuse, but monitor disk growth and rotate logs.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test success, rejection, and the actual egress

Test from an allowed client

For an HTTP proxy, test through the listener with a client that supports proxy settings. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -x http://198.51.100.42:8888 https://example.com

If authentication is enabled, supply credentials using the client’s supported mechanism rather than placing a reusable password in a shared script. For a SOCKS5 service, a typical test shape is:

curl --socks5-hostname 198.51.100.42:1080 https://example.com

Use the actual VPS address and port. A successful response proves that the request traversed the proxy; it does not prove that the policy is narrow enough. Check the destination’s observed source address or another controlled endpoint to confirm that the VPS is the egress point, and check the daemon log for the request.

Test every denial path

  1. Attempt a connection from a source address not in the allow-list. The TCP connection should be blocked by the firewall or rejected by the daemon.
  2. From an allowed address, try invalid credentials. The proxy must reject the request rather than silently falling back to no authentication.
  3. Try a destination or port outside the permitted policy. An ACL denial should be logged without creating an outbound connection.
  4. From an external scanner or a second network you control, verify that only SSH and the chosen proxy listener are reachable.

Run these checks after every firewall, ACL, address, or authentication change. A successful test from your office alone can hide an open listener on IPv6 or a second interface.

Use each proxy for the job it handles best

When Squid is the practical choice

Choose Squid when clients speak HTTP and you need URL or destination policy, request logging, or caching. Its role is described by Canonical as a filtering and caching mechanism that can optimize bandwidth and performance. Caching behavior is not a promise of a particular speed improvement; it depends on traffic and cacheability. Start with a restricted client ACL, make the listener explicit, and add authentication only when IP restriction is insufficient.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When 3proxy is preferable

Choose 3proxy when a compact service must offer both HTTP and SOCKS or when ACLs need to include destination, port, and time. Its authentication choices let you keep a fixed-address policy or move to credentials as clients change networks. TLS and mutual TLS can protect the proxy connection itself, but certificate issuance, renewal, hostname validation, and private-key protection become operational responsibilities.

When Dante is preferable

Choose Dante when the application requires SOCKS4/SOCKS5 semantics, especially where UDP behavior matters. Its split client/SOCKS rule model is powerful but means that a permissive rule in one stage can undermine an otherwise narrow policy. Keep logging enabled, specify routes intentionally, and avoid risky compatibility settings.

Common failure modes and fixes

The client cannot connect at all

  • Confirm that the daemon is running and that ss shows the expected listener.
  • Check both the provider security group and the host firewall for the client source address and port.
  • Verify that the daemon is bound to the address family the client uses. A service listening only on IPv4 will not answer an IPv6 connection.
  • Check that the client is using HTTP proxy syntax for Squid or 3proxy’s HTTP listener, and SOCKS syntax for Dante or a SOCKS listener.

The daemon starts but denies an approved client

Compare the client’s observed source address with the ACL. NAT, a changed office address, or an IPv6 path can make the address different from the one you entered. In Squid, check rule order: an earlier deny wins before a later allow can be reached. In Dante, inspect both the client rule and the SOCKS rule. In 3proxy, confirm that the selected authentication mode matches the rule and that the user record is readable by the daemon.

Authentication appears to be ignored

Look for an unintended no-auth method, a rule that allows the source before authentication is evaluated, or a second listener with a different policy. Test with deliberately invalid credentials and inspect the log. Remove unused listeners rather than relying on clients to choose the secure one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Requests fail only for some destinations

Review destination and port ACLs, DNS behavior, and whether the requested protocol is supported by the selected proxy. A SOCKS rule permitting TCP CONNECT does not automatically permit UDP. A filtering policy may intentionally reject a destination even though the proxy itself is healthy.

The VPS is generating abuse complaints or unexpected traffic

Immediately restrict the listener to known source addresses or disable it, preserve relevant logs, rotate credentials, and inspect for unauthorized accounts or configuration changes. Check bandwidth and connection counts. Do not respond by moving the service to another obscure port; remove the exposure and determine how access was obtained.

Operate the proxy as a service, not a one-time installation

  • Apply operating-system and proxy updates on a schedule and reboot when required.
  • Review ACLs whenever a client, office address, destination, or protocol changes.
  • Rotate passwords and revoke certificates or user records that are no longer needed.
  • Alert on repeated authentication failures, unusual connection counts, bandwidth spikes, and log-disk growth.
  • Keep backups of working configuration files, but protect them because they may contain credentials or private keys.
  • Recheck listening sockets after package upgrades; a new default or additional service must not widen exposure.
  • Keep an incident path: know how to disable the service through the provider console if SSH or the proxy is abused.

Final security checklist

  • A supported Linux release is updated, and administration uses a named non-root account with SSH keys.
  • Exactly one intended daemon and listener are enabled.
  • The listener address and port are documented; Squid’s 3128 default was changed only if there was a reason, such as the 8888 example.
  • Known client networks or strong authentication are required.
  • Specific allows precede a final deny rule in the daemon’s ACLs.
  • The provider security group and host firewall allow SSH and proxy traffic only from intended sources.
  • Logs record accepted and rejected attempts, and log rotation is working.
  • An allowed-client test succeeds, an invalid-credential test fails, an unlisted-source test fails, and only intended ports are externally visible.

A private proxy is complete only after the denial tests pass. The stable pattern is simple: explicit listener, explicit authorization, default-deny firewall, observable logs, and recurring maintenance.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3proxyDanteLinux VPSproxy serverServer SecuritySquidUbuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.