Network security

How to Set Up a Proxy Server on Windows, Mac & Linux (2026 Guide)

A proxy sits between your devices and the internet. Here is how to configure one on every major platform, and how to run your own safely.

Cysoro Security TeamPublished · 8 min read
NETWORK SECURITY Set Up a Proxy Server Windows, Mac, Linux — and Squid YOUPROXYport 3128SquidWEBcurl --proxy 192.168.1.10:3128 cysoro.com
Quick answer

To set up a proxy server, decide whether to use an existing proxy or run your own. To use one, enter its address and port in Windows Settings, macOS Network settings, or Linux proxy settings. To run your own, install Squid on Linux, restrict access to your own network in squid.conf, start the service, and test it with curl. Always require authentication and never leave a proxy open to the internet.

Key takeaways

  • Using a proxy is a client setting; running one means installing software such as Squid and locking it to your own network.
  • An open proxy with no authentication will be found and abused within hours — restrict it before you start the service.
  • A proxy is not a VPN: it does not encrypt all traffic, so use HTTPS and a VPN where privacy matters.

A proxy server sits between your device and the internet, forwarding your requests and returning the answers. Companies use proxies to filter content and control access; individuals use them to route traffic through another server. Setting one up is straightforward — the part people get wrong is leaving it open.

What is a proxy server?

A proxy server is a middleman for network traffic. Your device sends a request to the proxy, the proxy forwards it to the website or service, and the reply comes back through the proxy. The destination sees the proxy's address, not yours.

There are two different jobs here, and this guide covers both. Using a proxy means pointing your computer or browser at a proxy someone else runs. Running a proxy means installing software such as Squid on your own server so your devices can use it.

A proxy is not the same as a VPN. A VPN encrypts all traffic from your device; a proxy usually forwards traffic for specific apps, and HTTP proxy traffic itself is not encrypted unless the underlying connection uses HTTPS. Keep that distinction in mind before trusting a proxy with sensitive logins.

What types of proxy server are there?

The main types are forward proxies, reverse proxies, HTTP proxies, and SOCKS5 proxies. A forward proxy serves clients going out to the internet; a reverse proxy sits in front of a web server and serves incoming visitors.

TypeWhat it doesTypical useDefault port
HTTP proxyForwards web trafficBrowsing, content filtering8080 or 3128
HTTPS proxyForwards encrypted web trafficSecure browsing via proxy8080 or 3128
SOCKS5 proxyForwards any TCP trafficApps, file transfer, tunnels1080
Transparent proxyIntercepts traffic without client setupSchool and office filteringVaries
Reverse proxySits in front of a web serverLoad balancing, caching80 or 443

For most readers, the choice is simple: HTTP for web browsing, SOCKS5 when an app needs non-web traffic proxied, and Squid when you want to run the server yourself.

How a proxy server worksYour devicebrowser or appsends a requestProxy serverforwards therequestWebsitesees the proxyaddress, not yoursThe reply travels back the same way: website to proxy to your device.
A proxy forwards requests and replies; the destination sees the proxy, not your device. Illustration by Cysoro.

What do you need before you start?

Before touching any settings, gather four things: the proxy address (an IP or hostname), the port, the protocol (HTTP, HTTPS, or SOCKS5), and the username and password if authentication is required. Without these, every setup screen will stall.

Also decide the scope. A system-wide proxy affects most apps; a browser-only proxy affects one browser; an app-specific proxy affects one tool such as Git or npm. System-wide is the usual choice for a work laptop, browser-only is safer for testing.

If you are running your own proxy, you need a machine that stays on — a Linux server, a Raspberry Pi, or a cloud virtual machine — plus a firewall that only allows your own network to connect. Never start a proxy service before you have restricted who can use it.

How do you set up a proxy on Windows 11?

On Windows 11, open Settings, then Network and internet, then Proxy. Under Manual proxy setup, turn on Use a proxy server, enter the proxy address and port, and save. That covers most browsers and apps that respect system settings.

  1. Open Settings > Network & internet > Proxy.
  2. Under Automatic proxy setup, you can turn on automatic detection or enter a setup script URL if your organization gave you one.
  3. Under Manual proxy setup, select Set up, turn on Use a proxy server, and enter the address and port.
  4. Add exceptions for local addresses if you do not want internal sites to go through the proxy.
  5. Save, then open a browser and check that pages load. If a login prompt appears, enter the proxy username and password.

