Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 1.24 KB

README.md

File metadata and controls

66 lines (51 loc) · 1.24 KB

Dynamic-IP-Update

A C program to idle, and update ufw based on the IPv4 of a domain.

Wrote by AI, directed by Ty Clifford.

Setup

Use whatever DNS provider you wish. Set an "A" record to the IPv4 you want to be updated in the host's ufw.

Compile the Program

gcc -o ipupdate ipupdate.c

Creating the .service:

sudo nano /etc/systemd/system/ip-update-ufw.service

Insert:

[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.target
sudo systemctl daemon-reload

Enable:

sudo systemctl enable ip-update-ufw.service

Start:

sudo systemctl start ip-update-ufw.service

Status:

sudo systemctl status ip-update-ufw.service

Logging/Debugging:

sudo journalctl -u ip-update-ufw.service

Why?

Sometimes 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.