>>
>>> with ppp connections you are not using a dhcp client, pppd gets the
>>> nameserver ip addressess as part of the connection negotiation (if
>>> peerdns is set) and the aforemetioned script in
>>> /etc/ppp/ip-up.d/40-dns.sh writes those to /etc/resolv.conf
This is at the top of /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
But according to /var/log/messages:
Mar 28 13:24:01 lumby pppd[16825]: primary DNS address 75.153.176.1
Mar 28 13:24:01 lumby pppd[16825]: secondary DNS address 75.153.176.9
But whatever is in resolv.conf is overwritten with blanks AFTER I
connect. Which creates this odd situation where I can ping numbers,
ie, 8.8.8.8 but not com, net, org etc.
Once I "connect" I have to echo the DNS addresses into resolv.conf
before I can reach anything.
Also, I notice whenever I set up a route to my router those numbers
get wiped. Is that the default behavio(u)r?. NB, I have nothing in the
way of services other than ppp configured at all. Maybe later after I
sort it all out I'll rig up something automatic.
Thanks for everybody's hlp
MW
ps: according to /etc/ppp/ip-up.d/40-dns.sh:
-------------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
# Handle resolv.conf generation when usepeerdns pppd option is being used.
# Used parameters and environment variables:
# $1 - interface name (e.g. ppp0)
# $USEPEERDNS - set if user specified usepeerdns
# $DNS1 and $DNS2 - DNS servers reported by peer
if [ "$USEPEERDNS" ]; then
if [ -x /sbin/resolvconf ]; then
{
echo "# Generated by ppp for $1"
[ -n "$DNS1" ] && echo "nameserver $DNS1"
[ -n "$DNS2" ] && echo "nameserver $DNS2"
} | /sbin/resolvconf -a "$1"
else
# add the server supplied DNS entries to /etc/resolv.conf
# (taken from debian's 0000usepeerdns)
# follow any symlink to find the real file
REALRESOLVCONF=$(readlink -f /etc/resolv.conf)
if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
# merge the new nameservers with the other options from
the old configuration
{
grep --invert-match '^nameserver[[:space:]]'
$REALRESOLVCONF
cat /etc/ppp/resolv.conf
} > $REALRESOLVCONF.tmp
# backup the old configuration and install the new one
cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
mv $REALRESOLVCONF.tmp $REALRESOLVCONF
# correct permissions
chmod 0644 /etc/resolv.conf
chown root:root /etc/resolv.conf
fi
fi
fi
--------------------------------------------------------------------------------------------------------------------------------
the software is aware of two resolv.confs, one under /etc/, one under
/etc/ppp. /etc/ppp/resolv.conf is correctly filled in, but the other
is wiped. Can anyone see why?
MW