cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Updating dynamic IP address with curl

From: Csányi Pál <csanyipal_at_gmail.com>
Date: Mon, 24 Aug 2015 20:21:55 +0200

2015-08-24 20:06 GMT+02:00 Gisle Vanem <gvanem_at_yahoo.no>:
> Csányi Pál wrote:
>
>> I want to use following command with curl:
>>
>> http://[USERNAME]:[PASSWORD]@update.ipdns.hu/update?hostname=[DOMAIN]&myip=[IP]
>>
>> So the command could be eg.
>> curl -v
>> http://username-gmail-com:password@update.ipdns.hu/update?hostname=somename.ipdns.hu&myip=95.85.***.***
>>
>> My question is: can one use this command as a cron job to execute
>> every say 10 minutes but so so the current IP address of the eth0
>> network interface should be substituted automatically into this
>> command at ..myip=CurrentIPaddress?
>
>
> I don't know about cron, but you can put something like this in
> your ~./netrc:

Did you mean in my ~/.curlrc file?

> machine ipdns.no login username-gmail-com password
> password-for-update-ipdns.no
>
> to simplify that cmd-line.
>
> But the 'myip=CurrentIPaddress' should be your WAN-address, no?
> (not the "current IP address of the eth0"). How do you obtain that?

The eth0 NIC is the WAN interface. It get it's IP address from my ISP.
eth0 is connectoed to my cable modem and cable modem to my ISP.
eth0 gets it's IP address dynamically: it gets a dynamic IP address.

-- 
Best, Pali
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-24