Mailinglist Archive: opensuse (880 mails)

< Previous Next >
Re: [opensuse] ddclient error
  • From: "Carlos E. R." <carlos.e.r@xxxxxxxxxxxx>
  • Date: Wed, 28 Aug 2013 01:43:42 +0200 (CEST)
  • Message-id: <alpine.LNX.2.00.1308280125190.9215@minas-tirith.valinor>
Hash: SHA256

Content-ID: <alpine.LNX.2.00.1308280143130.9215@minas-tirith.valinor>

El 2013-08-28 a las 06:54 +0800, George Olson (SUSE list) escribió:
On 08/28/2013 06:02 AM, Carlos E. R. wrote:

You forgot to email to the list :-)

I have a trigger set on the router log; a script runs, and the IP is
logged. I could use it to trigger a dynamic dns update if I used the

That sounds like a great idea, but I wouldn't know how to set up a
router log or how to trigger it. Can you point me in the right direction
to figure that out?

I'm not at home, so I can't look up the details. The idea is as follows:

First, you configure the router to send the log to the computer. Many can do that, but some can not. If yours can't, then this can not be done.

You have to detect if the router logs a certain message when it loses the connection and reconnects, or if the IP changes. Some even write the new IP to the log, which is fantastic.

Then, you configure the syslog daemon to accept those messages and write them to a file. How to do that depends on which syslog daemon you have, because openSUSE has set different ones by default on each release.

Next step is to make the syslog daemon detect a certain message pattern on the log; this is normally quite easy. Typical actions are to save that entry to a file or not to; but you can also trigger a call to an external command: that's what we are looking for.

Well, the idea is precisely to trigger an script when the router sends the message that it is recovering the connection... if the message contains the IP, good; if not, a simple call to links to a certain web page that answers with the IP, and some trickery with sed, and you have the IP.

I can fill the details probably this Thursday.

And, in case this fails, have cron obtain the IP every... 8 hours? And at boot.

- -- Cheers
Carlos E. R.

(from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))
Version: GnuPG v2.0.16 (GNU/Linux)

< Previous Next >