David, thanks for the interesting example.
I think you misunderstood what the discussion was about however. What I
and, I think, Tim Coleman also wanted to do was dial different host to
allow the same routing.
ie. Although in my case one target is Work and another is a general ISP
there are times when I will choose to access the wider internet via my work
server. Your technique appears to only cater for internet traffic going via
your ISP OR work traffic going via work.
Since the routing will be determined on some arbitrary basis I cannpt setup
routing that says ALL work traffic should go through device X while ALL
other traffic should go through device Y which I think is the purpose of
your example. (correct me if I'm wrong).
What I am wanting to do is to change the host ends of my link but once the
link is up all routing and access will be the same regardless of the host.
By achieving this I aim to be able to CHOOSE which host to dial when the
kernel boots and then also to possibly be able to switch hosts even midway
through a connection.
OK. So you think I'm Scanny (thankyou Tad), so here's my rationale:
When I'm not present I want my wife to be able to start the gateway and
connect to the internet to do her shopping or chat to deviate males preying
on lonely house wives etc etc. Anyway ... I think it's best if she doesn't
connect through my employer's gateway. So in general it will boot to my
public ISP. However, often when I'm using the computer I will want to dial
via the office computer (except if I'm playing quake since we route
internally through so many modems and firewalls that the ping values sky
rocket ... but i digress ...). I choose to do this because a) I can still
browse the wider internet BUT b) I can access work servers also and c) It's
free and I find it easier to justifiy my abuse of my employer's resources
than my wife's.
NOW, at present if I want to connect via work I have to boot the PC and
then kill diald, change my diald.conf and change my pap-secrets file and
then restart diald OR since I use RedHat 6.1, enter interactive boot mode,
stop diald from loading then, edit the appropriate scripts and load diald.
OK well I had some discussion with Tim Coleman and I expect that in the
next week or two I will set up my gateway so that it does the following:
a) During boot prompt me for the diald host (if I choose to load diald at
all). It will do this by providing a list such as:
[Diald] Connect to:
[a] Public ISP
[b] Work ISP
Choice: (default = a) ?
b) It will wait n seconds for a response and then connect to the reponse OR
the default
c) The init script will then run diald using a different conf script
depending on the above response like this:
/usr/bin/diald -f /etc/diald.$dialdtarget # or something like that:
d) The conf script $dialdtarget will contain custom details for the
particular host. In particular:
i) Which chat script
ii) Which remotename value for pppd-options # This allows different
passwords for the same name in PAP
e) The other thing that will happen but is currently catered for in my
ip-up.local script and will remain there is that the firewall will come up
with or without masquerading depending on which host is dialled.
f) Whilst using my connection I may want to drop the connection and dial
the alternative host option for some unknown reason and so I will have a
mechanism in place either just running a script to kill diald and reconnect
by prompting for the target or maybe using diald control .... I haven't got
this far yet.
OK so this may seem weird and a whole lot of "silliness" but it fulfilles
my requirements and I suspect will fill other people's requirements also.
But if anyone has further suggestions I would be extremely pleased to hear
them.
Thanks for your comments David, your script will certainly be useful in
other contexts.
Wilson Fletcher
----------
From: David J. Picard[SMTP:[EMAIL PROTECTED]]
Sent: Friday, 3 March 2000 20:28
To: [EMAIL PROTECTED]
Subject: Re: dialing different hosts
Wilson,
I've seen alot of silliness going around on the list re selection of
which chat script etc to use and some stuff about interacting with the
pieces called from the diald init script. Just instantiate two diald
processes in the diald init script. Here's a copy of the script I used.
Set up the connect strings to your liking. I had the route for the
different networks by adding the routes to the appropriate tap
interfaces. I wanted two diald processes so I could open a connection to
work, the internet, or both at the same time without having to think
about it. This script worked (with the commented areas ini the start and
stop sections uncommented) for my multiple connections. You obviously
need to define the configuration for each connection.
David
Wilson Fletcher wrote:
>
> ----------
> From: Tim Coleman[SMTP:[EMAIL PROTECTED]]
> Sent: Friday, 3 March 2000 10:26
> To: Wilson Fletcher
> Subject: Re: dialing different hosts
>
> > I do now have work around for pap-secrets which is to use the
remotename
> > pppd option which forces a server name and thus ensures that pppd
chooses
> > the correct password from pap-secrets.
>
> Hmmm...I haven't seen the remotename option. That's interesting indeed.
>
> Well it's buried in that epic ... the pppd man page
>
> > /usr/bin/diald -f diald.$prefhost -- remotename $prefhost
>
> Wouldn't that be pppd-options $prefhost? Then again, you wouldn't
> need to use the remotename option on the command line. You would
> put it in the diald.$prefhost file. At least for simplicity it
> would.
>
> the double dash -- is the same as pppd-options but on the command line.
ie.
> diald <diald options here> -- <any pppd options here>
>
> And yes you're right the diald.$prefhost file would probably be the best
> place for the options.
>
> > Once I get this running then I'll be able to set a script entry that
will
> > switch between them even during sessions ... of course I might loose
the
> > odd packet in the process but what's a few packets between friends
(after
> > all I'm not controlling the space shuttle).
>
> If you set up the diald startup script to use an environment
> variable all you'd have to do is set it to the proper value and
> issue a restart.
>
> hmmm, is the environment variable likely to be set when the machine is
> starting ? ie. I have S10diald in /etc/rc.d/rc3.d since at the moment I
> like it to be started first so I can (on RedHat anyhow) press "i" to go
> interactive and then choose to not load it. Because it's first I can
choose
> y|n and then "c"ontinue everything else which means I don't have to sit
> there choosing yes|no for all options. (This may not make sense if you
> don't use RH, I'm not sure how the other distributions are configured).
>
> > Forgive the pseudo yuk I don't carry syntax in my head .... and my life
> > doesn't generally depend on bash.
>
> Mine does sometimes. I'm a sysadmin for the time being.
> But I much prefer perl.
>
> I have a lot of time for perl as a sys admin tool. Have you tried python
?
>
> BTW, I noticed that you're using a Microsoft e-mail client. That
> may be the reason why my messages looked funny when I PGP signed
> them. Now it should work properly, at least it does in Outlook.
> By properly I mean that the message is displayed, and the signature
> is listed as an attachment.
>
> Yes and what a pathetic piece of software it is too. Doesn't even let me
> use ">" on my replies.
>
> Forgive this but I'm experimenting and trying to get GPG working
> right with my MUA (mutt).
>
> No problem. I wasn't sure whether you knew what your email looked like to
> other clients which is why I mentioned it.
>
> regards,
>
> Wilson
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-diald" in
> the body of a message to [EMAIL PROTECTED]
--
David J. Picard
[EMAIL PROTECTED]<<File: diald.txt>>
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]