Date: Thu, 23 Mar 1995 06:43:49 -0800 (PST) From: bmk@dtr.com To: marcus@ccelab.iastat.edu Cc: questions@FreeBSD.org Subject: Setting up a PPP server. Message-ID: <199503231443.GAA07085@dtr.com> In-Reply-To: <199503230702.XAA24250@violet.berkeley.edu> from "Jordan K. Hubbard" at Mar 22, 95 11:02:51 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Sounds like your problem is that you need to properly configure your ports to handle dialin. After that you should be able to proceed with setting up a PPP server. I have recently set up a PPP server on FreeBSD 2.0, so I should be able to help you through most of it. It's not always obvious what you need to do, so I'll review the steps as I remember them. [ note - I am _not_ a UNIX guru... there may be (and likely are) better and more efficient ways of doing this. It works for me. YMMV. ] * Configure your ports. I use a script /etc/rc.serial, which is called by rc.local - this sets up the default configuration of my ports: |#!/bin/sh | |# port 0 is serial mouse | |# port d is 14.4 modem on private line |for port in d |do | stty -f /dev/cual0${port} crtscts speed 57600 cs8 -parenb > /dev/null | stty -f /dev/cuai0${port} crtscts speed 57600 cs8 -parenb > /dev/null | stty -f /dev/ttyld${port} crtscts speed 57600 cs8 -parenb > /dev/null | stty -f /dev/ttyid${port} crtscts speed 57600 cs8 -parenb > /dev/null |done | |# ports 1-c are 28.8 modems on main hunt group |for port in 1 2 3 4 5 6 7 8 9 a b c |do | stty -f /dev/cual0${port} crtscts speed 115200 cs8 -parenb > /dev/null | stty -f /dev/cuai0${port} crtscts speed 115200 cs8 -parenb > /dev/null | stty -f /dev/ttyld${port} crtscts speed 115200 cs8 -parenb > /dev/null | stty -f /dev/ttyid${port} crtscts speed 115200 cs8 -parenb > /dev/null |done * Add the ports to /etc/ttys with entries like the following: |ttydd "/usr/libexec/getty dial.57600" vt100 on dial.57600 corresponds to an entry in my /etc/gettytab. You won't have one unless you create it. Use whatever is approprate for your modems. Make sure you use ttyd* devices, _not_ tty0* or cua0*. * Configure your modems to auto-answer. If you are using Hayes compatible modems, use 'ATS0=1&W'. Your modems may require other configuration, but I can't help you with that unless I know what you have. In general, make sure your modem does RTS/CTS flow control, locks the baud rate, properly responds to DTR, and asserts CD properly. * Do a 'kill -HUP 1' to force init to re-read your /etc/ttys file and spawn new gettys. You should be able to dial in to your machine now. Try logging in and make sure that everything is working fine. Once that's working, you can set up your ppp server stuff. Your next steps will depend on whether or not you want to do dynamic or static address assignment. I assume that you'll probably want to do static - it's easiest, and since there's only two users it's probably best. (I have configured mine for dynamic allocation - I can help with that's what you want to do). Set up accounts for each PPP login. Set the shell to /usr/libexec/pppd. Set up system-wide options in /etc/ppp/options (refer to the pppd man page if you need help - if you can give me more details about what you want, I can give you more guidance. In the each home directory, set up a .ppprc that contains the local and remote IP address in the following format: local_ip:remote_ip. Use dotted quads. If you are not running routed or gated, you may need write a script so that your system will discover the routes. Don't run routed unless you have no other options. For the freebsd-questions people: If there's enough interest, I'd be willing to contribute my experience setting up dynamic IP allocation to a FAQ or HOWTO.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503231443.GAA07085>