From owner-freebsd-questions@FreeBSD.ORG Mon Oct 3 21:37:29 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E383E16A41F for ; Mon, 3 Oct 2005 21:37:28 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from wolf.pjkh.com (wolf.pjkh.com [66.228.196.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 875C043D46 for ; Mon, 3 Oct 2005 21:37:28 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id 798E21725E; Mon, 3 Oct 2005 14:37:24 -0700 (PDT) Received: from wolf.pjkh.com ([127.0.0.1]) by localhost (wolf.pjkh.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 98091-09; Mon, 3 Oct 2005 14:37:21 -0700 (PDT) Received: by wolf.pjkh.com (Postfix, from userid 1000) id 50C2B1725B; Mon, 3 Oct 2005 14:37:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id 4AD50170DE; Mon, 3 Oct 2005 14:37:21 -0700 (PDT) Date: Mon, 3 Oct 2005 14:37:21 -0700 (PDT) From: Philip Hallstrom To: Efren Bravo In-Reply-To: Message-ID: <20051003142927.I98788@wolf.pjkh.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at pjkh.com Cc: freebsd-questions@freebsd.org Subject: Re: pppd server help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 21:37:29 -0000 > I have only one modem, my doubt is how and where ppp or pppd are started? > The Handbook make references to scripts to manage them, but who launch > those scripts? > > I don't know if I make myself understand.... > > Thanks for your time....... This is what I did... hopefully I'm not forgetting anything... my box has three modems in it so there will be slight differences... we don't use this anymore, but my memory is that you could login as ppp (with a password) or any of the valid users (also with a password) and it the dialup host would appear to be "on the network". Hope this helps... I don't "start" ppp anywhere really... - install the mgetty port. I have mgetty-1.1.31. - set gateway_enable="YES" in /etc/rc.conf - at the end of /etc/ttys add: ttyd4 "/usr/local/sbin/mgetty -s 115200" dialup on insecure ttyd5 "/usr/local/sbin/mgetty -s 115200" dialup on insecure ttyd6 "/usr/local/sbin/mgetty -s 115200" dialup on insecure The first part will depend on what "COM" ports your modem gets picked up on. My /usr/local/etc/mgetty+sendfax/mgetty.config looks like this: -------------------------------------------------------------------------- port cuaa1 debug 9 fax-id 00 00 000000 speed 115200 direct NO blocking NO port-owner uucp port-group uucp port-mode 0660 toggle-dtr YES toggle-dtr-waittime 500 data-only YES fax-only NO modem-type auto init-chat "" ATS0=0Q0&D3&C1 OK modem-check-time 3600 rings 1 answer-chat "" ATA CONNECT \c \r answer-chat-timeout 80 autobauding NO ringback NO ringback-time 30 ignore-carrier false issue-file /etc/issue prompt-waittime 500 login-prompt @!login: login-time 240 diskspace 1024 notify faxadmin fax-owner uucp fax-group modem fax-mode 0660 -------------------------------------------------------------------------- - My /usr/local/etc/mgetty+sendfax/login.config looks like this: -------------------------------------------------------------------------- /AutoPPP/ - - /etc/ppp/AutoPPP.sh -------------------------------------------------------------------------- - /etc/ppp/AutoPPP.sh looks like this: -------------------------------------------------------------------------- #!/bin/sh exec /usr/sbin/ppp -direct $DEVICE -------------------------------------------------------------------------- - /etc/ppp/ppp.conf looks like this. Our office network is 10.28.61/24 btw. -------------------------------------------------------------------------- default: set device /dev/cuaa1 set log TCP/IP Chat Connect Phase Command Warnin Error Alert set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\TTIMEOUT 40 CONNECT" set timeout 120 disable ipv6cp enable passwdauth accept dns set dns 10.28.61.20 enable proxy allow users philip ttyd4: set ifaddr 10.28.61.51 10.28.61.52 ttyd5: set ifaddr 10.28.61.53 10.28.61.54 ttyd6: set ifaddr 10.28.61.55 10.28.61.56 -------------------------------------------------------------------------- - Then I have a ppp user that looks like this in /etc/passwd: ppp:*:1003:1003:PPP User:/local/home/ppp:/etc/ppp/ppp-shell.sh and /etc/ppp/ppp-shell.sh looks like this: -------------------------------------------------------------------------- #!/bin/sh IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'` CALLEDAS="$IDENT" TTY=`tty` if [ x$IDENT = xdialup ]; then IDENT=`basename $TTY` fi echo "PPP for $CALLEDAS on $TTY" echo "Starting PPP for $IDENT" exec /usr/sbin/ppp -direct $IDENT --------------------------------------------------------------------------