Does this help.

serverfault.com/questions/567585


Regards

Stewart
[email protected]

On 18 February 2024 07:56:12 Alastair via stunnel-users <[email protected]> wrote:

On 2024-02-17 22:11, Michael D. Setzer II via stunnel-users wrote:
On 17 Feb 2024 at 19:35, Alastair via stunnel-users wrote:

Date sent:       Sat, 17 Feb 2024 19:35:17 -0800
To:             [email protected]
Subject:         [stunnel-users] Dynamic DNS
patches" <stunnel-users.stunnel.org>
From:           Alastair via stunnel-users
<[email protected]>
Send reply to:   [email protected]

Hi,

I'm running Stunnel on Linux. It needs to connect to a dynamic IP
address (by domain name). The DNS is updated automatically. I noticed
that the last time the address changed, Stunnel stopped working. A 
ping
from the machine produced the correct address but Stunnel was using 
the
old one.

Will a reload work?

When I've had that issue a systemctl restart stunnel has worked.
That assumes you linux is starting it via systemctl.
If you are starting it some other way, you would probable have to
kill the current stunnel process and then start it again.

Believe it caches the dns address, so that is why it doesn't catch
the change.

Options might be to use cron.hourly or cron.daily to restart the
stunnel. Issue would be that if having an active stunnel connection
going, might cause a problem?

Could probable have a script that checks the ip address to see if it
has changed and only have it do a restart if it changed?

Good Luck.



_______________________________________________
stunnel-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]


+------------------------------------------------------------+
Michael D. Setzer II - Computer Science Instructor (Retired)
mailto:[email protected]
mailto:[email protected]
mailto:[email protected]
Guam - Where America's Day Begins
G4L Disk Imaging Project maintainer
http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+



_______________________________________________
stunnel-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Thanks for the reply.

I'm glad to know a restart will take care of the problem. I wonder if a 
reload would suffice, which might avoid breaking any active connections.

I can write a script to check for changes in the IP address. That should 
work.

It would be nice if stunnel would automatically re-check the DNS 
periodically.
_______________________________________________
stunnel-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]