A C program to idle, and update ufw based on the IPv4 of a domain.
Wrote by AI, directed by Ty Clifford.
Use whatever DNS provider you wish. Set an "A" record to the IPv4 you want to be updated in the host's ufw.
gcc -o ipupdate ipupdate.cCreating the .service:
sudo nano /etc/systemd/system/ip-update-ufw.serviceInsert:
[Unit]
Description=UFW Updater Service
After=network.target
[Service]
ExecStart=/path/to/ip-update_ufw_service <domain>
Restart=always
User=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=update-ufw
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reloadEnable:
sudo systemctl enable ip-update-ufw.serviceStart:
sudo systemctl start ip-update-ufw.serviceStatus:
sudo systemctl status ip-update-ufw.serviceLogging/Debugging:
sudo journalctl -u ip-update-ufw.serviceSometimes old fashion programs/scripts are the best. Some things have become so bloated they either become useless, or become unfit for practical use when you're looking for simplicity.
Stay up to date on full blurbs at my blog.