Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2001 08:25:45 +1000
From:      "Doug Young" <dougy@bryden.apana.org.au>
To:        "Lanithium" <lanithium@dingoblue.net.au>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Dialup (PPP)
Message-ID:  <004a01c075d4$1ff8f5e0$847e03cb@apana.org.au>
References:  <000801c075b0$6bdccbe0$0200000a@lanithium.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0046_01C07627.EF737FE0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0047_01C07627.EF737FE0"


------=_NextPart_001_0047_01C07627.EF737FE0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

OK .....been there done that :) ...... wvdial was the only way I got ppp =
to work in debian=20
The source is available & I believe someone has successfully compiled it =
for FreeBSD.

The attached script is what I use to get ppp working in FreeBSD. There's =
probably heaps of more complicated methods but if I know of a simple, =
straightforward, reliable way to get something configured I tend to =
stick with it til something better comes along. There's a quite verbose =
explanation of the ins & outs of setting up user-ppp at =
http://troll.apana.org.au/~freebsd if you need more info.
  ----- Original Message -----=20
  From: Lanithium=20
  To: freebsd-questions@FreeBSD.ORG=20
  Sent: Thursday, January 04, 2001 4:10 AM
  Subject: Dialup (PPP)


  I've just changed to freebsd from slackware linux, and im having =
difficulty dialing up to the internet. On slackware i was using dialup =
software called "wvdial" and was wondering if there is a similar program =
to this for freebsd as i cant get wvdial to work on freebsd.
  I've tried using the 'chat' program that comes with freebsd, but have =
not been able to get it to connect properly..

  Any help would be greatly appreciated..

  Regards,

  Matthew Plews
  lanithium@dingoblue.net.au


------=_NextPart_001_0047_01C07627.EF737FE0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>OK .....been there done that :) ...... =
</FONT><FONT=20
face=3DArial size=3D2>wvdial was the only way I got ppp to work in=20
debian&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The source is available &amp; I believe =
someone has=20
successfully compiled it for FreeBSD.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The attached script is what I use to =
get ppp=20
working in FreeBSD. There's probably heaps of more complicated methods =
but if I=20
know of a simple, straightforward, reliable way to get something =
configured I=20
tend to stick with it til something better comes along. There's a quite =
verbose=20
explanation of the ins &amp; outs of setting up user-ppp at <A=20
href=3D"http://troll.apana.org.au/~freebsd">http://troll.apana.org.au/~fr=
eebsd</A>=20
if you need more info.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dlanithium@dingoblue.net.au=20
  href=3D"mailto:lanithium@dingoblue.net.au">Lanithium</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3Dfreebsd-questions@FreeBSD.ORG=20
  =
href=3D"mailto:freebsd-questions@FreeBSD.ORG">freebsd-questions@FreeBSD.O=
RG</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, January 04, =
2001 4:10=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Dialup (PPP)</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>I've just changed to freebsd from =
slackware=20
  linux, and im having difficulty dialing up to the internet. On =
slackware i was=20
  using dialup software called "wvdial" and was wondering if there is a =
similar=20
  program to this for freebsd as i cant get wvdial to work on=20
  freebsd.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I've tried using the 'chat' program =
that comes=20
  with freebsd, but have not been able to get it to connect=20
  properly..</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Any help would be greatly=20
  appreciated..</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Matthew Plews</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2><A=20
  =
href=3D"mailto:lanithium@dingoblue.net.au">lanithium@dingoblue.net.au</A>=
</FONT></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_001_0047_01C07627.EF737FE0--

------=_NextPart_000_0046_01C07627.EF737FE0
Content-Type: application/octet-stream;
	name="ppp_script.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="ppp_script.sh"

#!/bin/sh=0A=
# -*- sh -*-=0A=
=0A=
PATH=3D/usr/bin:/bin; export PATH=0A=
=0A=
#  ppp-setup  -- a script to automatically setup user ppp.=0A=
#  Most of the text in this script was derived from the FreeBSD Handbook.=0A=
#  Many thanks to Brian Somers for his input=0A=
=0A=
clear=0A=
=0A=
#  Check to see if we are root=0A=
ME=3D`whoami`=0A=
if [ ! "$ME" =3D "root" ]; then=0A=
	echo "Sorry, you must be root to run ppp-setup."=0A=
	exit 1=0A=
