How to start stunnel4 service directly after installation, without reboot

"Tu, Robin" <[email protected]> Wed, 15 Jan 2020 06:53:49 +0000
Newsgroups gmane.network.stunnel.user
Message-ID <[email protected]>
--===============6034668281757537360==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_E87C9109ED7E8A4A83153B169825F9354FEAF6A3MTKSMSXCH05digi_"

--_000_E87C9109ED7E8A4A83153B169825F9354FEAF6A3MTKSMSXCH05digi_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I'm testing openvpn over stunnel4 and I found a weird issue:  I have to res=
tart my Ubuntu 18.04 to be able to start the stunnel service.  Don't know w=
hy I couldn't start the service dicrectly by :
Systemctl start stunnel4

OS: Ubuntu 18.04
#>apt install stunnel4
and  generate a conf like this:
cert=3D/etc/stunnel/server.crt
key=3D/etc/stunnel/server.key
[openvpn-localhost]
accept =3D 8443
connect =3D 127.0.0.1:11000

Now start the service:
#>systemctl start stunnel4

#>systemctl status stunnel4
stunnel4.service - LSB: Start or stop stunnel 4.x (TLS tunnel for network d=
aemons)
   Loaded: loaded (/etc/init.d/stunnel4; generated)
   Active: active (exited) since Wed 2020-01-15 14:40:11 CST; 10min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/stunnel4.service

Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ systemd[1]: Starting LSB: Start or =
stop stunnel 4.x (TLS tunnel for network daemons)...
Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ stunnel4[3583]: TLS tunnels disable=
d, see /etc/default/stunnel4
Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ systemd[1]: Started LSB: Start or s=
top stunnel 4.x (TLS tunnel for network daemons).

Why it exited?  But after reboot, same command will just work.  Is it a bug=
?
I want to find a way to start it directly after installation. Please help!

Best Regards
Robin


--_000_E87C9109ED7E8A4A83153B169825F9354FEAF6A3MTKSMSXCH05digi_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">I&#8217;m testing openvpn over stunnel4 and I found =
a weird issue:&nbsp; I have to restart my Ubuntu 18.04 to be able to start =
the stunnel service. &nbsp;Don&#8217;t know why I couldn&#8217;t start the =
service dicrectly by :
<o:p></o:p></p>
<p class=3D"MsoNormal">Systemctl start stunnel4<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">OS: Ubuntu 18.04<o:p></o:p></p>
<p class=3D"MsoNormal">#&gt;apt install stunnel4<o:p></o:p></p>
<p class=3D"MsoNormal">and&nbsp; generate a conf like this:<o:p></o:p></p>
<p class=3D"MsoNormal">cert=3D/etc/stunnel/server.crt<o:p></o:p></p>
<p class=3D"MsoNormal">key=3D/etc/stunnel/server.key<o:p></o:p></p>
<p class=3D"MsoNormal">[openvpn-localhost]<o:p></o:p></p>
<p class=3D"MsoNormal">accept =3D 8443<o:p></o:p></p>
<p class=3D"MsoNormal">connect =3D 127.0.0.1:11000<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Now start the service:<o:p></o:p></p>
<p class=3D"MsoNormal">#&gt;systemctl start stunnel4<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">#&gt;systemctl status stunnel4<o:p></o:p></p>
<p class=3D"MsoNormal">stunnel4.service - LSB: Start or stop stunnel 4.x (T=
LS tunnel for network daemons)<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp; Loaded: loaded (/etc/init.d/stunnel4; g=
enerated)<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp; Active: active (exited) since Wed 2020-=
01-15 14:40:11 CST; 10min ago<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp; Docs: man:systemd-sysv-gene=
rator(8)<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; Tasks: 0 (limit: 4915)<o:p></o:p>=
</p>
<p class=3D"MsoNormal">&nbsp;&nbsp; CGroup: /system.slice/stunnel4.service<=
o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ systemd[1]: =
Starting LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons)...=
<o:p></o:p></p>
<p class=3D"MsoNormal">Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ stunnel4[358=
3]: TLS tunnels disabled, see /etc/default/stunnel4<o:p></o:p></p>
<p class=3D"MsoNormal">Jan 15 14:40:11 iZ8vb6j45u355dm236tpibZ systemd[1]: =
Started LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).<o:=
p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Why it exited?&nbsp; But after reboot, same command =
will just work. &nbsp;Is it a bug?<o:p></o:p></p>
<p class=3D"MsoNormal">I want to find a way to start it directly after inst=
allation. Please help!<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:justify;text-justify:inter-ideog=
raph"><span style=3D"font-size:10.5pt;font-family:DengXian">Best Regards<o:=
p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-align:justify;text-justify:inter-ideog=
raph"><span style=3D"font-size:10.5pt;font-family:&quot;Cambria&quot;,serif=
;color:#669900">Robin</span><span style=3D"font-size:10.5pt;font-family:Den=
gXian;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_E87C9109ED7E8A4A83153B169825F9354FEAF6A3MTKSMSXCH05digi_--

--===============6034668281757537360==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users

--===============6034668281757537360==--