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: stunnel-users@stunnel.org Subject: [stunnel-users] Dynamic DNS patches" <stunnel-users.stunnel.org> From: Alastair via stunnel-users stunnel-users@stunnel.org Send reply to: alstar@maybenot.work
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 -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-leave@stunnel.org
+------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mikes@guam.net mailto:msetzerii@gmail.com mailto:msetzerii@gmx.com Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+
stunnel-users mailing list -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-leave@stunnel.org
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.