Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Runnng Stunnel On Bookworm fails

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
escape214
Posts: 9
Joined: 2021-02-19 04:17
Has thanked: 1 time

[Solved] Runnng Stunnel On Bookworm fails

#1 Post by escape214 »

I have been trying to run stunnel as a service via systemd and the service does not start. Starting stunnel via the command sudo stunnel4 is successful and so the config file seems to be perfectly fine. Whenever I try to start the service via systemd through the command
# systemctl start stunnel@telnet the service seems to start and immediately terminates journalctl seems to have these two entries

Feb 23 01:40:46 newcore systemd[1]: Started stunnel@telnet.service - TLS tunnel for network daemons - per-config-file service.
Feb 23 01:40:46 newcore systemd[1]: stunnel@telnet.service: Deactivated successfully.


And the # systemctl status stunnel@telnet gives the following output
stunnel@telnet.service - TLS tunnel for network daemons - per-config-file service
Loaded: loaded (/lib/systemd/system/stunnel@.service; disabled; preset: enabled)
Active: inactive (dead)
Docs: man:stunnel4(8)


The systemd file for stunnel is as follows

[Unit]
Description=TLS tunnel for network daemons - per-config-file service
Documentation=man:stunnel4(8)
PartOf=stunnel.target

[Service]
ExecStart=/usr/bin/stunnel4 /etc/stunnel/%i.conf
PrivateTmp=yes

[Install]
WantedBy=multi-user.target


Can anyone suggest what is the issue here. This is not system specific as I have the same behavior in multiple Debian 12 systems

Thanks

escape214
Posts: 9
Joined: 2021-02-19 04:17
Has thanked: 1 time

Re: [Solved] Runnng Stunnel On Bookworm fails

#2 Post by escape214 »

Immediately after posting this found out what the issue was
It appears that to run stunnel via systemd foreground=yes needs to be enabled in the configuration file,
Once that is added everything works like a charm

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: [Solved] Runnng Stunnel On Bookworm fails

#3 Post by Aki »

Hello,

Thanks for reporting back the solution.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply