Date: Fri, 23 Aug 2002 14:22:22 +0800 (CST) From: =?gb2312?q?=D6=BE=D2=A2=20=C0=EE?= <zhiyaoli@yahoo.com.cn> To: freebsd-questions@freebsd.org Subject: RE: Problems with my dial-in server Message-ID: <20020823062222.76407.qmail@web20205.mail.yahoo.com> In-Reply-To: <MIEPLLIBMLEEABPDBIEGKENHCIAA.barbish@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<pre> My FreeBSD Box is following: _____________ | | ethernet card | FreeBSD4.5|<================>Internet | | (static IP) +-----------+ Now my client needs dial-up to the box to get access to internet. _____________ Modem | | ethernet card client =======>| FreeBSD4.5|<==============>Internet dial-up | (gateway) | +-----------+ For the FreeBSD server, it doesn't need a dial-up configuration, and I have only one modem. Could you tell me how to setup this gateway. Or any ideas? In this situation, should I add the following lines to the rc.conf? ppp_enable="YES" ppp_mode="ddial" ppp_profile="dialisp" ppp_nat="YES" Or before ppp running, add natd_enable="YES" to running NAT instead of ppp_nat? The last line of /var/ppp.log says:Jul 12 14:54:18 mail ppp[166]: tun0: Warning: 10.0.0.2: Cannot determine ethernet address for proxy ARP It seems "enable proxy" has some problem. Best wishes! </pre> ------- JoeB <barbish@a1poweruser.com> > You are close to getting it correct, but instead of > me trying to debug your > configuration > here is my working ppp.conf with comments to set > user ppp dialout to isp and > on a second modem receive dialin from boxes using > straight connection or > callback to remote using predefined phone number or > remote entered callback > phone number depending on what is entered in the > ppp.secret file associated > with each user id. At the end is info on setup > config for isp callback. > > Hope this helps, have fun. > Joe > > > > > ############################################################################ > ## > # /etc/ppp/ppp.conf File for dial out modem to ISP > and Dial in modem for > # connection to this FBSD system. > # Written by Joe Barbish 12/10/2001 > # > # This is a working ppp.conf file I use to dial in > to my ISP and to connect > # my Win98 box by dialing in to this FBSD box and > accessing the internet. > # There are options in this ppp.conf file that I do > not use, But present > them > # here for you to turn on by un-commenting the > statements to meet your > needs. > # > # This ppp.conf documentation is based on a fresh > install of FBSD 4.6 with > # all file content as delivered with no user > changes. > # > # As of 1/6/2002 FBSD 4.6 does not work with > Winmodems. Winmodems are modems > # especially manufactured for the Microsoft Windows > market and do not have > # dial controllers so they are inexpensive. The dial > function is provided by > # driver software which gets installed in to > mswindows. A Winmodem driver > has > # been developed for Linux systems 4/2001 and was > ported to FBSD around > # 10/2001. To find info about the port search the > FBSD questions archives > # looking for subject = Lucent LT WinModem or ltmdm > or check out net/ltmdm > in > # the cvs ports section. > # > # NOTE Any FBSD documentation that says that the > physical modem has to have > # it's default options profile set to, NO command > echo ATE0 and NO results > # string ATQ1 and saved to the physical modems > onboard non-volatile memory > # (NVRAM) or any references to using programs tip, > kermit, mgetty, or > minicom > # to perform the dial function is obsolete and out > dated as of FBSD 4.0. > # > # Setup Instructions. > # Note steps 4 through 7 are only for dial in > setup. > # 2. Add gateway_enable="YES" to /etc/rc.conf so > dialin connection can gain > # access to internet. > # 3. Since a private internal IP address numbering > scheme is used for IP > # addresses behind this FBSD box the -nat option > must be included on the > # ppp command that starts the ppp task to dial > the ISP. > # NAT = Network Address Translation. Changes your > private internal IP > # address to your public IP address that you get > from your ISP for > # outbound messages and does the reverse for > inbound messages. > # From the command line example ppp -background > -nat dialisp > # 4. Using root create file /etc/ppp/ppplogin > # Create file ppplogin with following 2 > statements > # #! /bin/sh > # exec /usr/sbin/ppp -direct incoming > # > # incoming is the section label name in ppp.conf > to be processed when > # ppp is started by this script's exec command. > # > # This script will be launched by getty when it > detects a ppp dialin > # connection attempt. Program ppp belongs to > group network, so you have > to > # change file ppplogin group to network and it's > permissions to > read/write > # for the owner, read/execute for group, and none > for everyone else. > # chgrp network ppplogin assign file > ppplogin to group network > # chmod 650 ppplogin set > permissions > # 5. Change the default section of /etc/gettytab > file for automatic ppp > # recognition by specifying the pp capability. > Add following > # :pp=/etc/ppp/ppplogin: > # 6. Edit /etc/ttys to enable a getty on the port > where the dialin modem > # is attached. com2 = ttyd1 find statement > like this > # ttyd1 "/usr/libexec/getty std.38400" dialup off > secure > # Change off to on to activate. Verify line speed > is correct (std.38400) > # This value is defined in /etc/gettytab. After > saving edited results > # issue kill -1 1 command to spawn getty. Use ps > ax to show active tasks. > # 7. cp /usr/share/examples/ppp/ppp.secret.sample > /etc/ppp/ppp.secret > # Edit /etc/ppp/ppp.secret file adding the ID and > password for each user > # that is authorized to login to this FBSD box > using dialin modems. > # 8. TESTING Issue command ppp -background -nat > dialisp to test > configuration > # Use commands ps ax to see task list. ifconfig > -a to see if tun is > running > # netstat -ir to see routing. /var/log/ppp.log to > view ppp log events > # ps ax to get ppp -background task number & kill > -1 number to terminate. > # 9. Once you are done with testing, make functions > permanent. > # Dial ISP at FBSD bootup. Add following to > /etc/rc.conf file > # ppp_enable="YES" > # ppp_mode="ddial" > # ppp_profile="dialisp" > # ppp_nat="YES" > # > ############################################################################ > # > > default: > # The default section is processed ever time user > ppp is started. > # Ever thing set here applies to all the following > section. > > set log Phase Chat LCP IPCP CCP tun command #use > for testing > #set log Phase tun #use to > avoid excessive log > sizes > > > # If 115200 connection speed does not work (it > should work with any modem > newer > # that 1998) step down to 57600 or 38400 or 19200 > for legacy modems. > > set speed 115200 # connection speed > set timeout 0 # no idle time out, will not > disconnect > > disable pred1 deflate lqr # compression > features & line quality > reporting > deny pred1 deflate lqr # compression features & > line quality reporting > > dialisp: > # This label is used in the ppp -background -nat > dialisp startup > # command for auto logon to ISP provider. > > # Ensure that "device" references the correct > serial port > # for your modem. (cuaa0 = COM1, cuaa1 = COM2) > # Only needed for dial out device. > > _________________________________________________________ Do You Yahoo!? 新鲜到底,娱乐到家 - 雅虎推出免费娱乐电子周报! http://cn.ent.yahoo.com/newsletter/index.html 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?20020823062222.76407.qmail>