I'm setting up a proxy server with squid.
After all the steps, I restarted with
sudo systemctl restart squid.service
which returned:
active.
I then attempted to test the connection:
curl -v -x http://your_squid_username:your_squid_password@ipaddress:3128 http://www.google.com/
This error was the result:
Trying ipaddress:3128...
connect to ipaddress port 3128 failed: Connection refused
Failed to connect to ipaddress port 3128 after 1 ms: Connection refused
Closing connection 0
curl: (7) Failed to connect to ipaddress port 3128 after 1 ms: Connection refused
The configuration file /etc/squid/squid.conf has these settings:
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
include /etc/squid/conf.d/*.conf
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
# Example rule allowing access from your local networks.
acl localnet src ipaddress
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
http_access allow authenticated
# And finally deny all other access to this proxy
http_access deny all
I followed this guide. Everything went well until the start of Step 3 when I used curl to test the squid connection.
Is there anything in the squid.conf that needs to be changed? How do you fix this?