fi=0A=
=0A=
cat << EOS=0A=
  |----------------------------Unleash the =
Daemon---------------------------|=0A=
  |     -------------------------------------------------------------    =
   |=0A=
  |       PPP SETUP   06.23.98  *** The Easy Way to set up User PPP      =
   |=0A=
  |     -------------------------------------------------------------    =
   |=0A=
  |                                                                      =
   |=0A=
  |                         hacked by Mike Jackson                       =
   |=0A=
  |                                                                      =
   |=0A=
  |                              muck@ida.net                            =
   |=0A=
  |                                                                      =
   |=0A=
  |                      Tue Jun 23 13:43:23 MDT 1998                    =
   |=0A=
  |                                                                      =
   |=0A=
  |                    --------------------------------                  =
   |=0A=
  |                                                                      =
   |=0A=
  |                ****  ***   ****  ****  ***    ***  ***               =
   |=0A=
  |                *     *  *  *     *     *  *  *     *  *              =
   |=0A=
  |                ****  ***   ****  ****  ****   **   *  *              =
   |=0A=
  |                *     * *   *     *     *  *     *  *  *              =
   |=0A=
  |                *     *  *  ****  ****  ***   ***   ***               =
   |=0A=
  |                                                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |                       [ Press Enter to continue ]                    =
   |=0A=
  =
|________________________________________________________________________=
_|=0A=
EOS=0A=
=0A=
read tmp=0A=
=0A=
clear=0A=
=0A=
cat << EOS=0A=
  |----------------------------Unleash the =
Daemon---------------------------|=0A=
  |                                                                      =
   |=0A=
  |    This script automagically sets up user ppp for your particular    =
   |=0A=
  |    system's setup according to questions that you answer.  It will   =
   |=0A=
  |    then write the appropriate files in /etc/ppp/ for you so that     =
   |=0A=
  |    you can easily be on your way to dial up network connectivity.    =
   |=0A=
  |                                                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |                 The following files will be modified:                =
   | =0A=
  |                                                                      =
   |=0A=
  |    /etc/ppp/ppp.conf    Information about your ISP, modem, etc.      =
   |=0A=
  |    /etc/ppp/ppp.linkup  Used after a connection is established.      =
   |=0A=
  |    /etc/ppp/ppp.secret* Allows you to change ppp on the fly.         =
   |=0A=
  |    /etc/hosts           Contains the IP addresses of your machines.  =
   |=0A=
  |    /etc/host.conf       Instructions for the resolver.               =
   |=0A=
  |    /etc/resolv.conf     Tells the resolver how to behave.            =
   |=0A=
  |                                                                      =
   |=0A=
  |                         *Will not be written.                        =
   |=0A=
  |                                                                      =
   |=0A=
  |                       [ Press Enter to continue ]                    =
   |=0A=
  =
|________________________________________________________________________=
_|=0A=
EOS=0A=
=0A=
read tmp=0A=
=0A=
clear=0A=
=0A=
cat << EOS=0A=
  |----------------------------Unleash the =
Daemon---------------------------|=0A=
  |                                                                      =
   |=0A=
  |    Before you start, it is assumed you are roughly in this position: =
   |=0A=
  |                                                                      =
   |=0A=
  |  * You have an account with an ISP ,and your modem already =
