Configure Squid
First open the squid configuration,
nano /usr/local/squid/etc/squid.conf
specific your http_port, by default this is 3128, we will use 8080.
Find
# http_port 3128
and replace it with
http_port 8080
Now lets configure who can access your proxy, remember to only allow access to YOUR ip.
Find
http_access deny CONNECT !SSL_ports
Add below
acl myip 127.0.0.1
acl all src 0.0.0.0/0.0.0.0
acl connectmethod method CONNECT
http_access deny connectmethod
http_access deny all
http_access allow myip
Remember to replace 127.0.0.1 with the ip you want to allow access.
Find
# By default, all headers are allowed (no anonymizing is
# performed).
#
#Default:
# none
Add below
header_access From deny all
header_access Referer deny all
header_access Server deny all
header_access User-Agent deny all
header_access WWW-Authenticate deny all
header_access Link deny all
header_access via deny all
Find
# forwarded_for on
Replace with
forwarded_for off
Save and exit squid.conf, then restart squid.
kill -9 $(ps aux | grep squid | awk '{print $2}')
/usr/local/squid/sbin/squid
You have now configured an anoymous proxy with squid. |
|