pppd on FreeBSD

[ Nob's Home | FreeBSD ]

I used FreeBSD box as PPP server for dialup.
In FreeBSD 4.2R, pppd is up to pppd-2.3.5 and some configuration must be changed.

First of all, I missed the initiation of serial line and wasted my time.
Edit /etc/rc.serial as below;

	stty < /dev/ttyid0 -hupcl -clocal 115200 crtscts
	stty < /dev/ttyd0  -hupcl -clocal 115200 crtscts
If you use ttyd1,ttyd2, and ttyd3, please add these lines.

Edit /etc/ppp/options and set options as below;

	192.168.3.1:
	netmask 255.255.255.248
	proxyarp
	silent
	crtscts
	115200
	modem
	+pap
	-chap
	login
	-detach

When with old pppd, this options could make authentication using /etc/passwd.
But with new pppd-2.3.5, /etc/ppp/pap-secrets must be present.
Edit /etc/ppp/pap-secrets as below;

*	*	""	*
Then
# chmod 400 /etc/ppp/pap-secrets
This /etc/ppp/pap-secrets file dose not mean anything.
All user can access to this server.
Real authentication depend on /etc/passwd by setting "login" option in /etc/ppp/options.
Edit /etc/ppp/options.ttyd0
:192.168.3.10

Edit /etc/ppp/options.ttyd1
:192.168.3.11

Edit /etc/ppp/options.ttyd2
:192.168.3.12

Edit /etc/ppp/options.ttyd3
:192.168.3.13

At last, edit /etc/ttys,

	
ttyd0   "/usr/sbin/pppd" dialup on
ttyd1   "/usr/sbin/pppd" dialup on
ttyd2   "/usr/sbin/pppd" dialup on
ttyd3   "/usr/sbin/pppd" dialup on
Then,
# kill -HUP 1( process number of init)
and pppd will be evoked directly.
[ Nob's Home | FreeBSD ]

nob@makioka.y-min.or.jp