What a proxy server does and why you might build one
A proxy server sits between your computer and the internet, receiving your requests and passing them to websites on your behalf. When you set up your own, you control what traffic flows through it, what gets logged, and who can use it. This is different from using a public proxy service — you own the hardware and the rules.
People build proxy servers for specific reasons: to cache data so repeated requests load faster, to filter what content reaches devices on a network, to hide the real IP address of machines behind it, or to monitor and log traffic for security purposes. A business might run one to reduce bandwidth costs. A network administrator might run one to enforce security policies. You might run one on a spare computer at home to understand how web traffic actually works.
This guide covers the practical steps to set one up on a computer you control, using free or low-cost tools. It assumes you have a computer that can stay powered on, basic comfort with a command line, and a network you own or have permission to modify.
Key Takeaways
- A proxy server intercepts requests from your devices and forwards them to websites, letting you control, log, or modify traffic in between.
- You need a dedicated computer or server, proxy software (Squid and Tinyproxy are common free options), and a network where you can route traffic to it.
- The computer running the proxy must have a static IP address on your network so other devices can find it reliably.
- After installation, you configure client devices to send their traffic through the proxy by entering its IP address and port number in network settings.
- Testing involves checking that traffic actually flows through the proxy and that websites load correctly through it.
Choosing hardware and a proxy software package
You need a computer that runs continuously. This can be an old laptop, a desktop you leave on, a Raspberry Pi, or a virtual machine on a server you rent. The machine does not need to be powerful — proxy servers are not CPU-intensive. What matters is that it stays on, has a stable network connection, and has enough disk space if you plan to cache web content.
The operating system can be Windows, macOS, or Linux. Linux is common for servers because it is lightweight and free, but Windows and macOS work fine if that is what you have. The choice of operating system determines which proxy software you can easily install.
For the proxy software itself, Squid is the industry standard — it is mature, widely documented, and runs on Linux, Windows, and macOS. It handles caching, filtering, and logging. Tinyproxy is simpler and lighter-weight, good if you want something straightforward on limited hardware. mitmproxy is designed for developers who need to inspect and modify traffic in detail. For Windows specifically, CCProxy and Wingate are commercial options, though free alternatives exist.
Start with Squid on Linux or Tinyproxy if you want something quick to test. Both are free and have large communities answering questions online.
Setting up a static IP address for your proxy computer
Other devices need to know where to find your proxy server. If its IP address changes every time it restarts, those devices will lose connection. You need a static IP address — one that stays the same.
On your home network, you set this in your router. Log into your router's admin panel (usually at 192.168.1.1 or 192.168.0.1 — check your router's manual). Find the DHCP settings or the device list. Locate your proxy computer by name or MAC address, then assign it a fixed IP address. Common choices are 192.168.1.100 or 192.168.1.50 — pick something outside the range your router normally assigns to avoid conflicts.
On Linux, you can also set a static IP directly in the operating system using the network configuration files, which survives router restarts. On Windows, use Settings > Network > Advanced > IP settings and choose Manual, then enter a static address in the same subnet as your router.
Write down the static IP address you choose. You will give this address to every device that uses the proxy.
Installing and configuring Squid on Linux
If you are using a Linux machine, Squid is usually available through your package manager. On Ubuntu or Debian, open a terminal and run:
sudo apt update then sudo apt install squid
On CentOS or RHEL, use sudo yum install squid instead. The installation creates a configuration file at /etc/squid/squid.conf. This file controls how Squid behaves.
Open the configuration file in a text editor (nano or vi). Find the line that says http_port 3128 — this is the port Squid listens on. You can leave it as 3128 or change it to another number above 1024. Find the section with acl localnet rules and make sure your local network is listed — for example, acl localnet src 192.168.1.0/24 if your network is 192.168.1.x. Add a line http_access allow localnet to permit traffic from your local network.
Save the file, then start Squid with sudo systemctl start squid. Check that it is running with sudo systemctl status squid. If you see "active (running)", it is working.
Installing and configuring Tinyproxy as a simpler alternative
Tinyproxy is smaller and faster to set up if you do not need Squid's advanced features. On Ubuntu or Debian, install it with sudo apt install tinyproxy. The configuration file is at /etc/tinyproxy/tinyproxy.conf.
Open the file and find the line Port 8888 — this is the listening port. Leave it or change it. Find the section with Allow and Deny rules. By default, Tinyproxy may deny all traffic. Add a line Allow 192.168.1.0/24 (or your network range) to permit local devices. Comment out or remove any Deny lines that block your network.
Save the file and start Tinyproxy with sudo systemctl start tinyproxy. Verify it is running with sudo systemctl status tinyproxy.
Configuring client devices to use the proxy
Once the proxy server is running, point your devices to it. The steps vary by device type.
On Windows: Go to Settings > Network & Internet > Proxy. Under "Manual proxy setup", toggle on "Use a proxy server". Enter the IP address of your proxy computer (for example, 192.168.1.100) and the port (3128 for Squid, 8888 for Tinyproxy). Click Save.
On macOS: Go to System Preferences > Network. Select your active connection, click Advanced, then the Proxies tab. Check "Web Proxy (HTTP)" and enter the proxy IP and port. Click OK and explore.
On Linux: This depends on your desktop environment. In GNOME, go to Settings > Network > Network Proxy and set it to Manual, then enter the IP and port. In other environments, you may edit ~/.bashrc or ~/.profile to set environment variables like export http_proxy=http://192.168.1.100:3128.
On iOS or Android: Go to Wi-Fi settings, select your network, tap Configure Proxy, choose Manual, and enter the proxy IP and port.
After configuring a device, open a web browser and visit a website. If the page loads, the proxy is working. If it does not load or times out, check that the proxy computer is on, that the IP address is correct, and that the port number matches your configuration.
Testing and troubleshooting your proxy
The simplest test is to configure one device and try browsing. If websites load normally, traffic is flowing through the proxy. If pages time out or refuse to load, the device cannot reach the proxy server.
On the proxy computer itself, check that the service is running. On Linux, use sudo systemctl status squid or sudo systemctl status tinyproxy. If it shows "inactive", restart it with sudo systemctl restart squid.
Check that the proxy is listening on the correct port. On Linux, run sudo netstat -tlnp | grep squid or grep tinyproxy. You should see a line showing the proxy listening on port 3128 or 8888 (or whatever you set). If you see nothing, the proxy did not start correctly — check the configuration file for syntax errors.
Verify that the client device can reach the proxy computer at all. From the client, open a terminal and ping the proxy IP address (for example, ping 192.168.1.100). If you get replies, the network path is open. If you get "host unreachable" or timeouts, the device cannot see the proxy — check that both are on the same network and that the IP address is correct.
Check the proxy's logs for errors. Squid logs to /var/log/squid/access.log and /var/log/squid/cache.log. Tinyproxy logs to /var/log/tinyproxy/tinyproxy.log. Open these files with tail -f /var/log/squid/access.log to watch requests in real time as you browse through the proxy. If you see requests appearing, the proxy is receiving traffic. If you see errors, they often point to the problem.
Keeping your proxy find and maintained
An open proxy on the internet can be abused by strangers to hide their traffic or attack websites. If your proxy is only on a home network behind a router, it is reasonably safe. If it is on a public server, restrict access strictly.
In Squid, use ACL rules to allow only specific IP addresses or networks. In Tinyproxy, use the Allow and Deny directives. Never leave a proxy open to the entire internet unless you understand the consequences and have a specific reason.
Keep the proxy software updated. On Linux, run sudo apt update && sudo apt upgrade regularly to patch security issues. Check the Squid or Tinyproxy project websites occasionally for security announcements.
Monitor disk space if you have caching enabled. Cached content accumulates over time. Squid has built-in cache management, but you can also manually clear the cache if it grows too large.
Frequently Asked Questions
Can I run a proxy on a Raspberry Pi?
Yes. A Raspberry Pi has enough power for Tinyproxy or a lightweight Squid setup serving a small number of devices. Install Raspbian (Debian-based), then install the proxy software the same way as on any Linux machine. The main limitation is that a Pi has limited RAM and storage, so it works best for a few devices or without heavy caching.
What is the difference between a proxy and a VPN?
A proxy forwards your requests and can cache or filter them, but does not encrypt the connection between you and the proxy. A VPN encrypts all traffic and typically hides your IP address from websites. A proxy is lighter-weight and faster for local networks. A VPN is better for privacy on public networks. They serve different purposes.
Can I use a proxy to block websites on my network?
Yes. Squid has built-in filtering rules that can block sites by domain, URL pattern, or content type. You configure these in the squid.conf file using ACL rules and http_access directives. Tinyproxy has fewer filtering features but can block by domain. This is common in schools and offices.
What happens if my proxy computer loses power?
All devices configured to use the proxy will lose internet access until the proxy restarts. To avoid this, configure the proxy to start automatically when the computer boots. On Linux, use sudo systemctl enable squid or sudo systemctl enable tinyproxy. On Windows, set the proxy service to start automatically in Services. Consider using an uninterruptible power supply (UPS) if the proxy is critical.
Can I run a proxy on a virtual machine?
Yes. A virtual machine on a server works well for a proxy. Assign it a static IP on your virtual network, install the proxy software the same way, and configure clients to point to that IP. Virtual machines are often more reliable than physical hardware because they can be backed up and migrated easily.