IMHO you are far better to use dyndns.org or the like. 

1, ipcop has no emailing facilities and should remain that way. its a
security thing.

2. ipcop has built in support for dyndns and other dynamic IP services.

if you really want to do it you either have to install some email
facilities on ipcop or do it from another box. 

1.  develop a simple script that gives the ip address on the ipcop box.
If ppp0 is your "outside" interface then 

ifconfig ppp0|grep inet|cut -d: -f2|cut -d" "  -f1

does it (and yes there are probably better ways)

2. now you can go to another machine and type"

ssh [EMAIL PROTECTED] -p 222 ifconfig ppp0|grep inet|cut -d: -f2|cut -d" "  -f1

you will be asked for the password for the root user on the ipcop
machine and will get back the ip address.

3. now if you want to automate that you can:

(a) set up a user on ipcop box that can execute the commands you need
and no more

(b) set up some authentication keys between your desktop and the ipcop
box so that it is not necessary to give the password each time 
http://clug.inode.co.nz/index.php/ssh

(c) run the ssh command above (with your new user instead of root) via
cron on the desktop, with the results piped to mail. it'll look
something like this:

ssh [EMAIL PROTECTED] -p 222 ifconfig ppp0|grep inet|cut -d: -f2|cut -d"
"-f1|mail [EMAIL PROTECTED] -s "IP Address as at `date`"

where ipgetter is the user you set up on the ipcop box, and
[EMAIL PROTECTED] is your email address.

BUT, as I said dynamic dns providers are much easier. then you can
simply type

host bgreer.dyndns.org

and get the answer.

:-)

On Mon, 29 Nov 2004 23:52:47 +1300
Brendan Greer <[EMAIL PROTECTED]> wrote:

> Hello
> 
> I remember it previously mentioned that some one had an ipcop box set up 
> to email its ip address (on the red side) when ever it came up and every 
> 10 minutes after that.
> 
> 
> I would like some pointers to get me started on setting something like 
> this up for my ipcop box.
> Please bear in mind that I have virtually no knowledge of scripting and 
> the linux command line.
> 
> I have googled this and the results did not help me. Though I didnt 
> really know where to start.
> 
> 
> Thanks
> 
> 
> Brendan

-- 
Nick Rout <[EMAIL PROTECTED]>

Reply via email to