Add this to ppp.conf

disable iface-alias    # Stop adding old IP addr as alias when ppp
                        # redials because line was lost. These old
                        # showed using  ifconfig -a   on tun0.

 iface clear            # Remove all previous IP address

-----Original Message-----
[mailto:[EMAIL PROTECTED]]On Behalf Of Louis
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: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
        inet6 fe80::2a0:c9ff:fe74:12a3%tun0 prefixlen 64 scopeid 0x8
        inet --> netmask 0xff000000
        inet --> 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.
/etc/hosts and httpd.conf files were hosed because of it, so I'm
to have to figure out how to spot this problem in the scripts, and
least warn about it, if not fix it on the fly.

My domain is served via, and when a lookup is done of
domain, it shows the latter IP.  Neither IP is pingable, but the
machine is accessible via the IP in the zoneedit servers, and not

Is it normal for this to happen?  There was a power cut last week,
I had to run some manual disk checks before everything came up

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}"

NEW_IPADDRESS=`/sbin/ifconfig tun0 | grep netmask | awk '{print
if [ -n "${NEW_IPADDRESS}" ]; then
  echo "New IP Address: ${NEW_IPADDRESS}"
  echo "Saving New Address"
  echo "${NEW_IPADDRESS}" > /var/db/ppp.ip

if [ "${OLD_IPADDRESS}" != "${NEW_IPADDRESS}" ]; then
. . .

/var/db/ppp.ip had both IPs shown in the ifconfig output shown
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?

Louis LeBlanc               [EMAIL PROTECTED]
Fully Funded Hobbyist, KeySlapper Extrordinaire :)                     ԿԬ

Actual war is a very messy business.  Very, very messy business.
    -- Kirk, "A Taste of Armageddon", stardate 3193.0

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to