World’s largest virtual agentic engineering & quality conference

WHENAUG 19-21
WHEREVirtual · Global
Register Now

How to Setup a Proxy Server?

To set up a proxy server you either point your operating system at an existing proxy through its network settings, or run your own proxy such as Squid. On Windows and macOS you enter the proxy IP address and port under network proxy settings; on Linux you install Squid, edit its config for the port and allowed clients, and restart the service. A quick curl test then confirms traffic is routing correctly.

What Is a Proxy Server?

A proxy server is an intermediary that sits between a client and the wider internet, forwarding requests and responses on the client's behalf. It can mask IP addresses, cache content, filter traffic, and enforce access rules. The two main kinds are a forward proxy, which fronts clients, and a reverse proxy, which fronts servers. For background, see what is a proxy.

Setting Up a Proxy on Windows

  • Open Settings > Network & Internet > Proxy.
  • Under Manual proxy setup, select Set up and turn on Use a proxy server.
  • Enter the proxy IP address and port, and add exceptions (semicolon separated) for sites that should bypass it.
  • Click Save. For automatic config, enable Automatically detect settings or supply a setup script URL.

To run your own proxy on Windows, install a Squid build and edit squid.conf. The dedicated setup a proxy server on Windows guide walks through it in detail.

Setting Up a Proxy on macOS

  • Open System Settings > Network > Wi-Fi or Ethernet.
  • Click Details > Proxies.
  • Enable HTTP Proxy or SOCKS Proxy and enter the server address and port.
  • Click OK and apply the changes.

To run a local Squid proxy on macOS via Homebrew:

# Install Squid
brew install squid

# Edit the config, then set the listening port
nano /usr/local/etc/squid.conf
# add:  http_port 3128

# Start the service
sudo brew services start squid

# Verify it works
curl -x http://localhost:3128 https://www.google.com

Setting Up a Proxy on Linux with Squid

Squid is the standard forward proxy on Linux. Install it, define an access control list for the clients allowed to use it, set the port, and restart.

# Debian / Ubuntu
sudo apt-get update
sudo apt-get install squid

# Edit the configuration
sudo nano /etc/squid/squid.conf

Inside squid.conf, set the port and allow your local network:

http_port 3128
acl localnet src 192.168.0.0/16
http_access allow localnet
# Restart to apply changes
sudo systemctl restart squid

The setup a proxy server in Linux and setup a proxy server on your LAN guides cover ACLs and network-wide sharing in more depth.

Setting Up a Reverse Proxy with Nginx

A reverse proxy forwards incoming client requests to one or more backend servers, useful for load balancing, TLS termination, and caching.

server {
    listen 8080;
    location / {
        proxy_pass http://127.0.0.1:5000;
    }
}

Add this block to nginx.conf, then start or reload Nginx and open http://localhost:8080 to confirm requests reach the backend on port 5000.

Common Mistakes and Troubleshooting

  • Port blocked by firewall: The proxy port must be open on the host. Allow it explicitly, for example with ufw or the Windows firewall.
  • Missing ACL rules: Squid denies all clients by default. Without an http_access allow rule for your network, connections are refused.
  • Mismatched port: The port in the server config must match the port in the client's proxy settings, or traffic never connects.
  • Forgetting to restart: Config changes only take effect after restarting or reloading the proxy service.
  • No verification step: Always confirm with a curl request or an IP check rather than assuming the proxy is active.

Conclusion

Setting up a proxy server comes down to two paths: configure your OS to use an existing proxy, or stand up your own with Squid or Nginx. Whichever you choose, match the port on both ends, open the firewall, define access rules, restart the service, and verify with a real request. From there a forward proxy handles client traffic while a reverse proxy fronts your servers, each solving a different networking problem.

Frequently Asked Questions

What is the difference between a forward and reverse proxy?

A forward proxy sits in front of clients and forwards their requests to the internet, often for filtering or anonymity. A reverse proxy sits in front of servers and routes incoming requests to backend services, commonly for load balancing and caching.

How do I set up a proxy server on Windows?

Open Settings > Network & Internet > Proxy, then under Manual proxy setup turn on Use a proxy server, enter the IP address and port, add any exceptions, and save. To run your own proxy, install a Squid build and edit squid.conf.

How do I set up a proxy server on Linux?

Install Squid with your package manager, edit /etc/squid/squid.conf to set the http_port and allowed IP ranges via ACLs, then restart the Squid service. Point client browsers at the server IP and configured port to route traffic through it.

How do I test if my proxy server is working?

Send a request through the proxy, for example curl -x http://localhost:3128 https://www.google.com. A successful response confirms traffic is routing through the proxy. You can also check that your visible IP changes to the proxy's address.

What is the difference between a proxy and a VPN?

A proxy reroutes traffic for a specific application or protocol, usually without encryption. A VPN encrypts all traffic from the device at the operating system level, offering stronger privacy but typically with more overhead than a lightweight proxy.

Which port should a proxy server use?

There is no fixed rule, but common conventions are 3128 or 8080 for HTTP proxies and 1080 for SOCKS proxies. Choose a free port, open it in the firewall, and match it in both the server config and client settings.

Related Questions

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests