[Dnsmasq-discuss] writing a dhclient-exit-hooks script to manage dnsmasq

Olaf Westrik weizen_42 at ipcop-forum.de
Thu Jul 9 15:09:46 BST 2009

Rance Hall wrote:
>>> Then I need the script to do something strange, I want it to upload a
>>> file to my isp's webhosting account so that my public ip address is
>>> available via a simple grep of a downloaded .html file  I already know
>>> how to script an ftp session, so that part is easy.
>> A simpler solution might be to look at using dyndns.com or one of the other
>> dynamic DNS sites. They provide a script (or other tools) that will run on
>> your machine and update a DNS entry on their servers when your IP changes.
>> You then just use that name when you want to reference your machine from the
>> outside world
> Brad, I've tried this sort of setup and its been nothing but grief, my
> isp's dhcp server has a very long cache setup and it resupplies the
> same ip for quite some time, in fact my ip changed once in three
> months, and that was after a power outage that forced almost every
> client in town to get a new ip when the power came back up.
> when I try the dyndns type approach I keep getting emails from the
> system saying my account is going to be suspended due to inactivity.
> I either need to write a second script to force a dyndns update even
> if no ip address has changed, and maintain the script that comes with
> the service so I can get faster response when my ip does change.

Not that difficult to make a cronjob that forces a weekly update, for 
the case that your IP has not changed.

If the IP does change, you'd want to hook into your DHCP client and kick 
the dyndns update from there.
Roy Marples' new incarnation of dhcpcd is pretty cool for such stuff.



A weizen a day helps keep the doctor away.

More information about the Dnsmasq-discuss mailing list