Привет! Я хотел установить сервер squid на ubuntu 20.10 с поддержкой ssl из исходников!
Что и в какой последовательности я делал:
sudo su
apt install devscripts # Устанавливаю пакет утилит для сборки пакета
apt build-dep squid #Устанавливаю зависимости для сборки squid
apt install libssl-dev # Устанавливаю OpenSSL
apt-get source squid # Cкачиваю исходники squid
./configure --with-openssl --enable-ssl-crtd
make
make install
Конфиг самого сквид вот такой:
cache_effective_user proxy
cache_effective_group proxy
acl localnet src 192.168.1.0/24 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
dns_nameservers 8.8.8.8
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
#прозрачный порт указывается опцией intercept
http_port 192.168.1.135:3128 intercept
#также нужно указать непрозрачный порт, ибо если захотите вручную указать адрес
#прокси в браузере, указав прозрачный порт, вы получите ошибку доступа, поэтому нужно
#указывать непрозрачный порт в браузере, если конечно такое желание будет, к тому же в логах #сыпятся ошибки о том, что непрохрачный порт не указан=)
http_port 192.168.1.135:3130
#и наконец, указываем HTTPS порт с нужными опциями
https_port 192.168.1.135:3151 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 cert=/etc/squid/squidca.pem
always_direct allow all
sslproxy_cert_error allow all
sslproxy_flags DONT_VERIFY_PEER
#укажем правило со списком блокируемых ресурсов (в файле домены вида .domain.com)
#acl blocked ssl::server_name "/etc/squid/blocked_https.txt"
#acl step1 at_step SslBump1
#ssl_bump peek step1
#терминируем соединение, если клиент заходит на запрещенный ресурс
#ssl_bump terminate blocked
#ssl_bump splice all
sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
cache_dir aufs /var/spool/squid 20000 49 256
maximum_object_size 61440 KB
minimum_object_size 3 KB
cache_swap_low 90
cache_swap_high 95
maximum_object_size_in_memory 512 KB
memory_replacement_policy lru
logfile_rotate 4
Всё хорошо но при запуске в логе вот такая ошибка:
2021/03/08 01:42:37 kid1| Set Current Directory to /var/spool/squid
2021/03/08 01:42:37 kid1| ipcCreate: /usr/lib/squid/ssl_crtd: (13) Permission denied
2021/03/08 01:42:37 kid1| ipcCreate: /usr/lib/squid/ssl_crtd: (13) Permission denied
2021/03/08 01:42:37 kid1| ipcCreate: /usr/lib/squid/ssl_crtd: (13) Permission denied
2021/03/08 01:42:37 kid1| ipcCreate: /usr/lib/squid/ssl_crtd: (13) Permission denied
2021/03/08 01:42:37 kid1| Finished loading MIME types and icons.
2021/03/08 01:42:37 kid1| WARNING: No ssl_bump configured. Disabling ssl-bump on https_port 192.168.1.135:3151
2021/03/08 01:42:37 kid1| HTCP Disabled.
2021/03/08 01:42:37 kid1| Squid plugin modules loaded: 0
2021/03/08 01:42:37 kid1| Adaptation support is off.
2021/03/08 01:42:37 kid1| Accepting NAT intercepted HTTP Socket connections at local=192.168.1.135:3128 remote=[::] FD 24 flags=41
2021/03/08 01:42:37 kid1| Accepting HTTP Socket connections at local=192.168.1.135:3130 remote=[::] FD 25 flags=9
2021/03/08 01:42:37 kid1| Accepting NAT intercepted HTTPS Socket connections at local=192.168.1.135:3151 remote=[::] FD 26 flags=41
2021/03/08 01:42:37 kid1| Done reading /var/spool/squid swaplog (0 entries)
2021/03/08 01:42:37 kid1| Store rebuilding is 0.00% complete
2021/03/08 01:42:37 kid1| Finished rebuilding storage from disk.
2021/03/08 01:42:37 kid1| 0 Entries scanned
2021/03/08 01:42:37 kid1| 0 Invalid entries.
2021/03/08 01:42:37 kid1| 0 With invalid flags.
2021/03/08 01:42:37 kid1| 0 Objects loaded.
2021/03/08 01:42:37 kid1| 0 Objects expired.
2021/03/08 01:42:37 kid1| 0 Objects cancelled.
2021/03/08 01:42:37 kid1| 0 Duplicate URLs purged.
2021/03/08 01:42:37 kid1| 0 Swapfile clashes avoided.
2021/03/08 01:42:37 kid1| Took 0.01 seconds ( 0.00 objects/sec).
2021/03/08 01:42:37 kid1| Beginning Validation Procedure
2021/03/08 01:42:37 kid1| Completed Validation Procedure
2021/03/08 01:42:37 kid1| Validated 0 Entries
2021/03/08 01:42:37 kid1| store_swap_size = 0.00 KB
2021/03/08 01:42:37 kid1| WARNING: /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB #Hlpr2 exited
2021/03/08 01:42:37 kid1| Too few /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB processes are running (need 1/32)
2021/03/08 01:42:37 kid1| Closing HTTP(S) port 192.168.1.135:3128
2021/03/08 01:42:37 kid1| Closing HTTP(S) port 192.168.1.135:3130
2021/03/08 01:42:37 kid1| Closing HTTP(S) port 192.168.1.135:3151
2021/03/08 01:42:37 kid1| storeDirWriteCleanLogs: Starting...
2021/03/08 01:42:37 kid1| Finished. Wrote 0 entries.
2021/03/08 01:42:37 kid1| Took 0.00 seconds ( 0.00 entries/sec).
2021/03/08 01:42:37 kid1| FATAL: The /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB helpers are crashing too rapidly, need help!
2021/03/08 01:42:37 kid1| Squid Cache (Version 4.13): Terminated abnormally.
CPU Usage: 0.055 seconds = 0.038 user + 0.017 sys
Maximum Resident Size: 117472 KB
Page faults with physical i/o: 0
2021/03/08 01:42:37| Removing PID file (/var/run/squid.pid)
2021/03/08 01:42:37 kid1| ipcCreate: /usr/lib/squid/ssl_crtd: (13) Permission denied
Хотя на директорию вот такие права: drwxrwxrwx 2 proxy proxy 4096 Mar 8 00:32 ssl_crtd
Где и в чём я могу ошибаться\ошибся?
Заранее спасибо за все ответы!