The message said

"This sounds like a good idea, but I don't know how to impliment it"

So I expanded my thoughts a bit.

The dhcpcd solution is better, no question.  But if all you have is pump,
then this might work.  'course, my experience with pump is that when the IP
goes down, the card is down too, until you restart networking or the server
generally.

Kev.


----- Original Message -----
From: "Curtis Sloan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 4:53 PM
Subject: RE: (clug-talk) Dynamic DNS help?


> I don't want to put words in Kevin's mouth, but I think he was mostly just
> expanding on what was dug up from the archives earlier.  Is that right,
Kev?
> In that archived post, there was no DNS server to update.  ;-)  But, yes,
I
> think triggering a DNS update is what would happen next in your case,
> instead of firing an e-mail.
>
> The only thing I'm looking at right now (being a bit picky, but for good
> reasons) is the ability to pick up on a DHCP addy change when it happens
> instead of a cron job that is constantly checking your system's state.
The
> latter seems like wasted cycles to me, if the same functionality can occur
> in real-time instead.  I've done some more reading and dhcpcd appears to
> provide similar functionality to that described Richi Plana's archived
post
> (see bottom of e-mail).
>
> Here's some docs I found:
>
> "The information is stored as shell variable assignments, so the file can
be
> included in other scripts. For example, the file contains definitions for
> IPADDR, NETMASK, NETWORK, BROADCAST, GATEWAY, DOMAIN, and the DHCP server
> address, DHCPSIADDR.
>
> Because dhcpcd-eth0.exe is executed each time the IP address changes, the
> script file is a handy place from which to reexecute the firewall script."
>
> -from the Linux LAN & Internet Firewall Security FAQ - Appendix 5
>
> A little old, but seems on the money.
>
> Why all this is important:  providing it all falls into place, you should
be
> able to trigger dnsupdate or some other util and pass it the IPADDR
variable
> to send to Superreal.com's servers.  Then you'd be all done.  :-D
>
> I know there's one more step:  getting dnsupdate (or friends) to do the
> dirty business of updating your host record(s) on Superreal.com's
server(s).
> But I don't think that should be too hard, since you seem to have it
working
> manually enough to add your local network IP (192.168.0.x) in the past.
So,
> really, I don't think a solution is too far off.
>
> Curtis.
>
> -----Original Message-----
> From: Shawn Grover [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 4:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: (clug-talk) Dynamic DNS help?
>
>
> just out of curiosity, why would you fire off an email if the address
> changed?  Why not trigger another script that will modify the appropriate
> DSN database file, then restart the named service?  Wouldn't that make
your
> changes more dynamic, and efficient (i.e. no waiting for a human to do
> something).
>
> Just curious.
>
> Shawn
>
> -----Original Message-----
> From: Kevin Anderson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 4:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: (clug-talk) Dynamic DNS help?
>
>
> create the original file
>
> ifconfig eth0|grep inet > test
>
> then in the cronjob
>
> ifconfig eth0|grep inet > test1
>
> compare them
>
> diff test test1 > test2
>
> Someone better at scriptiong than me will have to correct this.
>
> if [ "cat test2" = "" ]; then
>     echo no change
> else
>     mail [EMAIL PROTECTED] < test2
>     rm -f test
>     cp test1 test
> fi
>
> from the top of my head.  Now as I indicated, I know for sure that the IF
> statement is wrong.  Either someone else will rewrite, or google will help
> you.
>
> That should work.
>
> :)
>
> And now you know why I don't write code.
>
> Kev.
>
>
>
>
> ----- Original Message -----
> From: "Jesse Kline" <[EMAIL PROTECTED]>
> To: "CLUG TALK" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 11, 2003 12:38 PM
> Subject: RE: (clug-talk) Dynamic DNS help?
>
>
> > On Tue, 2003-02-11 at 10:47, Curtis Sloan wrote:
> >
> > > Thus I poked around dhcpcd to see if it would let me know when it
> > > makes/receives a change in address (dhcpcd as an example, other DHCP
> clients
> > > exist).  If anyone knows a better tool/way, I'd love to hear it.
> >
> > Looking through my own personal archive I found some messages from back
> > in November when I was complaining that I couldn't ssh into my box
> > because my IP address had changed. Here are the responses that I got:
> > Kevin Anderson wrote:
> > "Create a cronjob that:
> >
> > writes your IP address to a file called current every hour.
> > Compare the contents of current with the contends of old.
> > if they are different, then mail [EMAIL PROTECTED] < current
> >     copy current over old
> > end
> >
> > Then create the original old file for yourself.
> >
> > Depending on how much you value SSH access, have it check hourly.
> >
> > Kev."
> > This sounds like a good idea. I'm not quite sure how to implement this,
> > but if the router has the public IP address then the cronjob could run
> > ifconfig and pull the IP, then it shouldn't be too hard to compare two
> > IP addresses and take action if they are different. I also got this
> > response from Richi Plana:
> > "Or, if you're using dhclient, modify the /sbin/dhclient-script script.
> > There's a section there that actually handles a change in IP address.
> > Just email the contents of $new_ip_address to your external mail
> > account."
> > This one may relate more directly to what you are trying to do.
> >
> > I hope this helps,
> >
> > Jesse
> >
> >
> >
>
>

Reply via email to