From owner-freebsd-questions Wed Jan 22 9:49:21 2003 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 9B4EE37B401 for ; Wed, 22 Jan 2003 09:49:19 -0800 (PST) Received: from mail-relay1.mirrorimage.net (mail-relay1.mirrorimage.net [209.58.140.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBD9743F18 for ; Wed, 22 Jan 2003 09:49:18 -0800 (PST) (envelope-from leblanc@mirrorimage.net) Received: from leblanc.mirrorimage.net (leblanc.mirrorimage.net [209.192.210.146]) by mail-relay1.mirrorimage.net (8.9.3/8.9.3) with ESMTP id MAA27123 for ; Wed, 22 Jan 2003 12:49:13 -0500 Received: from leblanc.mirrorimage.net (localhost [127.0.0.1]) by leblanc.mirrorimage.net (8.12.3/8.11.4) with ESMTP id h0MHnCtk025850 for ; Wed, 22 Jan 2003 12:49:12 -0500 (EST) (envelope-from leblanc@leblanc.mirrorimage.net) Received: (from leblanc@localhost) by leblanc.mirrorimage.net (8.12.3/8.12.3/Submit) id h0MHnCas025849 for freebsd-questions@FreeBSD.org; Wed, 22 Jan 2003 12:49:12 -0500 (EST) Date: Wed, 22 Jan 2003 12:49:12 -0500 From: Louis LeBlanc To: FreeBSD Questions Subject: PPP strangeness - hosed my /etc/hosts file Message-ID: <20030122174911.GC95122@keyslapper.org> Reply-To: freebsd-questions@FreeBSD.org Mail-Followup-To: FreeBSD Questions Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.3i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hey all. I've been with Verizon DSL for 3 or 4 months now, and just when I think I'm getting things right, I start seeing some really screwy behavior. ifconfig shows the following for the PPP interface (tun0) tun0: flags=8051 mtu 1492 inet6 fe80::2a0:c9ff:fe74:12a3%tun0 prefixlen 64 scopeid 0x8 inet 68.160.2.89 --> 10.9.64.1 netmask 0xff000000 inet 68.160.25.67 --> 10.9.76.1 netmask 0xff000000 Opened by PID 67 The weird thing is that the first IP is not valid. I'm sure this is not supposed to be the case, but I don't know how I should fix it. My /etc/hosts and httpd.conf files were hosed because of it, so I'm going to have to figure out how to spot this problem in the scripts, and at least warn about it, if not fix it on the fly. My domain is served via zoneedit.com, and when a lookup is done of the domain, it shows the latter IP. Neither IP is pingable, but the machine is accessible via the IP in the zoneedit servers, and not the other. Is it normal for this to happen? There was a power cut last week, and I had to run some manual disk checks before everything came up again. Is there an easy way to simply release everything and restart ppp, regrab the IP, and with any luck, restrict it to a single IP? Right now, I'm grabbing the old and new IP addresses as follows: OLD_IPADDRESS=`cat /var/db/ppp.ip` if [ -n "${OLD_IPADDRESS}" ]; then echo "Old IP Address: ${OLD_IPADDRESS}" fi NEW_IPADDRESS=`/sbin/ifconfig tun0 | grep netmask | awk '{print $2}'` if [ -n "${NEW_IPADDRESS}" ]; then echo "New IP Address: ${NEW_IPADDRESS}" echo "Saving New Address" echo "${NEW_IPADDRESS}" > /var/db/ppp.ip fi if [ "${OLD_IPADDRESS}" != "${NEW_IPADDRESS}" ]; then . . . /var/db/ppp.ip had both IPs shown in the ifconfig output shown above, so I'm probably going to have to change that NEW_IPADDRESS= line to ensure I only get the last IP. But can I be sure the last one is always the right one? TIA Lou -- Louis LeBlanc leblanc@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Actual war is a very messy business. Very, very messy business. -- Kirk, "A Taste of Armageddon", stardate 3193.0 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message