From owner-freebsd-questions Mon Jan 11 01:58:00 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA09328 for freebsd-questions-outgoing; Mon, 11 Jan 1999 01:57:32 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dns.ie-online.it (dns.ie-online.it [194.133.148.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA09319 for ; Mon, 11 Jan 1999 01:57:29 -0800 (PST) (envelope-from sriva@alice.it) Received: from dns.ie-interna.it (host1.ie-online.it [194.133.148.10]) by dns.ie-online.it (8.8.8/8.8.8) with ESMTP id KAA29825; Mon, 11 Jan 1999 10:56:52 +0100 (CET) (envelope-from sriva@alice.it) Received: from stefano (stefano.ie-interna.it [192.168.0.33]) by dns.ie-interna.it (8.8.8/8.8.8) with SMTP id KAA01978; Mon, 11 Jan 1999 10:56:51 +0100 (CET) (envelope-from sriva@alice.it) Message-Id: <3.0.5.32.19990111105717.00a06280@relay.alice.it> X-Sender: riva@relay.alice.it X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 11 Jan 1999 10:57:17 +0100 To: "Waqas Ahmad" , freebsd-questions@FreeBSD.ORG From: Stefano Riva Subject: Re: freeBSD bos as a ppp server In-Reply-To: <199901110927.BAA07909@f12.hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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