From owner-freebsd-questions@FreeBSD.ORG Sun Aug 3 15:35:58 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D787E37B405 for ; Sun, 3 Aug 2003 15:35:58 -0700 (PDT) Received: from barryg.mi.celestial.com (dagney.celestial.com [192.136.111.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9058F43FCB for ; Sun, 3 Aug 2003 15:35:57 -0700 (PDT) (envelope-from bill@celestial.com) Received: by barryg.mi.celestial.com (Postfix, from userid 203) id CEB79639A6; Sun, 3 Aug 2003 15:35:56 -0700 (PDT) Date: Sun, 3 Aug 2003 15:35:56 -0700 From: Bill Campbell To: freebsd-questions@freebsd.org Message-ID: <20030803153556.A29205@barryg.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <20030803221318.GA13418@sylvester.dsj.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030803221318.GA13418@sylvester.dsj.net>; from deepbsd@earthlink.net on Sun, Aug 03, 2003 at 06:13:18PM -0400 Subject: Re: Finding your dynamic external IP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2003 22:35:59 -0000 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