How to set up a proxy server

Whether you’re trying to access content that’s restricted in your region, filter the websites your household can access, or simply route your internet traffic through a different IP address, learning how to set up a proxy server is easier than it sounds. Depending on your preferences, you can either do it from scratch or configure a device or app to connect to a proxy server that already exists. 

This guide covers both: how to set up your own proxy server at home using free software, and how to connect devices using Windows, Mac, Android, Linux, and Telegram to a proxy that’s already running.

July 28, 2026

12 min read

How to set up a proxy server

What is a proxy server?

A proxy server is a computer or system that acts as an intermediary between your device and the internet. The proxy server intercepts your requests, forwards them to the destination website, and then sends the response back to you. 

Proxy servers come in a few types. Reverse proxy servers sit in front of a server to distribute incoming traffic, while transparent proxy servers operate covertly. In this guide, we’ll focus on forward proxy servers, which sit in front of the client (such as an app or web browser). 

A proxy server is not the same as a VPN. A standard proxy doesn’t encrypt your traffic by default and doesn’t make you anonymous, whereas a VPN does both as standard. If you’re unsure which of these two tools is best for your needs, our VPN vs. proxy comparison explains how a VPN works and where the two technologies differ.

How to set up your own proxy server at home

If you prefer more control and privacy with less reliance on a third-party provider, you can learn how to set up a proxy server at home using free, open-source software. Setting up your own proxy gives you full control over what gets logged, who can connect, and which sites are filtered. Creating your own proxy server is fundamentally different from configuring a device to connect to a proxy that already exists, which we cover later in this guide. Self-hosting is the better option if you want privacy without a third-party provider or want to filter content across your whole home network.

Setting up Squid proxy on Linux or Mac

Squid is free, open-source, and one of the most popular proxy server tools available. It allows you to control how it handles incoming and outgoing web traffic. Keep in mind that Squid only handles HTTP and HTTPS traffic. If you need to route other traffic types, see the SOCKS5 section below instead.

Here’s how to set up a proxy server on Linux or Mac using Squid:

  1. 1.Install Squid. Run the following commands to pull the latest version of Squid from Homebrew’s repositories.On Ubuntu or Debian, enter the following command in the terminal:
    sudo apt install squid 
    On macOS, enter:
    brew install squid
  2. 2.Initialize the cache directories. To set up the directories Squid needs to run, enter the following commands. On Linux, enter:
    squid -z
    On macOS, enter:
    squid -z -f /opt/homebrew/etc/squid.conf
  3. 3.Start the Squid service. The following commands make Squid restart automatically on startup without manual intervention.On Linux, enter:
    sudo systemctl start squid
    On macOS, enter:
    brew services start squid
  4. 4.Edit the configuration file. The following commands permit devices on your local subnet to connect to Squid but deny everyone else.On Linux, open “squid.conf” located at /etc/squid/squid.conf On macOS, open “squid.conf” located at /opt/homebrew/etc/squid.conf Find “http_access deny all” and above this line enter:
    acl localnet src 192.168.1.0/24 http_access allow localnet
  5. 5.Restart Squid and verify. Restart the Squid proxy server using the following commands:On Linux, enter:
    sudo systemctl restart squid
    On macOS, enter:
    brew services restart squid
    To verify traffic is running through Squid correctly, monitor the access log by running tail -f on the log file.

Once Squid is running, point your devices to it. Our guide to running a home server covers this step in detail.

How to set up a SOCKS5 proxy server

A SOCKS5 proxy handles a wider range of traffic than Squid, including non-HTTP traffic like FTP and peer-to-peer connections. A SOCKS5 proxy works with almost any application, from video streaming to peer-to-peer sharing, making it useful when your needs extend beyond standard web browsing. 

