AdvancedTomato unknown error 401


#1

I started with ddclient for ddns but you changed things so it didn’t work anymore, I had a tomato router so I found a way to use that with a custom built url but last week it seemed to stop working and has “unknown error (401)”. I went to check the url with curl but when I click api I get a url… If someone could help that would be great.


#2

I guess I should do it myself… quick script for GNU to update every 10 mins, write a systemd service unit to execute on startup
zzzzzzzzz=your domain
xxxxxxxxxxxxx=zone id
yyyyyyyyyy=A record id
eeeeeeeeeeeeeeee=your email
kkkkkkkkkkkk=api key

#!/bin/bash
while true;
do
IP=$(curl ipinfo.io/ip)
NAME=zzzzzzzzz
curl -X PUT "https://api.cloudflare.com/client/v4/zones/xxxxxxxxxxxxx/dns_records/yyyyyyyyyy" \
     -H "X-Auth-Email: eeeeeeeeeeeeeeee" \
     -H "X-Auth-Key: kkkkkkkkkkkk" \
     -H "Content-Type: application/json" \
--data '{"type":"A","name":"'$NAME'","content":"'$IP'","ttl":120,"proxied":false}'
sleep 10m
done