configured.  |=0A=
  |                                                                      =
   |=0A=
  |  * You know your ISP's phone number(s).                              =
   |=0A=
  |                                                                      =
   |=0A=
  |  * You know your login name and password.                            =
   |=0A=
  |                                                                      =
   |=0A=
  |  * You know the IP address of your ISP's gateway.  If you don't know =
   |=0A=
  |    it, don't worry.  We can make one up.                             =
   |=0A=
  |                                                                      =
   |=0A=
  |  * Your ISP's netmask setting.  Again, if you don't know it, we can  =
   |=0A=
  |    safely use a netmask of 255.255.255.0.                            =
   |=0A=
  |                                                                      =
   |=0A=
  |  * The IP address of one or more nameservers.  You MUST have this!   =
   |=0A=
  |                                                                      =
   |=0A=
  |  * If your ISP has given you a static IP address, you will need to   =
   |=0A=
  |    have it handy.  If not, we can configure PPP to accept any IP     =
   |=0A=
  |    number.                                                           =
   |=0A=
  |                       [ Press Enter to continue ]                    =
   |=0A=
  =
|________________________________________________________________________=
_|=0A=
EOS=0A=
=0A=
read tmp=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|" =0A=
echo "  |                                                                =
         |"=0A=
echo "  |                          Enter your ISP's name.                =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "? $c"; read ISP_NAME=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                      Enter your ISP's Phone Number.            =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "? $c"; read ISP_PHONE=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                         Enter your login name.                 =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "? $c"; read ISP_UNAME=0A=
=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                          Enter your password.                  =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "? $c"; read ISP_PASSWD=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------PPP =
Configuration---------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |    Has your Internet Service Provider assigned you a gateway?  =
If       |"=0A=
echo "  |    you don't know your gateway, don't worry.  We can make one =
up        |"=0A=
echo "  |    and your ISP's server will tell us when we connect.         =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                           Do you have a gateway?               =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "y/n? $c"; read YES_NO=0A=
=0A=
clear=0A=
=0A=
if [ $YES_NO =3D "y" ];=0A=
   then =0A=
 	echo "  |-------------------------------Value =
Required----------------------------|"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  |                             Enter your gateway.               =
          |"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
	echo ""; echo $n "? $c"; read ISP_GATEWAY=0A=
    else=0A=
        ISP_GATEWAY=3D'10.0.0.2/0'=0A=
fi=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------PPP =
Configuration---------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |    Has your Internet Service Provider assigned you a netmask =
setting?   |"=0A=
echo "  |    If not, don't worry.  We can safely use 255.255.255.0       =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                       Do you have a netmask setting?           =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "y/n? $c"; read YES_NO=0A=
=0A=
clear=0A=
=0A=
if [ $YES_NO =3D "y" ];=0A=
   then=0A=
	echo "  |-------------------------------Value =
Required----------------------------|"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  |                         Enter your netmask setting.           =
          |"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
	echo ""; echo $n "? $c"; read ISP_NETMASK=0A=
    else=0A=
        ISP_NETMASK=3D'255.255.255.0'=0A=
fi=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------PPP =
Configuration---------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |    Does your ISP give you a static IP address?  If not, don't  =
         |"=0A=
echo "  |    worry.  We'll configure PPP to accept any IP number.        =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                      Do you have a static IP address?          =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "y/n? $c"; read STATIC_IP_YES_NO=0A=
=0A=
clear=0A=
=0A=
if [ $STATIC_IP_YES_NO =3D "y" ];=0A=
   then=0A=
   	echo "  |--------------------------------Value =
Required---------------------------|"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  |                     Please enter your static IP address.      =
          |"=0A=
	echo "  |                                                               =
          |"=0A=
	echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
	echo ""; echo $n "? $c"; read STATIC_IP=0A=
    else  =0A=
        STATIC_IP=3D'10.0.0.1/0'=0A=
fi=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                   Please Enter your ISP's nameservers.         =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "First Nameserver:  $c"; read ISP_DNS_ONE=0A=
echo ""; echo $n "Second Nameserver:  $c"; read ISP_DNS_TWO=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                       What port is your modem on?              =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |    [1] cuaa0  (COM 1)                            [3] cuaa2  =
(COM 3)     |"=0A=
echo "  |    [2] cuaa1  (COM 2)                            [4] cuaa3  =
(COM 4)     |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "? $c"; read PORT_NUM=0A=
=0A=
if [ $PORT_NUM =3D "1" ];=0A=
   then =0A=
      PORT_NUM=3D'cuaa0'=0A=
   elif [ $PORT_NUM =3D "2" ];=0A=
      then =0A=
         PORT_NUM=3D'cuaa1'=0A=
      elif [ $PORT_NUM =3D "3" ];=0A=
         then =0A=
            PORT_NUM=3D'cuaa2'=0A=
         else =0A=
            PORT_NUM=3D'cuaa3'=0A=