For occasional, single-user use, an SSH tunnel is the simplest route. Running the command: ssh -D 1080 user@server opens a local SOCKS5 listener on port 1080, which tunnels your traffic through the remote SSH host. The SSH tunnel works on macOS and Linux natively and on Windows 11 through the built-in OpenSSH client. This approach suits one-off connections, but keep in mind that the SSH tunnel route is limited to a single user at a time.

If you need a SOCKS5 proxy that multiple users or devices can connect to simultaneously, install Dante instead. On Linux, enter:

sudo apt install dante-server

and then edit /etc/danted.conf to define your listening interface and access rules. Start the service using the command:

sudo systemctl start danted

On macOS, install Dante through Homebrew using the command:

brew install dante

The Homebrew package provides the sockd binary rather than danted, so the configuration file is located at /opt/homebrew/etc/sockd.conf. Edit the config file using the same listening interface and access rules as the Linux version. 

Homebrew doesn’t register Dante as a background service, so you have to start it manually each time you need the proxy active by running the following command in the terminal: 

sockd -f /opt/homebrew/etc/sockd.conf

How to set up a proxy server on Windows 11

The sections above covered how to set up your own proxy server. The following sections explain how to connect your device to a proxy that already exists, whether you’re connecting to a proxy that your workplace has provided or one from a third-party service.

Connect to a proxy server on Windows 11:

  1. 1.Open “Settings” > “Network & internet” > “Proxy.”
  2. 2.Under “Manual proxy setup,” toggle “Use a proxy server” on.
  3. 3.Enter the proxy’s IP address and port number.
  4. 4.Save settings.

The process on Windows 10 follows a similar path: “Settings” > “Network & internet” > “Proxy.” Then apply the same steps as above.

How to set up a proxy server on a Mac

Connecting to a proxy server on a Mac is also configured at the system level, which means the setting applies across whichever browser or app you’re using.

  1. 1.Open “System settings” > “Network.”
  2. 2.Choose your active connection (Wi-Fi or Ethernet) and click “Details.”
  3. 3.Open the “Proxies” tab.
  4. 4.Enable “Web proxy (HTTP)” and, if you also want encrypted sites routed through the proxy, “Secure web proxy (HTTPS).”
  5. 5.Enter the proxy server address and port.
  6. 6.Select “OK” then click “Apply” to save your settings.

How to set up a proxy server on Android

Configuring a proxy on Android is done per Wi-Fi network rather than at the system level, so you’ll need to repeat this process for each network you use or connect to.

  1. 1.Open “Settings” > “Network & internet” (or tap “Wi-Fi”).
  2. 2.Long-press the network you’re connected to and select “Modify network.”
  3. 3.Tap “Advanced options,” then set Proxy to “Manual.”
  4. 4.Enter the proxy hostname and port number.
  5. 5.Tap “Save.”

How to configure a proxy in your browser

Some browsers let you set your proxy directly at the browser level instead of the system level.

The most popular browser, Google Chrome, doesn’t manage proxy settings independently, though. It uses system proxy settings, meaning it follows whatever is configured at the system level. So changing your proxy in Chrome means following the Windows or Mac steps above.

Firefox maintains its own web proxy settings that are separate from the rest of your system.

  1. 1.Go to “Settings” > “General” > “Network settings.”
  2. 2.Beside “Configure how Firefox connects to the internet,” select “Settings.”
  3. 3.Choose “Manual proxy configuration.”
  4. 4.Enter the proxy address and port number.
  5. 5.Click “OK” to save the settings.

Because this browser-level configuration sits apart from your operating system, it overrides your system-wide proxy settings for Firefox specifically, while leaving every other application unaffected. 

If you’d rather skip manual configuration altogether, the NordVPN browser extension offers proxy functionality directly within Chrome and Edge. The NordVPN proxy extension for Firefox brings the same convenience to Firefox users, removing the need to configure network settings by hand.

How to set up a proxy server on Linux

Linux offers more flexibility than other operating systems, letting you apply a proxy system wide or limit it to a specific application. 

