DHCP client and DYnamic DNS service auto-updating

Darryl Clarke smartssa at gmail.com
Wed Feb 15 03:58:55 UTC 2006


On 14/02/06, Carthik Sharma <carthik at gmail.com> wrote:
> Hi Folks,
>
> I run a server at home, and would like to have a domain name assigned
> to it so I can access it from work. Since I havea dynamic IP, I use
> http://sh.nu to serve me as a dynamic dns server.
>
> I got a script from said website to enable me to auto-update the IP
> address whenever it changes. The perl script's README says:
>
> "Execute dyn.pl: perl dyn.pl, or chmod +x dyn.pl and ./dyn.pl. You can also
>    reference it in your /etc/dhcpc/dhcpcd-eth0.exe file (This probably varies by
>    distro...YMMV) for automatic update when your IP address changes.
> "
>
> However, since Ubuntu uses dhcp3, I cannot use the above instruction.
>
> Can some kind soul please guide a newbie in setting this script up so
> that whenver the IP address assigned to me by the dhcp router, the
> script (dyn.pl) can be called/executed by dhcp3's dhclient. I see some
> directory called dhclient-enter-hooks.d in /etc/dhcp3/ I suspect I
> will have to use a script placed here, but have no clue how to
> proceed.
>
> A google search yields nothing, either.

you can try putting a symlink to your updater (dyn.pl) in
/etc/dhcp3/dhclient-exit-hooks.d/

It should get executed when dhclient is finished getting your ip
address.  But, that may not be best if you have multiple dhcp
interfaces...

--
~ Darryl  ~ smartssa at gmail.com
~ http://darrylclarke.com




More information about the ubuntu-users mailing list