fi=0A=
=0A=
clear=0A=
=0A=
echo "  |-----------------------------Value =
Required------------------------------|"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |    Some ISP's set their system up so that the authentication =
part       |"=0A=
echo "  |    of your connection is done using either PAP or CHAP.  If =
this is     |"=0A=
echo "  |    the case, your ISP will not give a login: prompt when you =
connect,   |"=0A=
echo "  |    but will start talking PPP immediately.                     =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |         If you're not sure if your ISP uses PAP/CHAP, select =
no         |"=0A=
echo "  |         here.  You can always go back and edit =
/etc/ppp/ppp.conf        |"=0A=
echo "  |         with the command, run as root, \"ee =
/etc/ppp/ppp.conf\".          |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |         Consult the FreeBSD Handbook =
(www.freebsd.org/handbook)         |"=0A=
echo "  |         for further details.                                   =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  |                    Would you like to use PAP/CHAP?             =
         |"=0A=
echo "  |                                                                =
         |"=0A=
echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
echo ""; echo $n "y/n? $c"; read PAP_CHAP_YES_NO=0A=
=0A=
if [ $PAP_CHAP_YES_NO !=3D "y" ];=0A=
   then=0A=
      clear =0A=
=0A=
      echo "  |-----------------------------Value =
Required------------------------------|"=0A=
      echo "  |                                                          =
               |"=0A=
      echo "  |    Some ISP's will prompt you for a protocol.  If this =
is the case,     |"=0A=
      echo "  |    then a \"col: ppp\" will be appended to your login =
string in           |"=0A=
      echo "  |    /etc/ppp/ppp.conf.                                    =
               |"=0A=
      echo "  |                                                          =
               |"=0A=
      echo "  |        If you're not sure if your ISP will prompt you =
for a ppp         |"=0A=
      echo "  |        protocol, please select no here.                  =
               |"=0A=
      echo "  |                                                          =
               |"=0A=
      echo "  |        Consult the FreeBSD Handbook =
(www.freebsd.org/handbook)          |"=0A=
      echo "  |        for further details.                              =
               |"=0A=
      echo "  |                                                          =
               |"=0A=
      echo "  |                 Does your ISP prompt you for a protocol? =
               |"=0A=
      echo "  |                                                          =
               |"=0A=
      echo "  =
|________________________________________________________________________=
_|"=0A=
=0A=
      echo ""; echo $n "y/n? $c"; read PPP_PROMPT_YES_NO=0A=
fi=0A=
  =0A=
clear=0A=
=0A=
cat << EOS=0A=
  |--------------------------The Daemon's =
Unleashed-------------------------|=0A=
  |                                                                      =
   |=0A=
  |    Ok, now I'm going to write the following PPP related files:       =
   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/ppp/ppp.conf      This will contain your modem's port =
number,   |=0A=
  |                           the speed at which we'll talk to your =
modem,  |=0A=
  |                           the dial string, the login string, your =
ISP's |=0A=
  |                           phone number, your username and password,  =
   |=0A=
  |                           and your static IP address if you have =
one.   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/ppp/ppp.linkup    This will contain the lines delete ALL, =
and   |=0A=
  |                           add 0 0 HISADDR.  This will delete all of  =
   |=0A=
  |                           the existing routing tables for the tun    =
   |=0A=
  |                           device, and add a default route to your =
ISP's |=0A=
  |                           gateway.                                   =
   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/ppp/ppp.secret*   This will not be written, but it allows =
you   |=0A=
  |                           to change PPP on the fly.                  =
   |=0A=
  |                                                                      =
   |=0A=
  |                [ Press ctrl-c to cancel writing of files ]           =
   |=0A=
  |                                                                      =
   |=0A=
  |                        [ Press Enter to continue ]                   =
   |=0A=
  =
