antey ✎
⋮
He configurado un proxy Squid, con la idea es que solo deje pasar tráfico HTTPS. El caso es que me funciona a medias, porque efectivamente dejar pasar el tráfico HTTPS, pero también el trafico HTTP, cosa que no quiero.
No entiendo por qué, porque deshabilite el puerto 80 que es el http.
Os comparto un fragmento de la configuración del fichero squid.conf
:
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
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
####### CONFIGURACION AUTENTICACION PROXY
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Proxy Squid Basic Authentication
auth_param basic credentialsttl 2 hours
acl auth_users proxy_auth REQUIRED
http_access allow auth_users
# And finally deny all other access to this proxy
http_access deny !auth_users
Las pruebas que realizo:
curl -x http://XX.XXX.XXX.XXX:3128 --proxy-user user:password -I https://updates.jenkins.io
* HTTP/1.1 200 Connection established *
* HTTP/2 200 *
date: Sun, 04 Dec 2022 13:25:17 GMT
server: Apache
curl -x http://XX.XXX.XXX.XXX:3128 --proxy-user user:password -I http://updates.jenkins.io
*HTTP/1.1 200 OK *
Date: Sun, 04 Dec 2022 13:27:48 GMT
Server: Apache
¿Acaso la unica posibilidad es bloquear las peticiones por protocolo http mediante una regla del firewall?:
# firewall-cmd --add-rich-rule='rule protocol value=http reject'