HTTPS (Letsencrypt) Squid-Proxy in einer Domäne?

1186
programmer5000

Ich möchte einen HTTPS-Squid-Proxy ( diese Art ) erstellen, mit dem jeder auf jede Site zugreifen kann. Dies ist kein Reverse Proxy, sondern das gesamte Internet. Aus Sicherheitsgründen darf nicht auf IP-Adressen in meinem Subnetz zugegriffen werden. Ich habe ein LetsEncrypt-Zertifikat erhalten proxy.mydomain.comund frage mich, wie man Squid richtig konfiguriert. Hier ist meine aktuelle Konfigurationsdatei:

########### squid.conf ########### # ## interface, port and proxy type #http_port 0.0.0.0:80 transparent https_port 0.0.0.0:443 intercept tls-cert="/etc/letsencrypt/live/proxy.mydomain.com/fullchain.pem"  ## timeouts forward_timeout 30 seconds connect_timeout 30 seconds read_timeout 30 seconds request_timeout 30 seconds persistent_request_timeout 1 minute client_lifetime 20 hours  ## host definitions acl all src 0.0.0.0/0 acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8  acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines  http_access deny localnet  ## proxy server client access acl mynetworks src 127.0.0.0/8 10.10.10.0/28 #http_access deny !mynetworks  ## max connections per ip acl maxuserconn src 127.0.0.0/8 10.0.10.0/28 acl limitusercon maxconn 500 http_access deny maxuserconn limitusercon  ## disable caching cache deny all cache_dir null /tmp  ## disable multicast icp icp_port 0 icp_access deny all  ## disable ident lookups ident_lookup_access deny all  ## no-trust for on-the-fly Content-Encoding acl apache rep_header Server ^Apache broken_vary_encoding allow apache  ## logs logformat combined [%tl] %>A %>h "%rm %ru HTTP/%rv" %Hs %<st "%>h" "%>h" %Ss:%Sh access_log /var/log/squid/access.log combined cache_store_log /var/log/squid/store.log cache_log /var/log/squid/cache.log logfile_rotate 8  ## support files coredump_dir /tmp pid_filename /var/log/squid/squid.pid  ## ports allowed acl Safe_ports port 80 443 http_access deny !Safe_ports  ## ssl ports/method allowed acl SSL_ports port 443 acl CONNECT method CONNECT http_access deny CONNECT !SSL_ports  ## protocols allowed acl Safe_proto proto HTTP SSL http_access deny !Safe_proto  ## methods allowed acl Safe_method method CONNECT GET HEAD POST OPTIONS PUT PATCH http_access deny !Safe_method  ## allow replies to client requests http_reply_access allow all  ########## END ########### 

Ich bearbeitete /etc/init.d/squid, um Tintenfisch mit der Flagge zu laufen --with-openssl.

Beim Laufen sudo service squid statussieht alles gut aus.

Wenn ich jedoch versuche curl -p https://localhost:443 api.ipify.org -v, mich per Proxy mit diesem Proxy zu verbinden, bekomme ich es curl: (7) Failed to connect to localhost port 443: Connection refused.

Was mache ich falsch?

1
@PimpJuiceIT Ich habe keine Firewalls und "lsof -i: 443" hat eine leere Ausgabe. programmer5000 vor 6 Jahren 0

0 Antworten auf die Frage