← Volver al blog

How to Set Up a Web Proxy with Squid

  • Xernode
  • 1 min de lectura
  • 10 de abril de 2026
Networking linux vps networking squid proxy web-proxy

Introduction

Squid is a powerful caching and forwarding web proxy. Setting up Squid on your VPS can help control, secure, and optimize web traffic. This guide shows you how to install and configure Squid on Ubuntu.

Step-by-step Guide

  1. Update your package list
    • sudo apt update
  2. Install Squid
    • sudo apt install -y squid
  3. Check Squid status
    • sudo systemctl status squid
  4. (Optional) Backup the default configuration
    • sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.bak
  5. Edit the Squid configuration file
    • sudo nano /etc/squid/squid.confn
      • Adjust settings as needed (e.g., allowed IPs, port, cache size).
  6. Restart Squid to apply changes
    • sudo systemctl restart squid
  7. (Optional) Allow Squid port (default 3128) through the firewall
    • sudo ufw allow 3128/tcp
    • sudo ufw reload

Recommendations

  • Restrict proxy access to trusted IPs for security.
  • Regularly monitor Squid logs for unusual activity.
  • Tune cache settings for optimal performance.

Call To Action

eed a VPS for your proxy server? Check out our hosting plans: https://xernode.com/#pricing

Related Guides