From owner-freebsd-questions@FreeBSD.ORG Thu Aug 18 16:47:54 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 36B6C16A41F for ; Thu, 18 Aug 2005 16:47:54 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from zhonka1.zhonka.net (zhonka1.zhonka.net [66.228.195.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id D14DB43D48 for ; Thu, 18 Aug 2005 16:47:53 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from wolf.pjkh.com ([66.228.196.74]) by zhonka1.zhonka.net (Post.Office MTA v3.5.3 release 223 ID# 0-58414U4500L450S0V35) with ESMTP id net; Thu, 18 Aug 2005 09:47:52 -0700 Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id 4F4A4584D; Thu, 18 Aug 2005 09:47:48 -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 75473-08; Thu, 18 Aug 2005 09:47:48 -0700 (PDT) Received: by wolf.pjkh.com (Postfix, from userid 1000) id F2AD2584B; Thu, 18 Aug 2005 09:47:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id EC75F5849; Thu, 18 Aug 2005 09:47:47 -0700 (PDT) Date: Thu, 18 Aug 2005 09:47:47 -0700 (PDT) From: Philip Hallstrom To: RdBSD In-Reply-To: Message-ID: <20050818094103.N75982@wolf.pjkh.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at pjkh.com Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD dialin server 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: Thu, 18 Aug 2005 16:47:54 -0000 > I have freebsd 5.4 and i want to have dialin server. How can i > configure my freebsd as dialin server. I set up a 4.x box to do this for three modems awhile back and while I didn't write down how I did it, here's the various config files which I hope will help. Seems I never learn to write it down while I'm doing it :) - Installed mgetty+sendfax from ports. - /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 -------------------------------------------------------------------- - /usr/local/etc/mgetty+sendfax/login.config looks like this: -------------------------------------------------------------------- /AutoPPP/ - - /etc/ppp/AutoPPP.sh -------------------------------------------------------------------- - /etc/ttys has this addition (remember I have three internal PCI modems): -------------------------------------------------------------------- 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 /etc/ppp directory looks like this: -------------------------------------------------------------------- -rwxr-xr-x 1 root wheel 46 Apr 20 12:57 AutoPPP.sh* -rwxr-xr-x 1 root wheel 258 Apr 20 11:48 ppp-shell.sh* -rw-r--r-- 1 root wheel 486 Apr 21 10:22 ppp.conf -------------------------------------------------------------------- - AutoPPP.sh: -------------------------------------------------------------------- #!/bin/sh exec /usr/sbin/ppp -direct $DEVICE -------------------------------------------------------------------- - ppp-shell.sh: -------------------------------------------------------------------- #!/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 -------------------------------------------------------------------- - ppp.conf: -------------------------------------------------------------------- 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\\T TIMEOUT 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 -------------------------------------------------------------------- - I added gateway_enable="YES" to /etc/rc.conf - I also added a ppp user. Or maybe mgetty did. /etc/passwd line looks like this: -------------------------------------------------------------------- ppp:*:1003:1003:PPP User:/local/home/ppp:/etc/ppp/ppp-shell.sh -------------------------------------------------------------------- - I am pretty sure that the "allow users philip" line in ppp.conf was just from testing. I think that was all I did... Anyway, hope this helps you out... -philip