From owner-freebsd-questions@FreeBSD.ORG Wed Jun 6 13:46:24 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70041106566B for ; Wed, 6 Jun 2012 13:46:24 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 285328FC14 for ; Wed, 6 Jun 2012 13:46:24 +0000 (UTC) Received: from [89.204.138.243] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1ScGYx-0001TP-Du for freebsd-questions@freebsd.org; Wed, 06 Jun 2012 15:46:15 +0200 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id q56DkCkq002208 for ; Wed, 6 Jun 2012 15:46:13 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id q56DkCPV002207 for freebsd-questions@freebsd.org; Wed, 6 Jun 2012 15:46:12 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Wed, 6 Jun 2012 15:46:11 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Message-ID: <20120606134611.GA2185@tiny> References: <1338973608.78319.YahooMailNeo@web162906.mail.bf1.yahoo.com> <20120606125125.GA2043@tiny> <20431.22651.888125.876852@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20431.22651.888125.876852@jerusalem.litteratus.org> X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.138.243 Subject: Re: IP -> e-mail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 13:46:24 -0000 El día Wednesday, June 06, 2012 a las 09:17:47AM -0400, Robert Huff escribió: > > Run this in a cronjob: > > > > lynx -dump myip.nl | fgrep 'WAN IP' > > > > strore the result in a file and when it changes, trigger a mail; > > Or, using only tools in the base system: > > ifconfig | head | grep "inet " | awk '{print $2}' This will not work if your host has some private addr which is NAT'ed by a router; the real test is ask some remote side "how I do apear to you?" ofc you could do this as well by SSH'ing to some side and asking with netstat(1) there (which may be shows another NAT'ed addr too :-)) Trust me, the above lynx is the nearly only robust version. matthias -- Matthias Apitz e - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5