FreeBSD dialin server
Philip Hallstrom
freebsd at philip.pjkh.com
Thu Aug 18 16:47:54 GMT 2005
> 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
More information about the freebsd-questions
mailing list