Tag: squid

  • Squid Proxy Server allow connection to all ports

    By default Squid proxy only allow out going connection to white listed ports that are used commonly. When you visit a site with non standard ports with Squid proxy, it won’t work. To fix this, edit squid configuration file

    vi /etc/squid/squid.conf
    

    Find

    acl SSL_ports port 443
    acl Safe_ports port 80          # http
    acl Safe_ports port 21          # ftp
    acl Safe_ports port 443         # https
    acl Safe_ports port 70          # gopher
    acl Safe_ports port 210         # wais
    acl Safe_ports port 1025-65535  # unregistered ports
    acl Safe_ports port 280         # http-mgmt
    acl Safe_ports port 488         # gss-http
    acl Safe_ports port 591         # filemaker
    acl Safe_ports port 777         # multiling http
    

    Replace with

    acl SSL_ports port 1-65535
    acl Safe_ports port 1-65535
    

    Restart squid with

    systemctl restart squid
    

    Related Posts

    Install Squid Proxy Server

    proxy

  • Install Squid Proxy Server

    Proxy server allows hiding your IP address. You can find the Squid Proxy Installer script at

    https://github.com/serverok/squid-proxy-installer

    The script supports the following Operating systems

    • Ubuntu 18.04, 20.04, 22.04, 24.04
    • Debian 8, 9, 10, 11, 12, 13
    • CentOS 8
    • CentOS Steam 8, 9
    • AlmaLinux 8, 9

    Video Tutorial

    How to install Squid Proxy Server in DigitalOcean Droplet (VPS).

    https://rumble.com/vdswgv-install-squid-proxy-server-in-digitalocean-vps.html
    https://odysee.com/squid-proxy-install:1

    Become user root

    If you are not logged in as user root, you need to become user root. This can be done with the command

    sudo su

    If sudo su did not work for you, try

    su -

    Install wget

    On CentOS/AlmaLinix

    yum install -y wget

    On Ubuntu/Debian

    apt install -y wget

    install squid proxy server

    To install squid proxy server, run

    wget https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid3-install.sh -O squid3-install.sh
    bash squid3-install.sh

    After installing Squid Proxy Server, you may need to change the port. For instructions, see How to change Port of Squid Proxy Server

    Create a Proxy User

    To create a user in squid proxy, run

    sudo squid-add-user

    To change the password for an existing user, just create the user again with a different password. This will update the existing user password.

    Configure Multiple IPs

    If you have multiple IP addresses on the server, first make sure IPs are properly configured on your web server. If your secondary IPs are configured, you should be able to ping to these IPs and connect to the server using the IP address.

    Once IPs are configured in the server and able to ping, you can run following commands

    wget https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid-conf-ip.sh
    sudo bash squid-conf-ip.sh

    Now you will be able to use all IP available in the server as a proxy server.

    This won’t work if your IPs are behind NAT. You can verify this by running the command “ip a”, it should list all IP addresses.

    Test Proxy Server with curl

    curl -U PROXY_USER:PROXY_PW -x MY_PROXY_SERVER:PROXY_PORT https://checkip.amazonaws.com

    Related Posts