by Enrique Serrano Lendines
1
2
3
1
sudo apt-get update
2
sudo apt-get install -y squid
3
sudo systemctl is-enabled squid
sudo systemctl status squid
sudo systemctl restart squid
curl -x http://89.35.143.182:3128 -I -L http://duckduckgo.com
1
sudo apt install apache2-utils -y
2
sudo touch /etc/squid/passwd
sudo chown proxy: /etc/squid/passwd
3
sudo htpasswd /etc/squid/passwd usuario
4
sudo systemctl restart squid
acl blocked_websites dstdomain .marca.com .youtube.com .facebook.com .twitter.com .reddit.com
http_access deny blocked_websites
sudo systemctl restart squid
sudo apt install -y nginx
wget https://www.sysadminsdecuba.com/wp-content/uploads/2020/09/squidanalyzer-6.6.tar.gz
tar xvf squidanalyzer-6.6.tar.gz
cd squidanalyzer-6.6/
sudo mkdir /var/www/squidanalyzer
sudo perl Makefile.PL \
LOGFILE=/var/log/squid/access.log \
BINDIR=/usr/bin \
CONFDIR=/etc \
HTMLDIR=/var/www/squidanalyzer \
BASEURL=/ \
MANDIR=/usr/man/man3 \
DOCDIR=/usr/share/doc/squidanalyzer
sudo apt install make
sudo make
sudo make install
echo "0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1" | crontab -
/usr/local/bin/squid-analyzer > /dev/null 2>&1
ls -la /var/www/squidanalyzer/
1
sudo rm /etc/nginx/sites-available/default && sudo rm /etc/nginx/sites-enabled/default
2
sudo nano /etc/nginx/sites-available/squid-analyzer
server {
listen 80;
server_name 89.35.143.182;
access_log /var/log/nginx/squidanalyzer-access.log combined;
location / {
root /var/www/squidanalyzer;
index index.html index.htm;
}
}
3
sudo nginx -t
sudo systemctl restart nginx