Date: Wed, 22 Jan 2003 15:49:40 -0500 From: Louis LeBlanc <leblanc+freebsd@keyslapper.org> To: freebsd-questions@FreeBSD.org Subject: Re: PPP strangeness - hosed my /etc/hosts file Message-ID: <20030122204940.GF95122@keyslapper.org> In-Reply-To: <MIEPLLIBMLEEABPDBIEGCEDMDEAA.barbish@a1poweruser.com> References: <20030122174911.GC95122@keyslapper.org> <MIEPLLIBMLEEABPDBIEGCEDMDEAA.barbish@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks a lot. I found these in the manpage, and they look right. Is there a way to restart the ppp connection? I vaguely remember reading this somewhere, but I can't remember the details on what the correct steps are. Thanks again Lou On 01/22/03 01:48 PM, JoeB sat at the `puter and typed: > 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<UP,POINTOPOINT,RUNNING,MULTICAST> 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 > > -- Louis LeBlanc leblanc@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ A banker is a fellow who lends you his umbrella when the sun is shining and wants it back the minute it begins to rain. -- Mark Twain To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030122204940.GF95122>