Ok stunnel4 is working. Will be included in future MacIPgw VM and MacIPpi
root@macipgw:~# systemctl stop stunnel4
root@macipgw:~# systemctl start stunnel4
root@macipgw:~# systemctl status stunnel4
● stunnel4.service - LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons)
Loaded: loaded (/etc/init.d/stunnel4; bad; vendor preset: enabled)
Active: active (running) since Sun 2017-01-22 01:34:40 CET; 2s ago
Docs: man:systemd-sysv-generator(
Process: 2797 ExecStop=/etc/init.d/stunnel4 stop (code=exited, status=0/SUCCESS)
Process: 2818 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS)
Tasks: 1
Memory: 736.0K
CPU: 70ms
CGroup: /system.slice/stunnel4.service
└─2836 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
Jan 22 01:34:40 macipgw systemd[1]: Starting LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons)...
Jan 22 01:34:40 macipgw stunnel[2834]: LOG5[ui]: stunnel 5.39 on i686-pc-linux-gnu platform
Jan 22 01:34:40 macipgw stunnel[2834]: LOG5[ui]: Compiled/running with OpenSSL 1.1.0c 10 Nov 2016
Jan 22 01:34:40 macipgw stunnel[2834]: LOG5[ui]: Threading
THREAD Sockets
OLL,IPv6,SYSTEMD TLS:ENGINE,FIPS,OCSP,PSK,SNI Auth:LIBWRAP
Jan 22 01:34:40 macipgw stunnel[2834]: LOG5[ui]: Reading configuration from file /etc/stunnel/stunnel.conf
Jan 22 01:34:40 macipgw stunnel[2834]: LOG5[ui]: UTF-8 byte order mark not detected
Jan 22 01:34:40 macipgw stunnel4[2818]: Starting TLS tunnels: /etc/stunnel/stunnel.conf: started (no pid=pidfile specified!)
Jan 22 01:34:40 macipgw systemd[1]: Started LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).
root@macipgw:~# netstat -ltpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 2836/stunnel4
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1175/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2836/stunnel4
tcp6 0 0 :::22 :::* LISTEN 1175/sshd
Also simple to install yourself:
To install/run STunnel on the Raspi:
install Stunnel: sudo apt-get install stunnel4
to edit stunnel config file (see below): sudo vim /etc/stunnel/stunnel.conf
run Stunnel: sudo stunnel4 /etc/stunnel/stunnel.conf
For Stunnel, here is the simple config file that you will need.
[POP]
client=yes
accept = 110
connect =pop.gmail.com:995
[sMTP]
client=yes
accept =25
connect = smtp.gmail.com:465
And don't forget to put
# Change to one to enable stunnel automatic startup
ENABLED=1
in /etc/default/stunnel4
then start:
systemctl start stunnel4
look at its status
systemctl status stunnel4
and see if its running
netstat -ltpn: