Iptables mit Squid Transparenter Proxy: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 15: | Zeile 15: | ||
=Iptabels Kommando= | =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 80 --to 8888 | *iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 80 --to 8888 | ||
| − | |||
| − | |||
=SSL= | =SSL= | ||
Version vom 27. September 2022, 14:08 Uhr
Transparenter proxy
- Wenn man den http_port auf intercept 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 80 --to 8888
SSL
- Wenn man auch den SSL Verkehr umleiten will muss man noch ein paar andere Dinge tun.
- Squid https aufbrechen
- Squid und ClamAV
- Wenn der Squid sich auf der FIREWALL befindet steht
- iptables -t nat -A PREROUTING -j REDIRECT -i $LANDEV -p tcp --dport 443 --to 8888
- Wenn der Squid in der DMZ steht
- iptables -t nat -A PREROUTING -j DNAT -i $LANDEV -p tcp --dport 443 --to $SQUID:8888
