Squid Proxy Setup
https://ubuntu.com/server/docs/how-to-install-a-squid-server
https://www.digitalocean.com/community/tutorials/how-to-set-up-squid-proxy-on-ubuntu-22-04
User authentication? https://gist.github.com/jackblk/fdac4c744ddf2a0533278a38888f3caf
apt install squid
apt-get install apache2-utils (for user authentication)
cp /etc/squid/squid.conf /etc/squid/squid.conf.original
chmod a-w /etc/squid/squid.conf.original
Final Squid Config
!!! Attention: Remove the following more up as well:
http_port 3128
vi /etc/squid/squid.conf
### https://gueldenpfennigs.blogspot.com/2024/07/ubuntu.html
### https://gist.github.com/jackblk/fdac4c744ddf2a0533278a38888f3caf
#
# add passwords for proxy
# htpasswd /etc/squid/passwords [USERNAME] <<<<<
# First entry:
# htpasswd -c /etc/squid/passwords [USERNAME] <<<<<
# NOT ACTIVE - just for tests ... volker => consolut
# vt => "normal" (Volltreffer)
#
# Check the Squid Proxy Log
# view /var/log/squid/access.log
# service squid restart <<<<
# systemctl restart squid
# service squid start
# service squid stop
# service squid status
# systemctl status squid.service
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 24 hours
auth_param basic casesensitive off
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_access deny all
### no longer supported - Volker 1.3.25
###dns_v4_first on
### delete => delete the "X-Forwarded-For" in the http header
forwarded_for delete
### on => you can see the proxy - off => it works "transparent" :-)
via off
# 3128 is turned on by default more down in the "default config" as well
# but we did turn off 3128 now manually in order to listen on the special port 61923 only
http_port 61923
# addings volker vg - at least as a test (port 80 goes easier through a firewall)
# it looks like, that this does not work properly ... needs more testing ...
# addings volker vg - at least as a test (port 80 goes easier through a firewall)
### VG 4.10.25: this is not good with 80 as we need 80 free for
### certificate creation via Let's Encrypt ...
###http_port 80
# addings Volker
cache deny all
visible_hostname weezie
### Change because of DNS Issues - 1.3.25 Volker
# ... just quad9
dns_nameservers 9.9.9.11 149.112.112.11
# Pi-hole usage :-)))
###dns_nameservers 45.89.127.31
# not tested by now ... could be pi-hole as well
### dns_nameservers 127.0.0.1
Add a user for the Squid Proxy
htpasswd /etc/squid/passwords <my_username> ### pwd will be asked via keyboard ...
#






0 Kommentare:
Kommentar veröffentlichen