1
General Discussion / Re: Problem with cloudflare DDNS
« on: April 22, 2024, 12:31:02 am »
This doesn't directly answer your question, but I've been running the below script for years and it has yet to fail me:
Code: [Select]
#!/usr/bin/env bash
IP="$(curl -s http://ipv4.icanhazip.com)"
curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID_GOES_HERE/dns_records/$RECORD_ID_GOES_HERE" -H "Authorization: Bearer $API_KEY_GOES_HERE" -H "Content-Type: application/json" --data '{"type":"A","name":"$DOMAIN_GOES_HERE","content":"'"$IP"'","proxied":false}' 1>/dev/null