This is a cache of https://www.pcmag.com/how-to/i-set-up-my-own-proxy-server-heres-why-and-how-you-can-do-it-yourself. It is a snapshot of the page as it appeared on 2025-08-20T05:53:21.271+0200.
I Set Up My Own Proxy Server—Here's Why, and How You Can Do It Yourself | PCMag Skip to Main Content
PCMag editors select and review products independently. If you buy through affiliate links, we may earn commissions, which help support our testing.

I Set Up My Own Proxy Server—Here's Why, and How You Can Do It Yourself

Want more control over your internet traffic? Follow these simple steps to set up a proxy server, block unwanted websites, mask your IP address, and more.

By Dhruv Bhutani
June 30, 2025
Facebook LinkedIn Pinterest Flipboard Twitter
Copied
Error!
Copy Link
Email Comments
A person on their laptop (Credit: René Ramos; 4x6, Slim3D, davidharry/iStock via Getty Images)

Proxy servers don’t get as much attention as VPNs when it comes to internet privacy, and that makes sense. Whereas VPNs offer many different security benefits, the best proxies are useful for specific tasks like snagging concert tickets, limited-time product drops, or web scraping.

At its core, a proxy server is a computer that directs certain types of traffic between your devices and the internet. When you make a request to load a website, the proxy intercepts that request, forwards it to the website on your behalf, and then sends the response back to you. To the website, it appears like the request came from the proxy instead of your device.

Unlike a VPN, a proxy isn’t encrypted by default, nor does it make you anonymous. But a proxy can still be useful for controlling how internet traffic flows in and out of your network. If you're trying to buy event tickets but you keep getting locked out, or if a website has blocked your IP address, a proxy may be able to help. Businesses may use a proxy to enforce access policies and limit who can access what websites. A proxy may also be used to log internet traffic or accelerate content delivery by caching frequently used data.

So, depending on your needs, there are times you might want to use a proxy instead of a VPN. This all might sound very technical, but setting up a proxy server is easier than you'd think. Follow the steps below, and you'll have your own proxy up and running in no time.


Choose the Right Type of Proxy

Before going further, it’s worth noting that not all proxies function the same way. Choosing the right type of proxy is an important first step before setting anything up. 

  • HTTP proxy: The most common option is an HTTP proxy. Designed specifically for handling web traffic, an HTTP proxy can block access to specific websites, filter content, or speed up browsing through caching. 

  • SOCK5 proxy: A SOCK5 proxy can be a better fit if you need to handle different types of traffic, such as FTP or peer-to-peer connections. Just be aware that these proxies tend to be slower and don’t offer support for content filtering or caching. 

  • Transparent proxy: Transparent proxies, on the other hand, are typically deployed in networks where the end user isn’t aware that a proxy is in use. They can be helpful for silently monitoring or filtering traffic. These types of proxies tend to be easy to detect and bypass. Moreover, they don’t offer any privacy benefits. 

For this guide, I will focus on setting up an HTTP/HTTPS proxy using Squid. Squid is one of the most widely used free proxy server tools and provides fine-grained control over how your server handles incoming and outgoing traffic.

Note that you can also pay for a professionally managed proxy service. Thanks to their graphical interfaces, these proxies are generally easier to set up and use. But it's important to make sure that they offer the features you're looking for and that you trust the company behind them. For the best place to start, see our story on the top proxies we've tested.

The Best Proxy Servers We've Tested

Oxylabs logo on a dark blue background

Oxylabs Review

4.5
Outstanding
  • Save 50% With Code "OXYLABS50" at Oxylabs
    See It
Logo on white background

IPRoyal Review

3.0
Average
  • Starting at $1.75 Per GB at IPRoyal
    See It

Install the Proxy Server

Setting up a Squid proxy server is easy if you are running a linux machine, especially since Squid is available in the official repositories of most major distributions, including Debian, Ubuntu, CentOS, and Fedora. In this case, you won’t need to compile anything or use external packages.

That said, Squid isn’t limited just to linux. If you’re on macOS, you can install it using Homebrew in the terminal. For users comfortable with the command line, it’s not a particularly daunting process.

Similarly, Windows users can download a precompiled build and set it up manually. Since Squid doesn’t specifically target Windows users, an alternative like WinGate might be a better fit.

The setup process for Squid on linux and Mac is remarkably similar. Here are the steps to get Squid up and running on a Mac: 

To begin, open the Terminal and install Squid by typing the following command:
brew install squid

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

This pulls the latest version of Squid from Homebrew’s repositories and installs it to the appropriate file paths. Once completed, you can navigate to the /opt/homebrew/etc/squid.conf directory to make any changes to the configuration.

