PPP Dial-in Server NOW WORKS
Stephen
sbachmann2 at comcast.net
Fri Jul 25 21:54:20 PDT 2003
First, thank you a million times over fbsd_user! This has been bugging
me for a LONG time. Quite kind of you to include all that information.
Following the advice below and with some additional info I am able to
dial in, although I haven't gotten to the routing stuff yet. Some
things I found that might be helpful to someone else:
I found the /etc/gettytab file had to specifically be as follows:
default:\
:pp=/etc/ppp/ppplogin:\
then the rest here......
In other words, adding the pp line to the end of the default section
didn't work for me.
My bare minimum /etc/ppp/ppp.conf file contains only:
default:
set log Phase Chat LCP IPCP CCP tun command
set speed 115200
set timeout 180
incoming:
allow users xxxx xxxx xxxx
enable chap #will use ppp.secret
set ifaddr 10.0.0.1 10.0.0.74 255.255.255.255
I also issued the following commands for my modem:
cu -l cuaa0 (use your appropriate number, cuaa1, etc)
ATZ
ATS0=1 (the 0 is zero, 1 tells modem to pick up on first ring)
AT&W
~.
And then:
ppp
ppp on yourcomputername > set device /dev/cuaa0
ppp on yourcomputername > set speed 115200
ppp on yourcomputername > term
AT
AT
~.
ppp on yourcomputername > quit
I discovered the necessary modem commands on the mailing lists while
googling. On to the the routing...
-Steve
On Thu, 2003-07-24 at 13:48, fbsd_user wrote:
> I had the same problem with the FBSD documentation when I set up
> dial in service to my FBSD box. But after writeing emails to the
> maintainer of user ppp I finally got a understanding of how it
> worked and got it working. I am post my ppp.conf file that has my
> notes about what has to be done.
>
> Notes. First of all, in the USA the fastest line connection you
> will be able to get is 33.5.K because you are using an analog voice
> line to connect the remote PC to the FBSD dial in service. 56k
> speeds can only be achieved by ISP's who use digital lines and that
> is not the case with your FBSD box. You will have to have a modem on
> FBSD for each concurrent dial in connection you want. All modems
> default to no auto answer on inbound calls so you have to use the
> FBSD 'TIP' command to connect to modem and them use the Hayes 'AT'
> commands to enable auto answer.
>
> Here is my ppp.conf file that contains notes about configuring dial
> in connection. Follow imbedded instruction to enable dial in
> connections.
>
> ####################################################################
> ##########
> # /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.
> #
> # For Nic to DSL configuration see www.daemonnews/200101/pppoe.html
> #
> # This ppp.conf documentation is based on a fresh install of FBSD
> 4.8 with
> # all file content as delivered with no user changes.
> #
> # 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 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.
> # 1. Recompile kernel and change pseudo-device tun 1 to tun 4
> # GENERIC kernel defaults to 1 and you need 1 tun device for each
> com port
> # 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.
>
> set device /dev/cuaa1
>
> # This dial string is needed for ISP's which use standard Unix
> style
> # login.
> #
> set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
> \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40
> CONNECT"
>
> # edit the next three lines and replace the values with
> # the values which have been assigned by your ISP.
> # Needed for Unix, chap, and Pap style logins.
>
> #set phone 1111111:2222222:3333333 # if first number busy try next
> number
> set phone 14408560045 # only use this phone number
> set authname barbishxxx
> set authkey jxb7x2
> set redial 10 4 # if busy redial 4 times with 10 second pause
>
> # get dynamic IP address from ISP.
> set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
>
>
> # set static IP address your ISP assigned to you.
> # s.s.s.s = your static IP address
> # g.g.g.g = IP of machine you connect to at ISP or default to
> 10.0.0.0/0
>
> # set ifaddr s.s.s.s g.g.g.g 255.255.255.255 0.0.0.0
>
> add default HISADDR # Add a (sticky) default route (Mandatory)
> enable dns # Gets the ISP's DNS IP address & places them
> # in resolv.conf for reference by FBSD box.
>
>
>
>
> incoming:
> # Configuration for dial in modem access to this FBSD system.
> # This label is used in ppp -direct incoming command
> # which is buried in script /etc/ppp/ppplogin that starts
> # the whole process of accepting the incoming call.
> # Enable passwdauth forces use of /etc/passwd file
> # instead of /etc/ppp/ppp.secret file for PAP only.
> # CHAP must use ppp.secret because ppp must have access to
> # unencrypted passwords. This is ok over dialin modem lines.
> # A unique IP address is assigned to the ttyd activated in the
> # /etc/ttys/ file from the internal Private IP pool range.
>
> # Every user that will be using PPP login must have there login ID
> # in the allow user command to authorize them to run ppp.
>
> allow users barbishxxx bob
>
> # SECURITY WARNING - It is VITAL that either pap or chap are
> enabled. If
> # one or the other is not, you are allowing anybody to establish an
> dialin
> # ppp session with your FBSD box using any ID/password. There is no
> # authentication being done on incoming ppp connections if pap or
> chap is not
> # enabled. SECURITY WARNING
>
> # enable passwdauth #force pap to use passwd file
> # enable chap
> enable pap # uses ppp.secret file
>
> accept dns # give dialin connection access to dns lookup
>
> # To get access to other machines on the LAN
> # enable proxy
>
> # Assign static IP address to this dialin line
> # 10.0.0.74 = static IP address for this dialin line
> # 10.0.0.1 = IP address of this FBSD box
>
> set ifaddr 10.0.0.1 10.0.0.74 255.255.255.255
>
> # If I had 4 modems connected to com1-com4 for dialin access and
> activated
> # ttyd0-ttyd3 in /etc/ttys file this ppp.conf section [incoming]
> will work
> # as is. Set ifaddr command assigns dynamic IP address from a range
> of
> # reserved IP address. 10.0.0.71 through 10.0.0.74 inclusive) is the
> # IP address pool reserved for dialin users.
>
> # set ifaddr 10.0.0.1 10.0.0.71-10.0.0.74 255.255.255.0
>
>
> # Activate microsoft callback feature triggered by callback phone
> # numbers configured in /etc/ppp/ppp.secret (the 5th field):
> #
> set callback cbcp
> set cbcp
> set log +cbcp
> set redial 3 1
> set device /dev/cuaa0 /dev/cuaa1
> # set speed 115200
> set speed 19200 # for 14.4 externel modem
>
> set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATZ
> OK-ATZ-OK \
> ATDT\\T TIMEOUT 60 CONNECT"
>
>
>
>
>
>
> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> [mailto:owner-freebsd-questions at freebsd.org]On Behalf Of
> keith at smmc.qld.edu.au
> Sent: Tuesday, July 22, 2003 11:04 PM
> To: sbachmann2 at comcast.net
> Cc: freebsd-questions at freebsd.org
> Subject: Re: PPP Dial-in Server
>
> Hi,
> not wanting to be too critical but I am with you. This section is
> written
> very poorly. It is not possible to disciminate what is needed and
> not
> easily since to do so I'd need to be expert and ...what am I reading
> the
> doc for?
> I am keen to see responses. I have asked this list on several
> occasions
> for help here but with no great success. Very unusual for the good
> people
> on this list. Maybe we ask too much?
> Keith
>
>
> > This involves a lot of info so perhaps some pithy writing will
> help.
> >
> > The related hardware:
> > -FreeBSD 4.8-stable computer with a 56K Best Data external modem
> and a
> > NIC to my LAN
> > -Windows 2000 computer with a 56K internal modem
> >
> > Goal:
> > Dial-in from the Windows box to the FreeBSD box from anywhere with
> a
> > phone line, be able to access my LAN, and get on the Internet
> through my
> > broadband connection
> >
> > I have:
> > -Followed the handbook section on serial communications Dial-in
> service
> > (17.4) up until programming the modem because I couldn't find the
> > correct commands
> > -Installed mgetty+sendfax since I couldn't program the modem
> myself.
> >
> > I can:
> > -Connect from the Windows computer when I choose to have a
> terminal
> > screen displayed.
> > -Log in at the prompt as if I was sitting right in front of the
> FreeBSD
> > box.
> >
> > I cannot log in without getting the terminal screen first under
> windows.
> > It says a PPP session couldn't be established because the remote
> > computer wasn't responding. It tells me to use the terminal
> window. I
> > went through all the 18.2 handbook info about setting up a User
> PPP
> > dial-in server but I'm really not sure what parts I need and what
> parts
> > I have to choose one thing over another and what parts I can skip.
> In
> > general I find the whole section confusing. I tried several times
> > working with all the various ppp config files but no go.
> >
> > Is it possible to do what I am trying to do? Would anybody care
> to
> > recommend a more clear version of what the handbook has? Do you
> > recommend I try to dial-up with another FreeBSD computer first
> before
> > trying to bring Windows into this? Thank you for taking the time
> to
> > read all this and for helping me out.
> >
> > -Steve
> >
> >
> >
> >
> >
> > _______________________________________________
> > freebsd-questions at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to
> > "freebsd-questions-unsubscribe at freebsd.org"
>
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list