Squid-Kit-Transparenter-Proxy: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=Firewall Regeln für den Transparenten Proxy= {{#drawio:proxy-2}} *iptables -t nat -A PREROUTING -j REDIRECT -s 192.168.10.0/24 -p tcp --dport 80 --to-port 31…“) |
|||
| (5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| + | =Schaubild= | ||
| + | {{#drawio:proxy-2}} | ||
| + | =Vorraussetzung= | ||
| + | *[[Squid-Kit-2]] | ||
| + | |||
=Firewall Regeln für den Transparenten Proxy= | =Firewall Regeln für den Transparenten Proxy= | ||
| − | + | == (iptables REDIRECT == | |
| − | *iptables -t nat -A PREROUTING -j REDIRECT -s | + | *iptables -t nat -A PREROUTING -j REDIRECT -s 172.16.113.0/24 -p tcp --dport 80 --to-port 3129 |
| − | *iptables -t nat -A PREROUTING -j REDIRECT -s | + | *iptables -t nat -A PREROUTING -j REDIRECT -s 172.16.113.0/24 -p tcp --dport 443 --to-port 3130 |
| + | == (nftables REDIRECT) == | ||
| + | ;Tabelle und Kette anlegen: | ||
| + | *nft add table ip nat | ||
| + | *nft add chain ip nat prerouting '{ type nat hook prerouting priority dstnat; policy accept; }' | ||
| + | ;HTTP und HTTPS lokal umleiten: | ||
| + | *nft add rule ip nat prerouting tcp dport 80 redirect to :3129 | ||
| + | *nft add rule ip nat prerouting tcp dport 443 redirect to :3130 | ||
| + | =Änderungen in der /etc/squid/squid.conf= | ||
#transparenter Zugriff unverschlüsselt | #transparenter Zugriff unverschlüsselt | ||
http_port 3129 intercept | http_port 3129 intercept | ||
#transparenter Zugriff verschlüsselt '''wichtig https_port''' | #transparenter Zugriff verschlüsselt '''wichtig https_port''' | ||
| − | https_port 3130 ssl-bump intercept cert=/etc/squid/certs/squid_proxyCA.pem generate-host-certificates=on | + | https_port 3130 ssl-bump intercept cert=/etc/squid/certs/squid_proxyCA.pem generate-host-certificates=on options=NO_SSLv3,NO_TLSv1,NO_TLSv1_1,SINGLE_DH_USE,SINGLE_ECDH_USE |
| − | |||
ssl_bump bump all | ssl_bump bump all | ||
| Zeile 15: | Zeile 27: | ||
=Restart von Squid= | =Restart von Squid= | ||
*systemctl restart squid | *systemctl restart squid | ||
| + | =Wenn der Proxy auf einem anderen Host= | ||
| + | *[[Squid im Intercept-Modus nftables auf einem anderen Host]] | ||
Aktuelle Version vom 1. Juli 2025, 10:13 Uhr
Schaubild
Vorraussetzung
Firewall Regeln für den Transparenten Proxy
(iptables REDIRECT
- iptables -t nat -A PREROUTING -j REDIRECT -s 172.16.113.0/24 -p tcp --dport 80 --to-port 3129
- iptables -t nat -A PREROUTING -j REDIRECT -s 172.16.113.0/24 -p tcp --dport 443 --to-port 3130
(nftables REDIRECT)
- Tabelle und Kette anlegen
- nft add table ip nat
- nft add chain ip nat prerouting '{ type nat hook prerouting priority dstnat; policy accept; }'
- HTTP und HTTPS lokal umleiten
- nft add rule ip nat prerouting tcp dport 80 redirect to :3129
- nft add rule ip nat prerouting tcp dport 443 redirect to :3130
Änderungen in der /etc/squid/squid.conf
#transparenter Zugriff unverschlüsselt http_port 3129 intercept #transparenter Zugriff verschlüsselt wichtig https_port https_port 3130 ssl-bump intercept cert=/etc/squid/certs/squid_proxyCA.pem generate-host-certificates=on options=NO_SSLv3,NO_TLSv1,NO_TLSv1_1,SINGLE_DH_USE,SINGLE_ECDH_USE
ssl_bump bump all
Restart von Squid
- systemctl restart squid
