Update IP with dyndns using curl
... / Update IP with dyndns usi...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Update IP with dyndns using curl

by
AlfredoV
Created on 2023-05-22 07:55:26 (edited on 2024-09-04 14:23:27) in DNS

How do I update my IP using curl and dynhost?

Hello everyone,
I have the following problem :

I would like to dynamically update my ip for 'mydomain.eu'
I therefore created a dynhost user+password login pair, set as:
$LOGIN=mydomain.eu-user
$PASSWORD= ************


I host my website on a local server. The website is reached fine, but sometimes my IP changes and I want to fix that.

I am then using the URL given by OVH documentation, and my curl request looks like this:
curl -m 5 -L --location-trusted --user "$LOGIN:$PASSWORD" "https://www.ovh.com/nic/update?system=dyndns&hostname=mydomain.eu&myip=234.567.89.12"
But I keep getting the error:


401 Unauthorized

Unauthorized


This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.




Apache Server at www.ovh.com Port 443


Has anybody got an idea what has changed in the curl command? It used to work perfectly well before in my script.
Now it does not work anymore.

Thanks if you can help somehow...