Giving complete, step-by-step instructions for all of this would take too
long. Why not tell us where you are having problems so we can offer some
focused help? I'm giving you a general sketch below, but not a complete
explanation.

Basically, what you want to do breaks down into three pieces:

1. use mgetty to provide ppp service to another host that dials in one one
modem. 

2. use pppd to dial out to your ISP using a second modem. This should happen
when the incoming user successfully dials in.

3. use IP Masq to let the dial-in user connect out through the ISP.

Item #1 is, by itself, an off-the-shelf application of mgetty and pppd. One
way to do this is to use a standard mgetty process on the line, then have
the user's shell replaced by a script that does the ppp work. In this
approach, the mgetty line would look something like this (your system
specifics might require some changes):

s1:345:respawn:/sbin/mgetty /dev/modem /etc/ppp/conf.mgetty.ttyS1 vt100

The user's entry in /etc/passwd would look something like this:

pppuser1:password:509:507:somename:/home/pppuser1:/etc/ppp/ppplogin

The /etc/ppp/ppplogin script would look something like this:

#!/bin/sh
# ppplogin script
# this starts pppd on the incoming connection
/usr/sbin/pppd -detach passive modem proxyarp auth login +pap \ 
        192.168.86.23:192.168.86.42
# this starts pppd to dial out on the other connection
exec /usr/sbin/ppp-isp

Item #2 is, by itself, also an off-the shelf application of pppd. You can
find models for the /usr/sbin/ppp-isp script in the PPP HowTo (as ppp-on),
and you may have this script on your system as /usr/sbin/ppp-on .

To combine 1 & 2 (that is, to make the dial-out occur in response to a
dial-in), you need to use a script that (a) starts a pppd process for the
incoming call, then (b) starts a separate pppd process for the outgoing
call. I've tried to do this in the ppplogin script above, but as I've never
done it for real, I may have some details wrong. (Will the -detach flag in
the first pppd call cause the script to resume execution? Or is some other
trick needed?)

Step 3 is outside my expertise, but it sounds like a standard implementation
of IP Masq. Read the IP Masq HowTo.

You don't say what you have in mind for terminating the connections, so I've
skipped that part. You'll need to think about it, though, and about making
sure the conenction to the ISP persists (reconnects if dropped by the ISP).

At 04:13 PM 5/9/99 -0300, Bernie Somes wrote:
>Hi, I have a problem I am having trouble getting info on.
>I have a linuxbox running 2.0.36 w/ppp 2.3.4.
>
>I would like to set my box up so that uugetty/mgetty answers the incoming
>call and once the connection is established and the user logins in to
>have my box automatically dial-out to mu isp.  Also to have a ppp session
>between the dial-in and my isp using ipfwadm and ip_masquerading.
>
><please don't ask why as it is irrelevant>
>
>I am having troubling in setting this up.  I would appreciate any help.
>
>BTW, I have read the NAG, PPP man pages and PPP-HOWTO, but it didn't help
>me much.

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
762 Garland Drive
Palo Alto, CA  94303-3603
650.328.4219 voice                              [EMAIL PROTECTED]        
----------------------------------------------------------------


-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to