From owner-freebsd-questions Fri Apr 7 18:46:34 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hermes.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id 1787B37BBBE for ; Fri, 7 Apr 2000 18:46:32 -0700 (PDT) (envelope-from scott@avantgo.com) Received: from river.avantgo.com (river.avantgo.com [10.0.128.30]) by hermes.avantgo.com (Postfix) with ESMTP id E09A21D; Fri, 7 Apr 2000 18:46:30 -0700 (PDT) Received: (from scott@localhost) by river.avantgo.com (8.9.3/8.9.3) id SAA09337; Fri, 7 Apr 2000 18:46:33 -0700 Date: Fri, 7 Apr 2000 18:46:32 -0700 From: Scott Hess To: Kai Peters Cc: Bhishan Hemrajani , freebsd-questions@FreeBSD.ORG Subject: Re: Access to outbound if's IP address? Message-ID: <20000407184632.A9286@avantgo.com> References: <200004072301.e37N1Sl16053@cytosine.dhs.org> <002001bfa0e7$ac071ca0$6400a8c0@teamsoftech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3us In-Reply-To: <002001bfa0e7$ac071ca0$6400a8c0@teamsoftech.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Apr 07, 2000 at 04:19:06PM -0700, Kai Peters wrote: > > What's easiest to do, is have them go to one of your fbsd boxes http > > server, and then do a tail on the access_log. > > > > If you have apache installed, it should be: > > /usr/local/apahche/logs/access_log > > I had thought about something like that (equivalent to going to a site > like http://privacy.net/analyze) which would also give them their > current IP. > > Most of our sites don't run apache though; they are plain vanilla > gateways... I'm not sure you fully understood the response - they could go to _YOUR_ site, and run a cgi-bin script which simply spit back "Your external IP address is %%%%." In fact, such a script would be very very simple, something like: ---- snip ---- #!/bin/sh echo "Content-type: text/html" echo "" echo "Your IP address is $REMOTE_ADDR." ---- snip ---- I just dropped it into an Apache cgi-bin directory, and it worked first time off. Gussy it up with whatever HTML you want in there, and away you go. Later, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message