Pages

Squid proxy

Ubuntu 22.04 installation

1. Install qemu-quest-agent

apt-get install qemu-guest-agent

systemctl start qemu-guest-agentv

systemctl enable qemu-guest-agentv

systemctl status qemu-guest-agent.service

2. Install squid-openssl

apt install squid-openssl

2a. Generate SSL DB

/usr/lib/squid/security_file_certgen -c -s /var/lib/ssl_db -M 4MB

3. Generate CERTs

openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/squid/ssl_cert/new/squidCAkey.pem -out /etc/squid/ssl_cert/new/squidCA.pem

Update CA crt

cp squidCA.pem /usr/local/share/ca-certificates/local-ca.crt

update-ca-certificates


4. Squid proxy configuratin - SSL BUMP

http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB tls-cert=/etc/squid/ssl_cert/new/squidCA.pem tls-key=/etc/squid/ssl_cert/new/squidCAkey.pem

sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/ssl_db -M 4MB

sslcrtd_children 5

ssl_bump server-first all

ssl_bump stare all


5. Squid proxy configuratin - CACHE_PEER

cache_peer XXX.XXX.XXX.XXX parent 3218 0 no-query no-digest login=<user>:<pass>

never_direct allow all


Comands

curl --proxy http://localhost:3128 https://www.bing.com/rp/xv0jcUoITNBEWhvJr907WdKfo9I.br.js

curl --proxy http://localhost:3128 ifconfig.me


Nema komentara:

Objavi komentar