Ip Script ((free)) -

Make it executable and run:

0 * * * * /home/user/check-public-ip.sh For advanced needs (e.g., scanning your whole subnet), Python’s ipaddress module is a lifesaver. ip script

Add it to cron:

#!/bin/bash LOG_FILE="$HOME/ip_change.log" CURRENT_IP=$(curl -s ifconfig.me) LAST_IP=$(cat "$HOME/last_ip.txt" 2>/dev/null) Make it executable and run: 0 * *