Before you can get Squid running, the app needs to initialize its cache directories. This can be enabled by typing the following command into the terminal:
squid -z -f /opt/homebrew/etc/squid.conf

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

This step sets up all the necessary directories and prepares Squid for operation. To start the Squid proxy server, enter this command in the terminal:
brew services start squid

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

This establishes Squid as a system service and ensures that it automatically switches on after a reboot with no manual intervention required.


Allow Network Devices to Connect

Now, Squid must be allowed to accept connections from other devices on the network. This is essential if you want to use your computer as a proxy server for additional devices, such as phones, laptops, tablets, or video game consoles.

Start by opening the config file by typing this command in the terminal:
nano /opt/homebrew/etc/squid.conf

Newsletter Icon
Get Our Best Stories!

Get the Most Out of Your Technology

Tips, Tricks, and How-To Newsletter Image

Sign up for the Tips, Tricks, and How-To newsletter for all of our best expert advice.

By clicking Sign Me Up, you confirm you are 16+ and agree to our Terms of Use and Privacy Policy.

Thanks for signing up!

Your subscription has been confirmed. Keep an eye on your inbox!

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

Now search for the section that includes access rules. Specifically, look for a line that says http_access deny all. Pro tip: You can press Control + W to initiate the search function in the text editor.

The http_access function controls access to all incoming proxy requests from other devices on the network. By default, it is set to deny all such requests.

Scroll above the http_access deny all command and enter the following text:
acl localnet src 192.168.1.0/24
http_access allow localnet

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

Squid processes commands sequentially. The lines that I'm including permit it to allow devices on the 192.168.1.x subnet, commonly used for local networks, to connect to the proxy while denying access to any external devices.

Next, save the file and restart Squid using this command:
brew services restart squid

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

That’s it. You can now test the proxy server’s functionality by using the tail -f /opt/homebrew/var/logs/access.log command. This command details updates to the access log in real time. If you head on over to the browser and open your favorite website, the log file should show you traffic updates immediately.

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

Add Custom Access Controls to Your Proxy Server

Setting up custom access controls is one of the most popular use cases for a proxy server. This allows you to define which websites users on your network can connect to, or not. ACL rules can also be used to manage bandwidth. Let’s say you want to block access to YouTube across your network to limit distractions during work hours. Squid allows you to do this with just a few changes to the configuration files. 

Start by opening the config file using this terminal command:
nano /opt/homebrew/etc/squid.conf

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

Scroll down to the access control section and define a new rule to block YouTube. This can be achieved by typing the following command:
acl blocked_sites dstdomain .youtube.com 

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

This line tells Squid to identify any outgoing request to a domain that ends in youtube.com. You can use this syntax for most major websites. The period placed in front of youtube.com works as a catchall for the primary domain and any sub-domains. To block all traffic to the website, place this next command right after:
http_access deny blocked_sites

Save the file and restart Squid using the brew services restart squid command.

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

This will block any device connected to your proxy server from accessing YouTube. 


Connect Devices to Your Proxy Server

Once your Squid proxy server is up and running, the next step is to route traffic from all your devices through the proxy server. This is a simple step that you only need to do once per device.

macOS

Open System Settings and navigate to Network. Select your internet connection, then click Details. Now select the Proxies tab and check the option for Web Proxy (HTTP). Enter your proxy server’s IP address and port. Do the same for Secure Web Proxy to ensure that encrypted sites also route through the proxy server. Click OK, then Apply to save the settings. 

A screenshot from an Apple Terminal
(Credit: Dhruv Bhutani)

Windows

Open the Settings app and navigate to Network & Internet options. Under Proxy, select the Manual Proxy Setup option and toggle the proxy server on. Now, enter the IP address and port for the machine running Squid. Click save, and you’re done. 

iPhone or iPad 

Open the Settings app, tap Wi-Fi, and then tap the “i” next to the network you’re connected to. Scroll down and select the HTTP Proxy section. Tap Manual and enter the IP address and port details for your Squid Server. 

Android

Open Settings and navigate to the Network & Internet tab. Next, select your Wi-Fi connection and look for Proxy under advanced settings. Set it to Manual, and enter your proxy’s IP and port details. Tap save to apply.

About Dhruv Bhutani

I'm a seasoned journalist who has been writing about consumer tech for the last fifteen years, and dabbling in it for longer still. Outside of writing, you'll find me nerding out over coffee, watching a horror movie, reading a sci-fi novel, or playing the latest heavy metal records.

Read Dhruv's full bio

Read the latest from Dhruv Bhutani