Services and scheduled tasks use a different store, WinHTTP, not the user settings above. From an elevated command prompt, run netsh winhttp set proxy proxy-server="http=proxy.example.com:8080;https=proxy.example.com:8080" bypass-list="localhost;127.0.0.1" to set it, and netsh winhttp show proxy to verify. Use your real proxy address in place of the example.

To verify your visible address has changed, check it with our free IP checker before and after enabling the proxy.

How do you set up a proxy on a Mac?

On macOS, proxy settings belong to a network service, not to the whole machine. Open System Settings, then Network, select Wi-Fi or Ethernet, click Details, then Proxies, and enable the proxy type you need.

  1. Open System Settings > Network and select the service you actually use, such as Wi-Fi.
  2. Click Details, then Proxies.
  3. Enable Web Proxy (HTTP), Secure Web Proxy (HTTPS), or SOCKS Proxy, and enter the server and port.
  4. If authentication is required, enter the username and password when prompted.
  5. Click OK, then Apply, and test in a browser.

From the terminal, the same settings can be scripted with networksetup. Run networksetup -listallnetworkservices to see service names, then networksetup -setwebproxy "Wi-Fi" proxy.example.com 8080 with your real address and port. Remember that switching from Wi-Fi to Ethernet changes the active service, and the proxy may not follow.

How do you set up a proxy on Linux?

On Linux, use the desktop settings for browsers and graphical apps, and environment variables for the terminal. In GNOME, open Settings, then Network, then Network Proxy, select Manual, and enter the HTTP, HTTPS, and SOCKS details.

For the terminal, add the variables to your shell profile, for example ~/.bashrc:

export http_proxy="http://username:[email protected]:8080"
export https_proxy="http://username:[email protected]:8080"
export no_proxy="localhost,127.0.0.1"

Then run source ~/.bashrc and test with curl -x http://proxy.example.com:8080 https://example.com, using your real proxy address. Note that not every app reads these variables — Git, npm, and Docker each have their own proxy settings, so check the tool you are actually using.

How do you set up a proxy in a browser?

Firefox has its own proxy settings, which is useful when you want only the browser to use a proxy. Open Settings, then General, scroll to Network Settings, click Settings, choose Manual proxy configuration, and enter the HTTP proxy, port, and SOCKS host if needed.

Chrome and Edge use the system proxy settings on Windows and macOS, so changing the system proxy changes those browsers too. That is convenient, but it means a browser-only test is harder in Chrome — use Firefox, or a separate Chrome profile with a proxy extension, when you want to isolate the test.

How do you build your own proxy server with Squid?

Squid is free, open-source proxy software and the standard choice for running your own proxy on Linux, as described in NordVPN's setup guide and Squid's official documentation. Install it, restrict access before starting it, then test from a client on your own network.

  1. Install Squid. On Debian or Ubuntu, run sudo apt update && sudo apt install squid. On macOS, run brew install squid.
  2. Back up the config. Run sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.backup so you can recover from a mistake.
  3. Restrict access. Open /etc/squid/squid.conf and add a rule for your own subnet only, above the http_access deny all line: acl localnet src 192.168.1.0/24 and http_access allow localnet, replacing the subnet with your own.
  4. Check the config. Run sudo squid -k parse and fix any errors it reports.
  5. Start the service. Run sudo systemctl enable --now squid, then sudo systemctl status squid to confirm it is running.
  6. Test from a client. From a machine on your network, run curl --proxy http://your-server-ip:3128 https://example.com. Squid listens on port 3128 by default.
Lock it down firstAn open proxy with no authentication will be found by internet scanners and abused for spam and fraud. Restrict Squid to your own subnet, add authentication, and block the proxy port at your firewall for everyone else before you start the service.

For authentication, Squid supports basic auth with a password file. That is the minimum for any proxy reachable beyond your own LAN. Keep Squid updated, review its access logs regularly, and rotate credentials if anyone who had access leaves.

How do you set up a SOCKS5 proxy?

A SOCKS5 proxy handles more than web traffic, including non-HTTP apps. The quickest SOCKS5 proxy is an SSH tunnel: run ssh -D 1080 user@server, which opens a local SOCKS5 listener on port 1080 and tunnels traffic through the remote server. It works on macOS and Linux natively, and on Windows 11 through the built-in OpenSSH client.

For a shared SOCKS5 proxy that several people can use, install Dante on Linux with sudo apt install dante-server, edit /etc/danted.conf to define the listening interface and access rules, then start it with sudo systemctl start danted. As with Squid, restrict access and require authentication before opening it to anyone.

