Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 2003 15:35:56 -0700
From:      Bill Campbell <freebsd@celestial.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Finding your dynamic external IP
Message-ID:  <20030803153556.A29205@barryg.mi.celestial.com>
In-Reply-To: <20030803221318.GA13418@sylvester.dsj.net>; from deepbsd@earthlink.net on Sun, Aug 03, 2003 at 06:13:18PM -0400
References:  <20030803221318.GA13418@sylvester.dsj.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 03, 2003 at 06:13:18PM -0400, David S. Jackson wrote:
>If your external IP number changes, as with DHCP, is there a way
>to find out what it currently is?  I was thinking you could keep
>BitchX logged into a chat channel and script a /dns yournick and
>email yourself the results from time to time.   
>
>How would you do it?

I set up an account on our Linux router/firewall that has a very simple C
program as its shell.  This program simply gets the SSHCLIENT environment
variable and returns it on stdout.  We have several customers on cable and
dynamic DSL connections so I have an hourly cron job that uses this to see
if their IP address has changed, then sends e-mail if it hss.

	ssh -l sshclient sshclient.celestial.com

Bill
--
INTERNET:   bill@Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``If the personal freedoms guaranteed by the Constitution inhibit the
government's ability to govern the people, we should look to limit those
guarantees.''
   -President Bill Clinton, August 12, 1993



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030803153556.A29205>