From owner-freebsd-questions@FreeBSD.ORG Mon Jan 10 23:51:22 2005 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 3876A16A4CE for ; Mon, 10 Jan 2005 23:51:22 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id E326143D45 for ; Mon, 10 Jan 2005 23:51:20 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from bsdbox.farid-hajji.net (bsdbox [192.168.254.3]) by fw.farid-hajji.net (Postfix) with ESMTP id E49D44B8EE; Tue, 11 Jan 2005 00:51:57 +0100 (CET) Date: Tue, 11 Jan 2005 00:52:04 +0100 From: cpghost@cordula.ws To: Brian Davis Message-ID: <20050110235204.GC601@bsdbox.farid-hajji.net> References: <200501091438.59814.freebsdbeni@spymac.com> <20050110155202.06ffb1ed.brian_davis@cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050110155202.06ffb1ed.brian_davis@cox.net> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org cc: FreeBsdBeni Subject: Re: ip address behind router ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2005 23:51:22 -0000 On Mon, Jan 10, 2005 at 03:52:02PM -0600, Brian Davis wrote: > On Sun, 9 Jan 2005 14:38:56 +0100 > FreeBsdBeni wrote: > > > Hi, > > > > How do I find what ip address I'm really having ? > > My adsl modem/firewall gives me a dynamic private address : > > 192.168.1.101, which is what I see with an ifconfig. But how do I find > > the real (dynamic) address given to my modem by my provider ? > > I'm using 5.3-rel-p4. > > -- > > Beni. > > > > Try the traceroute command. The first IP address will be the > address of your modem. If I traceroute my ISP this is the output. > The 1st line contains the IP address of my cable modem. That doesn't work well if you use NAT, because traceroute works only in one direction (forward). With NAT you will see something like 1. internal address of your nat box/router (say: 192.168.1.1) 2. address of your NAT box' peer (the ISP router at the other end of the ADSL link, not your external address) 3. other addresses. The problem is that between 1 and 2, you won't see the external address of your NAT box (the one it got e.g. via DHCP). If you want to see that address, you'll have to perform the traceroute 'backwards'. That's what RR-Records in the ICMP protocol are for. % ping -R www.freebsd.org PING www.freebsd.org (216.136.204.117): 56 data bytes 64 bytes from 216.136.204.117: icmp_seq=0 ttl=53 time=235.246 ms RR: natbox.yourdomain.tld (a.b.c.d) upstream.yourprovider.tld (e.f.g.h) ... more addresses here ... Your external address would be a.b.c.d in the example above. e.f.g.h would be the 'other side' of your peer (isp) router (looking to ITS upstream router and away from you). Essentially, RR records are being seen from the destination (here: www.freebsd.org) rather than from the source. That's the only way to see the external address (a.b.c.d) of your NAT box. Cheers, -cpghost. -- Cordula's Web. http://www.cordula.ws/