Iptables mit Squid Transparenter Proxy: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 6: Zeile 6:
 
=Squid Eintrag=
 
=Squid Eintrag=
 
*cat /etc/squid/squid.conf
 
*cat /etc/squid/squid.conf
#intercept http
+
 
 
  http_port 8889
 
  http_port 8889
 
;Wichtig Wichtig https_port nicht http_port
 
;Wichtig Wichtig https_port nicht http_port

Version vom 8. August 2023, 14:27 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
http_port 8889
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