Iptables mit Squid Transparenter Proxy: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 12: | Zeile 12: | ||
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 | 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 | ||
| − | = | + | =Iptables Kommando= |
*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 80 --to 8889 | ||
*iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 443 --to 8888 | *iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 443 --to 8888 | ||
*iptables -A INPUT -p tcp --dport 8888 -s $LAN -m state --state NEW -j ACCEPT | *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 -A INPUT -p tcp --dport 8889 -s $LAN -m state --state NEW -j ACCEPT | ||
Version vom 13. Dezember 2022, 07:25 Uhr
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
- Wichtig Wichtig https_port nicht http_port
#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
Iptables Kommando
- 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
- 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