How do you test and troubleshoot a proxy?

Test in layers: first the proxy itself, then the client, then the app. If curl through the proxy works but the browser does not, the problem is the browser's settings, not the proxy.

  • Check the service: sudo systemctl status squid on the server, and sudo squid -k parse for config errors.
  • Test with curl: curl -v --proxy http://proxy.example.com:3128 https://example.com shows whether the connection and any authentication succeed.
  • Check the firewall: confirm the proxy port is open to your client and closed to everyone else.
  • Check the logs: Squid logs show denied requests and the reason, which usually names the misconfigured rule.
  • Check DNS leaks: run our DNS lookup tool to see what your browser actually exposes while the proxy is on.
  • Check WebRTC leaks: run our WebRTC leak test to see whether your real IP address leaks through the browser.
Proxy not working? Check in this order1. Is the service running? systemctl status squid2. Is the config valid? squid -k parse3. Is the firewall letting your client through — and no one else?4. Is authentication correct? Test with curl -v --proxy5. Does the app read proxy settings at all? Some apps ignore them.
Work through the layers: server, config, firewall, authentication, then the app. Illustration by Cysoro.

What are the common mistakes when setting up a proxy?

The most common mistakes are leaving a proxy open to the internet, trusting a free public proxy with logins, assuming a proxy encrypts traffic like a VPN, and configuring only one layer — system settings but not the terminal, or the browser but not the app that actually needs it.

Other frequent errors: using the wrong port, forgetting that macOS proxy settings follow the network service, and pointing a proxy at an internal address that should bypass it. Add localhost and your internal domains to the bypass or no_proxy list so local services keep working.

If you are securing a home or small-office network, pair the proxy with the basics in our guide to securing your Wi-Fi, and keep a checklist of the controls that matter for a small business.

The bottom line

Setting up a proxy is a small job: enter an address and port on the client, or install Squid and lock it to your own network on the server. The security work is the part that matters — authentication, firewall rules, and updates.

Start with a client setup on one device, test it with curl and a browser, and only run your own server once you can restrict it properly. Check what your connection actually reveals with our free IP checker.

Frequently asked questions

What do I need to set up a proxy server?

You need the proxy address, port, protocol, and login details if authentication is required. To run your own, you also need a computer or server that stays on, Squid or similar proxy software, and a firewall rule that limits who can connect.

What is the difference between a proxy and a VPN?

A proxy forwards traffic for specific apps or browsers, usually without encrypting it. A VPN encrypts all traffic from your device and routes it through a tunnel. A VPN protects more traffic; a proxy is lighter and easier to apply to one app.

Is it safe to set up my own proxy server?

Yes, if you restrict access to your own network, require authentication, keep the software updated, and never expose it to the internet without a password. An open proxy is quickly found by scanners and used for spam, fraud, and attacks traced back to your IP address.

What port does a proxy server use?

There is no single standard port. Squid uses port 3128 by default, HTTP proxies often use 8080, and SOCKS5 proxies often use 1080. Your proxy provider or your own configuration decides the port — always use the one given for your setup.

Can I set up a proxy server for free?

Yes. Squid is free and open source, and you can run it on a Linux computer or a cheap cloud server. The server itself still costs money to run, and a free public proxy found online is not a safe substitute — it can log or alter your traffic.

Why is my proxy not working?

The most common causes are a wrong address or port, a proxy that requires a login you did not enter, a firewall blocking the port, or an app that ignores system proxy settings. Test with curl using the --proxy option, check the proxy logs, and confirm the service is actually running.

Do I need a proxy server at home?

Most homes do not. A proxy is useful for content filtering, caching, controlling which sites a network can reach, or routing traffic through a specific server. For general privacy at home, a VPN and encrypted DNS usually help more.

What is a SOCKS5 proxy?

SOCKS5 is a proxy protocol that handles any kind of traffic, not just web traffic. An SSH tunnel with ssh -D 1080 creates a simple SOCKS5 proxy, and Dante is a common dedicated SOCKS5 server for Linux.

Sources

  1. NordVPN — How to set up a proxy server
  2. EnigmaProxy — Configure Proxies on Windows, macOS and Linux
  3. eProxies — Step-by-Step Guide to Set Up a Proxy Server in 2026
  4. Squid — Squid Cache documentation
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the NordVPN and eProxies setup guides and Squid's official documentation.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free