Date: Mon, 11 Jan 1999 10:57:17 +0100 From: Stefano Riva <sriva@alice.it> To: "Waqas Ahmad" <drwaqar@hotmail.com>, freebsd-questions@FreeBSD.ORG Subject: Re: freeBSD bos as a ppp server Message-ID: <3.0.5.32.19990111105717.00a06280@relay.alice.it> In-Reply-To: <199901110927.BAA07909@f12.hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 14.27 11/01/99 PKT, you wrote: >How to use a FreeBSD Box as a ppp server. Any help will be really >appreciated. The following is from a detailed e-mail by Michelle Brownsworth. She helped me a lot two years ago, when I had your same problem. It's about kernel ppp. --- (Note: I used COM2, instead of COM1, so make changes accordingly.) First, as a prelude to recompiling your kernel to support ppp, enable the ppp device in your kernel config file: /usr/src/sys/i386/conf/YOURKERNEL --------------------------------- pseudo-device ppp 1 Next, you need to tell your server to be a gateway: /etc/sysconfig -------------- gateway=YES You'll need to set up a config file: /etc/ppp/options ---------------- crtscts # Hardware flow control netmask 255.255.255.0 # netmask ( not required ) 206.100.174.68:206.100.174.69 # ip's of local and remote hosts # local ip must be different from one # you assigned to the ethernet ( or other ) # interface on your machine. # remote IP is ip address that will be # assigned to the remote machine domain ppp.primelogic.com # your domain #passive # wait for LCP modem # modem line Now configure the following three files, in conformance to your COM setup: /etc/gettytab ------------- # # Additions for a V.32bis or V.34 Modem # Starting at 57.6 Kbps # vm|VH300|Very High Speed Modem at 300,8-bit:\ :nx=VH57600:tc=std.300: vn|VH1200|Very High Speed Modem at 1200,8-bit:\ :nx=VH300:tc=std.1200: vo|VH2400|Very High Speed Modem at 2400,8-bit:\ :nx=VH1200:tc=std.2400: vp|VH9600|Very High Speed Modem at 9600,8-bit:\ :nx=VH2400:tc=std.9600: vq|VH57600|Very High Speed Modem at 57600,8-bit:\ :nx=VH9600:tc=std.57600: /etc/ttys --------- # Serial terminals ttyd1 "/usr/libexec/getty VH57600" dialup on secure /etc/rc.local ------------- # Set hardware (RTS/CTS) flow control for modem port COM2 stty -f /dev/ttyd1 crtscts The following script, which creates an entry for your PPP connection in the ARP tables, is called as part of the login process: /usr/local/bin/ppplogin ----------------------- #!/bin/sh /usr/bin/mesg n stty -tostop /usr/sbin/pppd proxyarp Finally, create a ppp user with a path to the above script, so the script can be exec'd instead of a shell: ppp:*:2000:2000:PPP Login User:/home/ppp:/usr/local/bin/ppplogin Your dialer program dials, logs in as userid ppp, issues the password, and the connection is established. The resulting process and routing info might be similar to the following: bash# ps ax | grep ppp 144 d1 Is+ 0:00.06 /bin/sh /usr/local/bin/ppplogin 237 d1 I+ 0:00.03 /usr/sbin/pppd proxyarp bash# w 11:27AM up 13 days, 20:04, 2 users, load averages: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE WHAT ppp d1 - Wed11PM 1day /usr/sbin/pppd proxyarp michelle p0 monalisa Thu08PM 14:28 su (bash) bash# netstat -nr | grep ppp Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 206.100.124.69 206.100.174.68 UH 3 637 ppp0 206.100.124.68 is the local IP; 206.100.124.69 the remote IP. This is set up in the /etc/ppp/options pppd config file above. As far as the configuration of the modems on each end, you're on your own. --- Stefano Riva Software Engineer - Systems Administrator Informazioni Editoriali I.E. Srl Phone +39-027528400, Fax +39-027528451 Email sriva@alice.it To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19990111105717.00a06280>