From owner-freebsd-questions Wed Jan 22 10:48:38 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 B107237B401 for ; Wed, 22 Jan 2003 10:48:35 -0800 (PST) Received: from smtp.a1poweruser.com (oh-chardon6a-34.clvhoh.adelphia.net [68.169.105.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7461243ED8 for ; Wed, 22 Jan 2003 10:48:34 -0800 (PST) (envelope-from barbish@a1poweruser.com) Received: from barbish (unknown [10.0.10.6]) by smtp.a1poweruser.com (Postfix) with SMTP id BD961AD for ; Wed, 22 Jan 2003 13:56:27 -0500 (EST) Reply-To: From: "JoeB" To: Subject: RE: PPP strangeness - hosed my /etc/hosts file Date: Wed, 22 Jan 2003 13:48:32 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20030122174911.GC95122@keyslapper.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal 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 Add this to ppp.conf disable iface-alias # Stop adding old IP addr as alias when ppp # redials because line was lost. These old ips # showed using ifconfig -a on tun0. iface clear # Remove all previous IP address -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Louis LeBlanc Sent: Wednesday, January 22, 2003 12:49 PM To: FreeBSD Questions Subject: PPP strangeness - hosed my /etc/hosts file 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message