|________________________________________________________________________=
_|=0A=
EOS=0A=
=0A=
read tmp=0A=
=0A=
#  move the old files if they exist=0A=
=0A=
if [ ! -f /etc/ppp/ppp.conf ]=0A=
   then =0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/ppp/ppp.conf /etc/ppp/ppp.conf.old=0A=
fi=0A=
=0A=
=0A=
if [ ! -f /etc/ppp/ppp.linkup ]=0A=
   then =0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/ppp/ppp.linkup /etc/ppp/ppp.linkup.old=0A=
fi=0A=
=0A=
=0A=
if [ ! -f /etc/ppp/ppp.secret ] =0A=
   then =0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/ppp/ppp.secret /etc/ppp/ppp.secret.old=0A=
fi=0A=
=0A=
=0A=
if [ ! -f /etc/hosts ]=0A=
   then=0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/hosts /etc/hosts.old=0A=
fi=0A=
=0A=
=0A=
if [ ! -f /etc/host.conf ]=0A=
   then=0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/host.conf /etc/host.conf.old=0A=
fi=0A=
=0A=
=0A=
if [ ! -f /etc/resolv.conf ] =0A=
   then =0A=
        #doesn't exist, so do nothing=0A=
   else=0A=
        mv /etc/resolv.conf /etc/resolv.conf.old=0A=
fi=0A=
=0A=
=0A=
#  ppp.conf will now be written =0A=
echo "default:" >> /etc/ppp/ppp.conf=0A=
echo "  set log Phase Chat Connect Carrier lcp ipcp ccp command" >> =
/etc/ppp/ppp.conf=0A=
echo "  set device /dev/$PORT_NUM" >> /etc/ppp/ppp.conf=0A=
echo "  set speed 115200" >> /etc/ppp/ppp.conf=0A=
echo "  set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" =
ATE1Q0 OK-AT-OK \\\\dATDT\\\\T TIMEOUT 40 CONNECT\"" >> /etc/ppp/ppp.conf=0A=
echo "$ISP_NAME:" >> /etc/ppp/ppp.conf=0A=
echo "  set phone \"$ISP_PHONE\"        #Separate multiple phone numbers =
with a |" >> /etc/ppp/ppp.conf=0A=
=0A=
=0A=
#  does the user want to use PAP/CHAP?=0A=
if [ $PAP_CHAP_YES_NO =3D "y" ];=0A=
   then =0A=
        echo "  set login" >> /etc/ppp/ppp.conf=0A=
   elif [ $PPP_PROMPT_YES_NO =3D "y" ];=0A=
      then=0A=
         echo "  set login \"TIMEOUT 10 gin:-BREAK-gin: $ISP_UNAME word: =
$ISP_PASSWD col: ppp\"" >> /etc/ppp/ppp.conf =0A=
      else =0A=
         echo "  set login \"TIMEOUT 10 gin:-BREAK-gin: $ISP_UNAME word: =
$ISP_PASSWD\"" >> /etc/ppp/ppp.conf=0A=
fi=0A=
=0A=
echo "  set timeout 300            #Change to 0 if no timeout desired" =
>> /etc/ppp/ppp.conf=0A=
echo "  deny lqr" >> /etc/ppp/ppp.conf=0A=
=0A=
=0A=
#  does the user have a static IP address?=0A=
if [ $STATIC_IP_YES_NO =3D "y" ]; =0A=
   then =0A=
        echo "  set ifaddr $STATIC_IP $ISP_GATEWAY $ISP_NETMASK" >> =
/etc/ppp/ppp.conf=0A=
   else=0A=
        echo "  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0" >> =
/etc/ppp/ppp.conf=0A=
fi=0A=
=0A=
#  does the user want to use PAP/CHAP?=0A=
if [ $PAP_CHAP_YES_NO =3D "y" ];=0A=
   then =0A=
        echo "  set authname $ISP_UNAME" >> /etc/ppp/ppp.conf=0A=
        echo "  set authname $ISP_PASSWD" >> /etc/ppp/ppp.conf=0A=
