Mailinglist Archive: opensuse-security (359 mails)

< Previous Next >
RE: [suse-security] Weird scenario...
  • From: "Peer Stefan" <stefan.peer@xxxxxxxx>
  • Date: Wed, 9 Jul 2003 16:38:29 +0200
  • Message-id: <01B66D0A11EB3E439676C0EAA891D89F0EE643@xxxxxxxxxxxxxxx>
Hi Chris,
> From: chris001@xxxxxxxxxxxx [mailto:chris001@xxxxxxxxxxxx]
> Hi all!!
>
> Well I would like to thank you all for your replies regarding
> root2. I will
> think about what I am going to do about this.
>
> I would like to ask you another thing now. I have a linux-box
> that connects
> to the internet via modem. The ip that it gets is dynamic, ie
> it changes
> everytime it logs in.
> Can someone tell me a way to create something like an
> automated e-mail
> message that the server will send to me whenever it logs on
> and inform me of
> its local ip assigned from the ISP?

There is a directory called "/etc/sysconfig/network/if-up.d".
Place any script which should run whenever an interface goes
up in there (like firewall-startup, routing or whatever)

> This is a weird situation because I have to leave the city
> for a few weeks
> and I would like to be able to ssh to the server whenever it
> logs on the
> internet.

The little script

#!/bin/sh
/sbin/ifconfig <IF-NAME>|mail -s "Interface <IF-NAME> Up" your@xxxxxxxxxxxx

should do the trick.
>
> Can someone please help me with this??
>
> Thank you all again for your help!
> Regards
> Chris

cheers,
Stefan

< Previous Next >
This Thread
  • No further messages