SOLVED! Dial-in PPP FreeBSD 5.3 (was Re: m'gettying closer! (was
Re: modem not responding to mgetty)
Timothy Luoma
lists at tntluoma.com
Mon Jan 10 22:19:56 PST 2005
With many thanks to the folks who helped, I am happy to announce that I
write this message from my own dialup connection to my own FreeBSD
machine!
Here the relevant configuration items. I'm using a standard 5.3
GENERIC kernel and my modem (an external serial port modem) is on sio0:
Most of the rest of this was taken/adapted from
http://packet.node.to/hacks/ppp-how-to.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ppp-
troubleshoot.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html
with an important note that FreeBSD5 doesn't have MAKEDEV but "devfs"
handles it automagically.
$ dmesg | grep "^sio"
sio0: <16550A-compatible COM port> port 0x3e8-0x3ef irq 4 flags 0x10 on
acpi0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
$ cat /etc/ppp/ppp-pap-dialup
#!/bin/sh
##echo "$0: exec /usr/sbin/ppp -direct pap$IDENT at `date`" >>
/tmp/ppp.pap.dialup.log
#
#
# uncomment the previous line to log the action. Mine looked like this
(without the ##)
#
## /etc/ppp/ppp-pap-dialup: exec /usr/sbin/ppp -direct pap at Mon Jan
10 23:44:13 EST 2005
exec /usr/sbin/ppp -direct pap$IDENT
# EOF
$ fgrep mgetty /etc/ttys
ttyd0 "/usr/local/sbin/mgetty -s 115200" dialup on secure
# NOTE /etc/ppp/ppp.conf:
# indentation is important
# I'm still not sure about the 'set ifaddr' lines are correct but they
work
# Our network uses 192.168.1.x
$ cat /etc/ppp/ppp.conf
default:
set device /dev/cuaa0
set log Phase Chat LCP IPCP CCP tun command
enable passwdauth
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
set ifaddr 192.168.1.1/0 192.168.1.2/0 255.255.255.0 0.0.0.0
add default HISADDR
cuaa0:
set ifaddr 192.168.1.3 192.168.1.4-192.168.1.9
enable passwdauth
allow users ppp
accept dns
set dns 67.36.13.26 66.73.20.40
enable proxy
pap:
enable pap
set ifaddr 192.168.1.3 192.168.1.4-192.168.1.9
enable proxy
enable passwdauth
$ fgrep ppp /etc/passwd
ppp:*:1003:1003:ppp:/home/ppp:/etc/ppp/ppp-dialup
$ cat /usr/local/etc/mgetty+sendfax/mgetty.config
# NOTE: Comment lines do NOT appear in the original file
port cuaa0
# ^^^^^^^^ this will depend on where your modem is hooked up
debug 4
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 "" AT OK
# ^^^ There are more elaborate init-chat strings, I went for simple
modem-check-time 3600
rings 1
# ^^^ answers after 1 ring, assumes dedicated line
answer-chat "" ATA CONNECT \c \r
answer-chat-timeout 30
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
# mgetty setup on FreeBSD will ask you for most of these, and I chose
the default for almost all of them
LOG FILES:
When diagnosing problems, check /var/log for ppp.log and mgetty.ttyd0
# What it looked like when I connected
#
# NOTE: this command was run on the CLIENT machine
$ ifconfig ppp0
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet6 fe80::20d:93ff:fead:26c8 prefixlen 64 scopeid 0x7
inet 192.168.1.7 --> 192.168.1.3 netmask 0xffffff00
If anyone has questions, I'll be glad to (try to) answer them
TjL
More information about the freebsd-questions
mailing list