PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Logging onto a dynamic IP address


Your Ad Here

Your Ad Here

On Fri, 03 Mar 2006 00:31:58 -0800, AN O'Nymous

Error in Kernel Compilation
hi Greetings, gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) Errors when compile dummy.c dummy.c:39: warning: `struct netdevice' declared inside parameter list dummy.c:39: warning: its scope is only this...

1) Make a script, say, getip to extract the ip address fromsbin-ifconfig:

#!-bin-bashsbin-ifconfig eth0 grep "inet addr" gawk -F ":" '{print $2}' gawk -F " " '{print $1}'

If you're behind a router, get the page that shows the ip address from the router, using wget, then grep-gawk-cut, etc.

2) Create a filetmp-.inetaddr containing nothing but the current address you have.

ab.cd.ef.gh

This must match precisely the output of getip. Note that extraneous blanks will produce a mismatch.

3) Make a script, say sendip, which will email your new ip address, if different from the old one:

#!-bin-bash ADDRESSFILE=-tmp-.inetaddr NEWIP=`getip`

if "$NEWIP" != "$OLDIP" then fi

4) Add a crontab entry (-etc-crontab) to check address change every 20 minutes or so:

*-20 * * * * root sendip

Needless to say, you must have sendmail configured, and that's a different topic. The tricky part with that is that by default sendmail is configured will probably not accept email from such addresses. You will have to masquarade your home machine as a fully qualified domain, such as that the email sent by your lone home computer comes from some real domain.



Your Ad Here

List | Previous | Next

Error in Kernel Compilation

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Help with mdadm raid5 after power failure