Stunnel
Zur Navigation springen
Zur Suche springen
Vorraussetzung
- OpenSSL Zertifikate
From the Source
Installation
apt-get install stunnel4
Konfiguration
cp /usr/share/doc/stunnel-XXXX/examples/stunnel.conf-sample /etc/stunnel.conf vi /etc/stunnel/stunnel.conf
Beispiel-conf
debug = 7 options = NO_SSLv2 output = /var/log/stunnel.log cert = /etc/stunnel/XXXXX.crt key = /etc/stunnel/XXXXX.key CAfile = /etc/stunnel/XXXXX.crt [https] accept = 443 connect = $IP:80
So ist alles von $WAN zur Firewall auf Port 443 über SSL verschlüsselt und wird unverschlüsselt an $IP:80 weitergeleitet! (Proxy-Funktion, kein FORWARD erforderlich!)
Die Ports sind hier nur Beispiele!
Firewall
Eine Inputregel für die jeweiligen Ports muss erstellt werden. Ein Forward ist nicht notwendig, Proxy-Funktion!
iptables
iptables -A INPUT -j ACCEPT -p tcp --dport 443 -i $WAN -m state --state NEW
Starten
/etc/init.d/stunnel4 start
Check
netstat -lntp | grep stunnel