[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New ip-up (Was: Re: REQ ip-up: run-parts /etc/ppp/up )



In article <[🔎] Pine.LNX.3.96.971020183033.1041A-100000@citytelprct76.citytel.net>,
	jwalther@citytel.net (Manong Dibos) writes:
> 
>> 4) What about a host that has multiple ppp connections, are you going to
>>    change the hostname to the last one that has come up?  And, what is
>>    ppp-down going to do as the interfaces go down in random order?
> 
> You are right, this only covers the case of a single ppp interface.
> 
> Can anyone suggest correct behavior for multiple cases?


Well, if you want to change your hostname everytime a ppp session
comes up (in a multiple ppp setup) you sould set your hostname only to
the address at which you expect to get talk requests.  I think there
is not solution in a situation where you will get talk requests from
several interfaces with a changing hostname system.  talkd expects you
hostname to match the ip of the ip in the incoming request.  If joe
sends a talk to bill@123.456.789 then the hostname on bills machine
must match 123.456.789.  Setting you hostname to the DNS hostname of
123.456.789 is one solution.  Another is follows:

Here's what I do.  It is _not_ required that your hostname be set to
the name your ip resolves to.  For talk et al. to function, all that
is required is for the hostname you have chosen to match your internet
ip.  The way I do this is to modify /etc/hosts in ip-up and ip-down so
that my hostname's ip is my ppp ip when the net is up.  Here is what
my /etc/hosts looks like before and after a connection is made:

----------------------

When my link is down:

#
# For loopbacking.
127.0.0.1	localhost

#
# my hostname is only my dummy interface
192.168.1.1     hostname.blah.blah hostname

---------------------

When my link comes up:

#
# For loopbacking.
127.0.0.1	localhost

#
# now my hostname resolves to my internet address
144.92.181.200	hostname.blah.blah hostname
# 
# but still matches my dummy address too.
192.168.1.1	hostname.blah.blah hostname

----------------------

This is easily accomplished by having a file /etc/hosts.static that
has all unchanging entries in it.  Then in ip-up you do:

cat /etc/hosts.static > /etc/hosts
echo $4 hostname.blah.blah hostname >> /etc/hosts
echo 192.168.1.1 hostname.blah.blah hostname >> /etc/hosts

Then in ip-down:

cat /etc/hosts.static > /etc/hosts
echo 192.168.1.1 hostname.blah.blah hostname >> /etc/hosts

These can be modified easily for multiple ppp setups (just a little
more complex).

This allows you system to have a hostname that doesn't change, but it
allows talkd and other programs to work without trouble.

Good Luck,
Erv
-- 
Graduate Student                                edwalter@iname.com
Department of Chemistry                       walter@chem.wisc.edu
Univ of Wisconsin-Madison               edwalter@students.wisc.edu
       <PGP Public Key: finger walter@fozzie.chem.wisc.edu>


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: