LINUX.ORG.RU
ФорумAdmin

squid https не работает

 ,


0

1

Сабж. Хочу через сквид пускать авторизованных товарищей на сайты с https, FreeBSD 9.2, сквид 3.4

http через 3128 работает, а вот https-сайты через 3129 нет браузер пишет «не удаётся подключиться с сайту»

auth_param basic program /usr/local/libexec/squid/basic_ncsa_auth /usr/local/etc/squid/passwd

auth_param basic children 5

auth_param basic realm Squid proxy-caching web server

auth_param basic credentialsttl 2 hours

auth_param basic casesensitive off

acl passwd proxy_auth REQUIRED

http_access allow passwd

http_access allow all

#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network

#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network

#acl localnet src 0.0.0.0/8 # RFC1918 possible internal network

#acl localnet src fc00::/7 # RFC 4193 local private network range

#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

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

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow localhost manager

http_access deny manager

dns_nameservers 8.8.8.8

#http_access allow localnet

#http_access allow localhost

#http_access deny all

http_port 3128

https_port 3129 ssl-bump transparent generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/etc/squid/ssl_cert/myCA.pem

sslproxy_flags DONT_VERIFY_PEER

sslproxy_cert_error allow all

always_direct allow all

ssl_bump server-first all

sslproxy_options NO_SSLv2,NO_SSLv3,SINGLE_DH_USE

sslcrtd_program /usr/local/libexec/squid/ssl_crtd -s /usr/local/ssl_db -M 4MB

cache_dir ufs /var/squid/cache 100 16 256

coredump_dir /var/squid/cache

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

visible_hostname mail.ru

2017/04/25 00:59:44 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 129045: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 00:59:45 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 129045: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 00:59:50 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 129045: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 01:00:24 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 129045: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 01:01:25 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 38782: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 01:02:17 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 69136: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

2017/04/25 01:03:20 kid1| clientNegotiateSSL: Error negotiating SSL connection on FD 44127: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request (1/-1)

база создана ls /usr/local/ssl_db certs index.txt size

сертификат сгнерён /usr/local/etc/squid]# ls -la /usr/local/etc/squid/ssl_cert/myCA.pem -r-------- 1 squid squid 3176 Apr 24 23:51 /usr/local/etc/squid/ssl_cert/myCA.pem


Сделай так, должно помочь

http_port 3129 ssl-bump transparent generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/etc/squid/ssl_cert/myCA.pem

araks ()
Ответ на: комментарий от araks

s убрать в смысле? нет, пишет другое

2017/04/26 02:25:43.915 kid1| SECURITY ALERT: Host header forgery detected on local=78.108.178.10:3129 remote=178.69.42.80:37258 FD 149 flags=33 (intercepted port does not match 443) 2017/04/26 02:25:43.915 kid1| SECURITY ALERT: By user agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1449 2017/04/26 02:25:43.915 kid1| SECURITY ALERT: on URL: sitecheck2.opera.com:443 2017/04/26 02:25:43.915 kid1| abandoning local=78.108.178.10:3129 remote=178.69.42.80:37258 FD 149 flags=33 2017/04/26 02:25:45.159 kid1| SECURITY ALERT: Host header forgery detected on local=78.108.178.10:3129 remote=178.69.42.80:37262 FD 150 flags=33 (intercepted port does not match 443) 2017/04/26 02:25:45.159 kid1| SECURITY ALERT: By user agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1449 2017/04/26 02:25:45.159 kid1| SECURITY ALERT: on URL: 2ip.ru:443 2017/04/26 02:25:45.159 kid1| abandoning local=78.108.178.10:3129 remote=178.69.42.80:37262 FD 150 flags=33 2017/04/26 02:25:45.160 kid1| SECURITY ALERT: Host header forgery detected on local=78.108.178.10:3129 remote=178.69.42.80:37266 FD 152 flags=33 (intercepted port does not match 443) 2017/04/26 02:25:45.160 kid1| SECURITY ALERT: By user agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 OPR/44.0.2510.1449 2017/04/26 02:25:45.160 kid1| SECURITY ALERT: on URL: 2ip.ru:443

браузер отвечает «Не удается получить доступ к сайту

Веб-страница по адресу https://2ip.ru/, возможно, временно недоступна или постоянно перемещена по новому адресу.»

wadim_ ()
Ответ на: комментарий от wadim_

Замените transparent на intercept. Прокси используется как прозрачное или как?

araks ()
Ответ на: комментарий от araks

уже так делал, тоже самое

2017/04/28 16:18:54.332 kid1| SECURITY ALERT: Host header forgery detected on local=78.108.178.10:3129 remote=95.55.37.8:38908 FD 237 flags=33 (intercepted port does not match 443) 2017/04/28 16:18:54.332 kid1| SECURITY ALERT: By user agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36 2017/04/28 16:18:54.332 kid1| SECURITY ALERT: on URL: topface.com:443 2017/04/28 16:18:54.332 kid1| abandoning local=78.108.178.10:3129 remote=95.55.37.8:38908 FD 237 flags=33

Не удается получить доступ к сайту

Веб-страница по адресу https://2ip.ru/, возможно, временно недоступна или постоянно перемещена по новому адресу.

wadim_ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.