fi=0A=
=0A=
#  ppp.linkup will now be written=0A=
echo "MYADDR:" >> /etc/ppp/ppp.linkup=0A=
echo "  delete ALL" >> /etc/ppp/ppp.linkup=0A=
echo "  add 0 0 HISADDR" >> /etc/ppp/ppp.linkup=0A=
=0A=
clear =0A=
=0A=
cat << EOS=0A=
  |--------------------------The Daemon's =
Unleashed-------------------------|=0A=
  |                                                                      =
   |=0A=
  |    I'll also write these files:                                      =
   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/hosts              This will contain the IP addresses and    =
   |=0A=
  |                            names of machines on your network.        =
   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/host.conf          This will instruct the resolver to look   =
   |=0A=
  |                            first in the hosts file, and then consult =
   |=0A=
  |                            the DNS if the name was not found.        =
   |=0A=
  |                                                                      =
   |=0A=
  |    /etc/resolv.conf        This tells the resolver how to behave.    =
   |=0A=
  |                                                                      =
   |=0A=
  |---------------[ Press ctrl-c to cancel writing of files =
]---------------|=0A=
  |                                                                      =
   |=0A=
  |    If you have any problems getting PPP set up, you may have to look =
   |=0A=
  |    at the FreeBSD Handbook at www.freebsd.org/handbook.  Or, you may =
   |=0A=
  |    want to see the FreeBSD FAQ at www.freebsd.org/FAQ.               =
   |=0A=
  |                                                                      =
   |=0A=
  |                Please send any comments to:  muck@ida.net.           =
   |=0A=
  |                                                                      =
   |=0A=
  |                       [ Press Enter to continue ]                    =
   |=0A=
  =
|________________________________________________________________________=
_|=0A=
EOS=0A=
=0A=
read tmp=0A=
=0A=
#  hosts will now be written=0A=
MYSYSTEM=3D`hostname -s`=0A=
MYDOMAIN_NAME=3D`hostname`=0A=
echo "127.0.0.1     localhost" >>/etc/hosts=0A=
echo "10.0.0.1      $MYDOMAIN_NAME		$MYSYSTEM"  >> /etc/hosts=0A=
=0A=
#  host.conf will now be written=0A=
echo "hosts" >> /etc/host.conf=0A=
echo "bind" >> /etc/host.conf=0A=
=0A=
#  resolv.conf will now be written=0A=
MYDOMAIN=3D`hostname`=0A=
echo "nameserver $ISP_DNS_ONE" >> /etc/resolv.conf=0A=
echo "nameserver $ISP_DNS_TWO" >> /etc/resolv.conf=0A=
echo "domain ${MYDOMAIN#*.}" >> /etc/resolv.conf=0A=
=0A=
clear=0A=
 =0A=
cat << EOS =0A=
                             The Daemon's Unleashed=0A=
=0A=
                        FreeBSD System Manager's Manual=0A=
=0A=
       NAME=0A=
            ppp - Point to Point Protocol=0A=
       SYNOPSIS=0A=
            ppp $ISP_NAME   - Will load the information for your ISP.=0A=
=0A=
            ppp ON $MYSYSTEM> dial    - Will dial and login to your ISP.=0A=
=0A=
=0A=
            If for some reason dialing fails, you can do it manually:=0A=
=0A=
            ppp ON $MYSYSTEM> term    - Gets you into terminal mode.=0A=
            Enter to terminal mode.=0A=
            Type '~?' for help.=0A=
            ATDT$ISP_PHONE            - Dials your ISP's number.=0A=
            Connect 38400          - Connection established.=0A=
            Login:=0A=
            Password:=0A=
            PPP ON $MYSYSTEM> Packet mode.=0A=
=0A=
                            [ Press Enter to exit ]=0A=
=0A=
EOS=0A=
=0A=
=0A=
read tmp=0A=
=0A=
clear=0A=
=0A=
exit 0=0A=
=0A=

------=_NextPart_000_0046_01C07627.EF737FE0--



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?004a01c075d4$1ff8f5e0$847e03cb>