For a system-wide setup, export the http_proxy and https_proxy environment variables in your shell profile, typically ~/.bashrc or ~/.profile: 

export http_proxy="http://proxy-address:port"
export https_proxy="http://proxy-address:port" 

Reopen your terminal or run source ~/.bashrc for the change to take effect.

The environment variable method above covers terminal sessions and any command-line tools launched from them, but it doesn’t extend to GUI applications opened independently from your desktop’s app launcher. For those, most Linux desktop environments include their own proxy settings instead. In GNOME, for example, go to “Settings” > “Network” > “Network proxy” and switch to “Manual” to enter the address and port number. This applies to GNOME-integrated GUI applications, though command-line tools still rely on the environment variables set earlier, and apps such as Firefox use their own settings regardless of either method.

If you followed the Squid server setup from earlier in this guide, you can point your Linux machine to Squid’s default port: localhost:3128. This allows you to route your own web traffic through the proxy you built.

How to set up a proxy server in Telegram

Telegram has proxy support built directly into the app, so it doesn’t rely on system or browser-level settings. This built-in proxy support can help maintain connectivity in restrictive network environments where the app might otherwise be blocked.

  1. 1.Open Telegram and go to “Settings” >Data and storage” > “Proxy.”
  2. 2.Tap “Add proxy.”
  3. 3.Choose the proxy type: SOCKS5 or MTProto.
  4. 4.Enter the server address, port number, and credentials (if required).
  5. 5.Click “Save” and enable the proxy.

Note that MTProto proxies are designed specifically for Telegram traffic.

How do I know if my proxy server is working?

Once you’ve configured everything, check your proxy server before relying on it. 

The simplest check is to use a “What is my IP” tool before and after enabling the proxy server. If the proxy server is working, the address shown should match the proxy server’s IP rather than your real IP. 

A successful IP check doesn’t guarantee complete protection, though. Your real IP address can still leak through WebRTC in some browsers. Non-proxied apps that fall outside a browser-only configuration can also reveal your real IP. If you’ve only configured Firefox, for instance, every other application on your device will continue to use your real IP address. DNS requests can sometimes bypass a proxy entirely. We go into detail on how DNS requests can bypass proxies in our guide to what a DNS server does.

You should also understand the difference between a standard proxy and an anonymous proxy. The former can still reveal that you’re using a proxy, while the latter hides that fact along with your IP address. 

Security considerations when setting up a proxy server

Before you put any proxy into regular use, it’s worth taking the following security precautions seriously.

Avoid free, public proxies. Many of these free services log your data and web traffic, inject ads into the pages you visit, or steal your credentials. Furthermore, open proxies rarely disclose who runs them, which leaves you with no real way of knowing what happens to your data behind the scenes. We cover the risks of using an open proxy in our guide to open proxies.  

If you’re self-hosting, set up username and password authentication to stop unauthorized devices from connecting to your proxy. 

Never assume that a proxy server encrypts your traffic by default. A standard HTTP proxy doesn’t, but an HTTPS proxy does encrypt the connection between your device and the proxy itself. For full encryption of your traffic beyond that point, pair your proxy with a VPN. Our guide on how to set up a VPN covers the process in full.   

Finally, keep your proxy software updated. Outdated versions of tools such as Squid or Dante can carry unpatched vulnerabilities that go unnoticed until they’re exploited. For more guidance on hardening any server you run, see our server security guide.

Be wherever you want to be.

Access any location with the world’s leading VPN

FAQ

NordVPN experts

NordVPN experts

Our NordVPN experts know the ins and outs of cybersecurity solutions and strive to make the internet safer for everyone. With a finger on the pulse of online threats, they share their expertise and practical tips on how to avoid them. Whether you're a tech newbie or a seasoned user, you'll find valuable insights in their blog posts. Cybersecurity should be accessible to everyone — and we're making that happen, one blog post at a time.