Iptables mit Squid Transparenter Proxy
Version vom 28. September 2022, 06:02 Uhr von Thomas.will (Diskussion | Beiträge) (→Transparenter proxy)
Transparenter proxy
- Wenn man den http_port auf intercept für https auf https stellt kann er normal Anfragten nicht beantworten.
- Wenn man beides will sollte man die Interception auf einen anderen zusätlichen Port legen.
Squid Eintrag
- cat /etc/squid/squid.conf
#intercept http http_port 8889 intercept
#intercept https https_port 8888 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
Iptabels Kommando
- iptables -A INPUT -p tcp --dport 8888 -s $LAN -m state --state NEW -j ACCEPT
- iptables -A INPUT -p tcp --dport 8889 -s $LAN -m state --state NEW -j ACCEPT
- iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 80 --to 8889
- iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 443 --to 8888
