svn commit: r40776 - projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/ppp-and-slip
Dru Lavigne
dru at FreeBSD.org
Mon Jan 28 14:42:16 UTC 2013
Author: dru
Date: Mon Jan 28 14:42:15 2013
New Revision: 40776
URL: http://svnweb.freebsd.org/changeset/doc/40776
Log:
White space fix only. Translators can ignore.
Approved by: gjb (mentor)
Modified:
projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml
==============================================================================
--- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml Mon Jan 28 05:09:12 2013 (r40775)
+++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.xml Mon Jan 28 14:42:15 2013 (r40776)
@@ -21,6 +21,7 @@
<sect1 id="ppp-and-slip-synopsis">
<title>Synopsis</title>
+
<indexterm id="ppp-ppp">
<primary>PPP</primary>
</indexterm>
@@ -29,10 +30,10 @@
</indexterm>
<para>FreeBSD has a number of ways to link one computer to
- another. To establish a network or Internet connection through a
- dial-up modem, or to allow others to do so through you, requires
- the use of PPP or SLIP. This chapter describes setting up
- these modem-based communication services in detail.</para>
+ another. To establish a network or Internet connection through
+ a dial-up modem, or to allow others to do so through you,
+ requires the use of PPP or SLIP. This chapter describes setting
+ up these modem-based communication services in detail.</para>
<para>After reading this chapter, you will know:</para>
@@ -50,7 +51,7 @@
<listitem>
<para>How to set up <acronym>PPPoA</acronym> (PPP over
ATM).</para>
- </listitem>
+ </listitem>
<listitem>
<para>How to configure and set up a SLIP client and
server (&os; 7.X only).</para>
@@ -82,21 +83,23 @@
</listitem>
</itemizedlist>
- <para>You may be wondering what the main difference is between user
- PPP and kernel PPP. The answer is simple: user PPP processes the
- inbound and outbound data in userland rather than in the kernel.
- This is expensive in terms of copying the data between the kernel
- and userland, but allows a far more feature-rich PPP implementation.
- User PPP uses the <devicename>tun</devicename> device to communicate
- with the outside world whereas kernel PPP uses the
+ <para>You may be wondering what the main difference is between
+ user PPP and kernel PPP. The answer is simple: user PPP
+ processes the inbound and outbound data in userland rather than
+ in the kernel. This is expensive in terms of copying the data
+ between the kernel and userland, but allows a far more
+ feature-rich PPP implementation. User PPP uses the
+ <devicename>tun</devicename> device to communicate with the
+ outside world whereas kernel PPP uses the
<devicename>ppp</devicename> device.</para>
<note>
<para>Throughout in this chapter, user PPP will simply be
- referred to as <application>ppp</application> unless a distinction
- needs to be made between it and any other PPP software such as
- <application>pppd</application> (&os; 7.X only). Unless otherwise stated, all of
- the commands explained in this chapter should be executed as
+ referred to as <application>ppp</application> unless a
+ distinction needs to be made between it and any other PPP
+ software such as <application>pppd</application>
+ (&os; 7.X only). Unless otherwise stated, all of the
+ commands explained in this chapter should be executed as
<username>root</username>.</para>
</note>
</sect1>
@@ -104,33 +107,33 @@
<sect1 id="userppp">
<sect1info>
<authorgroup>
- <author>
- <firstname>Tom</firstname>
- <surname>Rhodes</surname>
- <contrib>Updated and enhanced by </contrib>
- </author>
+ <author>
+ <firstname>Tom</firstname>
+ <surname>Rhodes</surname>
+ <contrib>Updated and enhanced by </contrib>
+ </author>
</authorgroup>
<authorgroup>
- <author>
- <firstname>Brian</firstname>
- <surname>Somers</surname>
+ <author>
+ <firstname>Brian</firstname>
+ <surname>Somers</surname>
<contrib>Originally contributed by </contrib>
- </author>
+ </author>
</authorgroup>
<authorgroup>
<author>
<firstname>Nik</firstname>
<surname>Clayton</surname>
<contrib>With input from </contrib>
- </author>
- <author>
+ </author>
+ <author>
<firstname>Dirk</firstname>
- <surname>Frömberg</surname>
- </author>
- <author>
- <firstname>Peter</firstname>
- <surname>Childs</surname>
- </author>
+ <surname>Frömberg</surname>
+ </author>
+ <author>
+ <firstname>Peter</firstname>
+ <surname>Childs</surname>
+ </author>
</authorgroup>
</sect1info>
@@ -164,14 +167,14 @@
<primary>PPP</primary>
</indexterm>
<listitem>
- <para>An account with an Internet Service Provider (ISP) which
- you connect to using PPP.</para>
+ <para>An account with an Internet Service Provider (ISP)
+ which you connect to using PPP.</para>
</listitem>
<listitem>
<para>A modem or
- other device connected to your system and properly configured
- to allow you to connect to your ISP.</para>
+ other device connected to your system and properly
+ configured to allow you to connect to your ISP.</para>
</listitem>
<listitem>
@@ -194,9 +197,9 @@
<indexterm id="ppp-password">
<primary>password</primary>
</indexterm>
- <para>Your login name and password. (Either a
- regular &unix; style login and password pair, or a PAP or CHAP
- login and password pair).</para>
+ <para>Your login name and password. (Either a
+ regular &unix; style login and password pair, or a PAP
+ or CHAP login and password pair).</para>
</listitem>
<listitem>
@@ -205,26 +208,27 @@
</indexterm>
<para>The IP address of one or more name servers.
- Normally, you will be given two IP addresses by your ISP to
- use for this. If they have not given you at least one, then
- you can use the <command>enable dns</command> command in
- <filename>ppp.conf</filename> and
- <application>ppp</application> will set the name servers for
- you. This feature depends on your ISPs PPP implementation
- supporting DNS negotiation.</para>
+ Normally, you will be given two IP addresses by your
+ ISP to use for this. If they have not given you at
+ least one, then you can use the <command>enable
+ dns</command> command in <filename>ppp.conf</filename>
+ and <application>ppp</application> will set the name
+ servers for you. This feature depends on your ISPs
+ PPP implementation supporting DNS negotiation.</para>
</listitem>
</itemizedlist>
- <para>The following information may be supplied by your ISP, but
- is not completely necessary:</para>
+ <para>The following information may be supplied by your ISP,
+ but is not completely necessary:</para>
<itemizedlist>
<listitem>
- <para>The IP address of your ISP's gateway. The gateway is
- the machine to which you will connect and will be set up as
- your <emphasis>default route</emphasis>. If you do not have
- this information, we can make one up and your ISP's PPP
- server will tell us the correct value when we connect.</para>
+ <para>The IP address of your ISP's gateway. The gateway
+ is the machine to which you will connect and will be
+ set up as your <emphasis>default route</emphasis>. If
+ you do not have this information, we can make one up
+ and your ISP's PPP server will tell us the correct value
+ when we connect.</para>
<para>This IP number is referred to as
<literal>HISADDR</literal> by
@@ -234,7 +238,7 @@
<listitem>
<para>The netmask you should use. If your ISP has not
provided you with one, you can safely use <hostid
- role="netmask">255.255.255.255</hostid>.</para>
+ role="netmask">255.255.255.255</hostid>.</para>
</listitem>
<listitem>
@@ -242,28 +246,30 @@
<primary>static IP address</primary>
</indexterm>
- <para>If your ISP provides you with a static IP address and
- hostname, you can enter it. Otherwise, we simply let the
- peer assign whatever IP address it sees fit.</para>
+ <para>If your ISP provides you with a static IP address
+ and hostname, you can enter it. Otherwise, we simply
+ let the peer assign whatever IP address it sees
+ fit.</para>
</listitem>
</itemizedlist>
- <para>If you do not have any of the required information, contact
- your ISP.</para>
+ <para>If you do not have any of the required information,
+ contact your ISP.</para>
<note>
<para>Throughout this section, many of the examples showing
the contents of configuration files are numbered by line.
These numbers serve to aid in the presentation and
- discussion only and are not meant to be placed in the actual
- file. Proper indentation with tab and space characters is
- also important.</para>
+ discussion only and are not meant to be placed in the
+ actual file. Proper indentation with tab and space
+ characters is also important.</para>
</note>
</sect3>
<sect3>
- <title>Automatic <application>PPP</application> Configuration</title>
+ <title>Automatic <application>PPP</application>
+ Configuration</title>
<indexterm>
<primary>PPP</primary>
@@ -271,17 +277,19 @@
</indexterm>
<para>Both <command>ppp</command> and <command>pppd</command>
- (the kernel level implementation of PPP, &os; 7.X only) use the configuration
- files located in the <filename class="directory">/etc/ppp</filename> directory.
- Examples for user ppp can be found in
- <filename class="directory">/usr/share/examples/ppp/</filename>.</para>
-
- <para>Configuring <command>ppp</command> requires that you edit a
- number of files, depending on your requirements. What you put
- in them depends to some extent on whether your ISP allocates IP
- addresses statically (i.e., you get given one IP address, and
- always use that one) or dynamically (i.e., your IP address
- changes each time you connect to your ISP).</para>
+ (the kernel level implementation of PPP, &os; 7.X only)
+ use the configuration files located in the <filename
+ class="directory">/etc/ppp</filename> directory.
+ Examples for user ppp can be found in <filename
+ class="directory">/usr/share/examples/ppp/</filename>.</para>
+
+ <para>Configuring <command>ppp</command> requires that you
+ edit a number of files, depending on your requirements.
+ What you put in them depends to some extent on whether your
+ ISP allocates IP addresses statically (i.e., you get given
+ one IP address, and always use that one) or dynamically
+ (i.e., your IP address changes each time you connect to
+ your ISP).</para>
<sect4 id="userppp-staticIP">
<title>PPP and Static IP Addresses</title>
@@ -292,14 +300,14 @@
</indexterm>
<para>You will need to edit the
- <filename>/etc/ppp/ppp.conf</filename> configuration file. It
- should look similar to the example below.</para>
+ <filename>/etc/ppp/ppp.conf</filename> configuration file.
+ It should look similar to the example below.</para>
<note>
<para>Lines that end in a <literal>:</literal> start in
- the first column (beginning of the line)— all other
- lines should be indented as shown using spaces or
- tabs.</para>
+ the first column (beginning of the line)— all
+ other lines should be indented as shown using spaces
+ or tabs.</para>
</note>
<programlisting>1 default:
@@ -327,7 +335,8 @@
<listitem>
<para>Identifies the default entry. Commands in this
- entry are executed automatically when ppp is run.</para>
+ entry are executed automatically when ppp is
+ run.</para>
</listitem>
</varlistentry>
@@ -335,13 +344,14 @@
<term>Line 2:</term>
<listitem>
- <para>Enables logging parameters. When the configuration
- is working satisfactorily, this line should be reduced
- to saying:</para>
+ <para>Enables logging parameters. When the
+ configuration is working satisfactorily, this line
+ should be reduced to saying:</para>
- <programlisting>set log phase tun</programlisting>
+ <programlisting>set log phase tun</programlisting>
- <para>in order to avoid excessive log file sizes.</para>
+ <para>in order to avoid excessive log file
+ sizes.</para>
</listitem>
</varlistentry>
@@ -350,10 +360,11 @@
<listitem>
<para>Tells PPP how to identify itself to the peer.
- PPP identifies itself to the peer if it has any trouble
- negotiating and setting up the link, providing information
- that the peers administrator may find useful when
- investigating such problems.</para>
+ PPP identifies itself to the peer if it has any
+ trouble negotiating and setting up the link,
+ providing information that the peers administrator
+ may find useful when investigating such
+ problems.</para>
</listitem>
</varlistentry>
@@ -366,7 +377,8 @@
<filename class="devicefile">/dev/cuau0</filename>
and
<devicename>COM2</devicename> is
- <filename class="devicefile">/dev/cuau1</filename>.</para>
+ <filename
+ class="devicefile">/dev/cuau1</filename>.</para>
</listitem>
</varlistentry>
@@ -374,9 +386,9 @@
<term>Line 5:</term>
<listitem>
- <para>Sets the speed you want to connect at. If 115200
- does not work (it should with any reasonably new modem),
- try 38400 instead.</para>
+ <para>Sets the speed you want to connect at. If
+ 115200 does not work (it should with any reasonably
+ new modem), try 38400 instead.</para>
</listitem>
</varlistentry>
@@ -390,14 +402,15 @@
</indexterm>
<para>The dial string. User PPP uses an expect-send
- syntax similar to the &man.chat.8; program. Refer to
- the manual page for information on the features of this
- language.</para>
-
- <para>Note that this command continues onto the next line
- for readability. Any command in
- <filename>ppp.conf</filename> may do this if the last
- character on the line is a <literal>\</literal> character.</para>
+ syntax similar to the &man.chat.8; program. Refer
+ to the manual page for information on the features
+ of this language.</para>
+
+ <para>Note that this command continues onto the next
+ line for readability. Any command in
+ <filename>ppp.conf</filename> may do this if the
+ last character on the line is a <literal>\</literal>
+ character.</para>
</listitem>
</varlistentry>
@@ -406,7 +419,8 @@
<listitem>
<para>Sets the idle timeout for the link. 180 seconds
- is the default, so this line is purely cosmetic.</para>
+ is the default, so this line is purely
+ cosmetic.</para>
</listitem>
</varlistentry>
@@ -415,8 +429,8 @@
<listitem>
<para>Tells PPP to ask the peer to confirm the local
- resolver settings. If you run a local name server, this
- line should be commented out or removed.</para>
+ resolver settings. If you run a local name server,
+ this line should be commented out or removed.</para>
</listitem>
</varlistentry>
@@ -424,8 +438,8 @@
<term>Line 10:</term>
<listitem>
- <para>A blank line for readability. Blank lines are ignored
- by PPP.</para>
+ <para>A blank line for readability. Blank lines are
+ ignored by PPP.</para>
</listitem>
</varlistentry>
@@ -435,9 +449,10 @@
<listitem>
<para>Identifies an entry for a provider called
<quote>provider</quote>. This could be changed
- to the name of your <acronym>ISP</acronym> so
- that later you can use the <option>load <replaceable>ISP</replaceable></option>
- to start the connection.</para>
+ to the name of your <acronym>ISP</acronym> so
+ that later you can use the <option>load
+ <replaceable>ISP</replaceable></option> to start
+ the connection.</para>
</listitem>
</varlistentry>
@@ -445,21 +460,22 @@
<term>Line 12:</term>
<listitem>
- <para>Sets the phone number for this provider. Multiple
- phone numbers may be specified using the colon
- (<literal>:</literal>) or pipe character
- (<literal>|</literal>) as a separator. The difference
- between the two separators is described in &man.ppp.8;.
- To summarize, if you want to rotate through the numbers,
- use a colon. If you want to always attempt to dial the
- first number first and only use the other numbers if the
- first number fails, use the pipe character. Always
- quote the entire set of phone numbers as shown.</para>
-
- <para>You must enclose the phone number in quotation marks
- (<literal>"</literal>) if there is any intention on using
- spaces in the phone number. This can cause a simple, yet
- subtle error.</para>
+ <para>Sets the phone number for this provider.
+ Multiple phone numbers may be specified using the
+ colon (<literal>:</literal>) or pipe character
+ (<literal>|</literal>) as a separator. The
+ difference between the two separators is described
+ in &man.ppp.8;. To summarize, if you want to rotate
+ through the numbers, use a colon. If you want to
+ always attempt to dial the first number first and
+ only use the other numbers if the first number
+ fails, use the pipe character. Always quote the
+ entire set of phone numbers as shown.</para>
+
+ <para>You must enclose the phone number in quotation
+ marks (<literal>"</literal>) if there is any
+ intention on using spaces in the phone number.
+ This can cause a simple, yet subtle error.</para>
</listitem>
</varlistentry>
@@ -468,11 +484,11 @@
<listitem>
<para>Identifies the user name and password. When
- connecting using a &unix; style login prompt, these
- values are referred to by the <command>set
- login</command> command using the \U and \P
- variables. When connecting using PAP or CHAP, these
- values are used at authentication time.</para>
+ connecting using a &unix; style login prompt, these
+ values are referred to by the <command>set
+ login</command> command using the \U and \P
+ variables. When connecting using PAP or CHAP, these
+ values are used at authentication time.</para>
</listitem>
</varlistentry>
@@ -482,14 +498,16 @@
<listitem>
<indexterm><primary>PAP</primary></indexterm>
<indexterm><primary>CHAP</primary></indexterm>
- <para>If you are using PAP or CHAP, there will be no login
- at this point, and this line should be commented out or
- removed. See <link linkend="userppp-PAPnCHAP">PAP and CHAP
- authentication</link> for further details.</para>
-
- <para>The login string is of the same chat-like syntax as
- the dial string. In this example, the string works for
- a service whose login session looks like this:</para>
+ <para>If you are using PAP or CHAP, there will be no
+ login at this point, and this line should be
+ commented out or removed. See <link
+ linkend="userppp-PAPnCHAP">PAP and CHAP
+ authentication</link> for further details.</para>
+
+ <para>The login string is of the same chat-like
+ syntax as the dial string. In this example, the
+ string works for a service whose login session looks
+ like this:</para>
<screen>J. Random Provider
login: <replaceable>foo</replaceable>
@@ -510,11 +528,12 @@ protocol: ppp</screen>
<listitem>
<indexterm><primary>timeout</primary></indexterm>
- <para>Sets the default idle timeout (in seconds) for the
- connection. Here, the connection will be closed
- automatically after 300 seconds of inactivity. If you
- never want to timeout, set this value to zero or use
- the <option>-ddial</option> command line switch.</para>
+ <para>Sets the default idle timeout (in seconds) for
+ the connection. Here, the connection will be closed
+ automatically after 300 seconds of inactivity. If
+ you never want to timeout, set this value to zero
+ or use the <option>-ddial</option> command line
+ switch.</para>
</listitem>
</varlistentry>
@@ -549,29 +568,31 @@ protocol: ppp</screen>
<listitem>
<para>Adds a default route to your ISP's gateway. The
- special word <literal>HISADDR</literal> is replaced with
- the gateway address specified on line 17. It is
- important that this line appears after line 17,
- otherwise <literal>HISADDR</literal> will not yet be
- initialized.</para>
-
- <para>If you do not wish to run ppp in <option>-auto</option>,
- this line should be moved to the
- <filename>ppp.linkup</filename> file.</para>
+ special word <literal>HISADDR</literal> is replaced
+ with the gateway address specified on line 17. It
+ is important that this line appears after line 17,
+ otherwise <literal>HISADDR</literal> will not yet
+ be initialized.</para>
+
+ <para>If you do not wish to run ppp in
+ <option>-auto</option>, this line should be moved
+ to the <filename>ppp.linkup</filename> file.</para>
</listitem>
</varlistentry>
</variablelist>
<para>It is not necessary to add an entry to
- <filename>ppp.linkup</filename> when you have a static IP
- address and are running ppp in <option>-auto</option> mode as your
- routing table entries are already correct before you connect.
- You may however wish to create an entry to invoke programs after
- connection. This is explained later with the sendmail
- example.</para>
+ <filename>ppp.linkup</filename> when you have a static
+ IP address and are running ppp in <option>-auto</option>
+ mode as your routing table entries are already correct
+ before you connect. You may however wish to create an
+ entry to invoke programs after connection. This is
+ explained later with the sendmail example.</para>
<para>Example configuration files can be found in the
- <filename class="directory">/usr/share/examples/ppp/</filename> directory.</para>
+ <filename
+ class="directory">/usr/share/examples/ppp/</filename>
+ directory.</para>
</sect4>
<sect4 id="userppp-dynamicIP">
@@ -607,31 +628,33 @@ protocol: ppp</screen>
<term>Line 17:</term>
<listitem>
- <para>The number after the <literal>/</literal> character
- is the number of bits of the address that ppp will
- insist on. You may wish to use IP numbers more
- appropriate to your circumstances, but the above example
- will always work.</para>
-
- <para>The last argument (<literal>0.0.0.0</literal>) tells
- PPP to start negotiations using address <hostid
- role="ipaddr">0.0.0.0</hostid> rather than <hostid
- role="ipaddr">10.0.0.1</hostid> and is necessary for some
- ISPs. Do not use <literal>0.0.0.0</literal> as the first
- argument to <command>set ifaddr</command> as it prevents
- PPP from setting up an initial route in
- <option>-auto</option> mode.</para>
+ <para>The number after the <literal>/</literal>
+ character is the number of bits of the address that
+ ppp will insist on. You may wish to use IP numbers
+ more appropriate to your circumstances, but the
+ above example will always work.</para>
+
+ <para>The last argument (<literal>0.0.0.0</literal>)
+ tells PPP to start negotiations using address
+ <hostid role="ipaddr">0.0.0.0</hostid> rather than
+ <hostid role="ipaddr">10.0.0.1</hostid> and is
+ necessary for some ISPs. Do not use
+ <literal>0.0.0.0</literal> as the first argument
+ to <command>set ifaddr</command> as it prevents
+ PPP from setting up an initial route in
+ <option>-auto</option> mode.</para>
</listitem>
</varlistentry>
</variablelist>
- <para>If you are not running in <option>-auto</option> mode, you
- will need to create an entry in
- <filename>/etc/ppp/ppp.linkup</filename>.
- <filename>ppp.linkup</filename> is used after a connection has
- been established. At this point, <command>ppp</command> will
- have assigned the interface addresses and it will now be
- possible to add the routing table entries:</para>
+ <para>If you are not running in <option>-auto</option> mode,
+ you will need to create an entry in
+ <filename>/etc/ppp/ppp.linkup</filename>.
+ <filename>ppp.linkup</filename> is used after a connection
+ has been established. At this point,
+ <command>ppp</command> will have assigned the interface
+ addresses and it will now be possible to add the routing
+ table entries:</para>
<programlisting>1 provider:
2 add default HISADDR</programlisting>
@@ -683,82 +706,82 @@ protocol: ppp</screen>
</indexterm>
<para>When you configure <application>ppp</application> to
- receive incoming calls on a machine connected to a LAN, you
- must decide if you wish to forward packets to the LAN. If you
- do, you should allocate the peer an IP number from your LAN's
- subnet, and use the command <command>enable proxy</command> in
- your <filename>/etc/ppp/ppp.conf</filename> file. You should
- also confirm that the <filename>/etc/rc.conf</filename> file
- contains the following:</para>
+ receive incoming calls on a machine connected to a LAN,
+ you must decide if you wish to forward packets to the LAN.
+ If you do, you should allocate the peer an IP number from
+ your LAN's subnet, and use the command <command>enable
+ proxy</command> in your
+ <filename>/etc/ppp/ppp.conf</filename> file. You should
+ also confirm that the <filename>/etc/rc.conf</filename>
+ file contains the following:</para>
<programlisting>gateway_enable="YES"</programlisting>
</sect4>
- <sect4>
- <title>Which getty?</title>
+ <sect4>
+ <title>Which getty?</title>
- <para><link linkend="dialup">Configuring FreeBSD for Dial-up
- Services</link> provides a good description on enabling
- dial-up services using &man.getty.8;.</para>
-
- <para>An alternative to <command>getty</command> is <ulink
- url="http://mgetty.greenie.net/">mgetty</ulink> (from
- <filename role="package">comms/mgetty+sendfax</filename>
- port),
- a smarter version of <command>getty</command> designed
- with dial-up lines in mind.</para>
-
- <para>The advantages of using <command>mgetty</command> is
- that it actively <emphasis>talks</emphasis> to modems,
- meaning if port is turned off in
- <filename>/etc/ttys</filename> then your modem will not answer
- the phone.</para>
-
- <para>Later versions of <command>mgetty</command> (from
- 0.99beta onwards) also support the automatic detection of
- PPP streams, allowing your clients script-less access to
- your server.</para>
+ <para><link linkend="dialup">Configuring FreeBSD for
+ Dial-up Services</link> provides a good description
+ on enabling dial-up services using &man.getty.8;.</para>
+
+ <para>An alternative to <command>getty</command> is <ulink
+ url="http://mgetty.greenie.net/">mgetty</ulink> (from
+ <filename role="package">comms/mgetty+sendfax</filename>
+ port), a smarter version of <command>getty</command>
+ designed with dial-up lines in mind.</para>
+
+ <para>The advantages of using <command>mgetty</command> is
+ that it actively <emphasis>talks</emphasis> to modems,
+ meaning if port is turned off in
+ <filename>/etc/ttys</filename> then your modem will not
+ answer the phone.</para>
+
+ <para>Later versions of <command>mgetty</command> (from
+ 0.99beta onwards) also support the automatic detection of
+ PPP streams, allowing your clients script-less access to
+ your server.</para>
- <para>Refer to <link linkend="userppp-mgetty">Mgetty and
+ <para>Refer to <link linkend="userppp-mgetty">Mgetty and
AutoPPP</link> for more information on
- <command>mgetty</command>.</para>
- </sect4>
+ <command>mgetty</command>.</para>
+ </sect4>
- <sect4>
- <title><application>PPP</application> Permissions</title>
+ <sect4>
+ <title><application>PPP</application> Permissions</title>
- <para>The <command>ppp</command> command must normally be
- run as the <username>root</username> user. If however,
- you wish to allow <command>ppp</command> to run in
- server mode as a normal user by executing
- <command>ppp</command> as described below, that user
- must be given permission to run <command>ppp</command>
- by adding them to the <groupname>network</groupname> group
- in <filename>/etc/group</filename>.</para>
-
- <para>You will also need to give them access to one or more
- sections of the configuration file using the
- <command>allow</command> command:</para>
-
- <programlisting>allow users fred mary</programlisting>
-
- <para>If this command is used in the <literal>default</literal>
- section, it gives the specified users access to
- everything.</para>
- </sect4>
+ <para>The <command>ppp</command> command must normally be
+ run as the <username>root</username> user. If however,
+ you wish to allow <command>ppp</command> to run in
+ server mode as a normal user by executing
+ <command>ppp</command> as described below, that user
+ must be given permission to run <command>ppp</command>
+ by adding them to the <groupname>network</groupname>
+ group in <filename>/etc/group</filename>.</para>
+
+ <para>You will also need to give them access to one or more
+ sections of the configuration file using the
+ <command>allow</command> command:</para>
+
+ <programlisting>allow users fred mary</programlisting>
+
+ <para>If this command is used in the
+ <literal>default</literal> section, it gives the specified
+ users access to everything.</para>
+ </sect4>
- <sect4>
- <title>PPP Shells for Dynamic-IP Users</title>
+ <sect4>
+ <title>PPP Shells for Dynamic-IP Users</title>
- <indexterm>
- <primary>PPP shells</primary>
- </indexterm>
+ <indexterm>
+ <primary>PPP shells</primary>
+ </indexterm>
- <para>Create a file called
- <filename>/etc/ppp/ppp-shell</filename> containing the
- following:</para>
+ <para>Create a file called
+ <filename>/etc/ppp/ppp-shell</filename> containing the
+ following:</para>
- <programlisting>#!/bin/sh
+ <programlisting>#!/bin/sh
IDENT=`echo $0 | sed -e 's/^.*-\(.*\)$/\1/'`
CALLEDAS="$IDENT"
TTY=`tty`
@@ -772,30 +795,31 @@ echo "Starting PPP for $IDENT"
exec /usr/sbin/ppp -direct $IDENT</programlisting>
- <para>This script should be executable. Now make a symbolic
- link called <filename>ppp-dialup</filename> to this script
- using the following commands:</para>
-
- <screen>&prompt.root; <userinput>ln -s ppp-shell /etc/ppp/ppp-dialup</userinput></screen>
-
- <para>You should use this script as the
- <emphasis>shell</emphasis> for all of your dialup users.
- This is an example from <filename>/etc/passwd</filename>
- for a dialup PPP user with username
- <username>pchilds</username> (remember do not directly edit
- the password file, use &man.vipw.8;).</para>
+ <para>This script should be executable. Now make a
+ symbolic link called <filename>ppp-dialup</filename> to
+ this script using the following commands:</para>
+
+ <screen>&prompt.root; <userinput>ln -s ppp-shell /etc/ppp/ppp-dialup</userinput></screen>
+
+ <para>You should use this script as the
+ <emphasis>shell</emphasis> for all of your dialup users.
+ This is an example from <filename>/etc/passwd</filename>
+ for a dialup PPP user with username
+ <username>pchilds</username> (remember do not directly
+ edit the password file, use &man.vipw.8;).</para>
<programlisting>pchilds:*:1011:300:Peter Childs PPP:/home/ppp:/etc/ppp/ppp-dialup</programlisting>
- <para>Create a <filename class="directory">/home/ppp</filename> directory that
+ <para>Create a <filename
+ class="directory">/home/ppp</filename> directory that
is world readable containing the following 0 byte
files:</para>
<screen>-r--r--r-- 1 root wheel 0 May 27 02:23 .hushlogin
-r--r--r-- 1 root wheel 0 May 27 02:22 .rhosts</screen>
- <para>which prevents <filename>/etc/motd</filename> from being
- displayed.</para>
+ <para>which prevents <filename>/etc/motd</filename> from
+ being displayed.</para>
</sect4>
<sect4>
@@ -805,31 +829,32 @@ exec /usr/sbin/ppp -direct $IDENT</progr
<primary>PPP shells</primary>
</indexterm>
- <para>Create the <filename>ppp-shell</filename> file as above,
- and for each account with statically assigned IPs create a
- symbolic link to <filename>ppp-shell</filename>.</para>
+ <para>Create the <filename>ppp-shell</filename> file as
+ above, and for each account with statically assigned
+ IPs create a symbolic link to
+ <filename>ppp-shell</filename>.</para>
<para>For example, if you have three dialup customers,
- <username>fred</username>, <username>sam</username>, and
- <username>mary</username>, that you route /24 CIDR networks
- for, you would type the following:</para>
+ <username>fred</username>, <username>sam</username>,
+ and <username>mary</username>, that you route /24 CIDR
+ networks for, you would type the following:</para>
<screen>&prompt.root; <userinput>ln -s /etc/ppp/ppp-shell /etc/ppp/ppp-fred</userinput>
&prompt.root; <userinput>ln -s /etc/ppp/ppp-shell /etc/ppp/ppp-sam</userinput>
&prompt.root; <userinput>ln -s /etc/ppp/ppp-shell /etc/ppp/ppp-mary</userinput></screen>
- <para>Each of these users dialup accounts should have their
- shell set to the symbolic link created above (for example,
- <username>mary</username>'s shell should be
+ <para>Each of these users dialup accounts should have
+ their shell set to the symbolic link created above (for
+ example, <username>mary</username>'s shell should be
<filename>/etc/ppp/ppp-mary</filename>).</para>
</sect4>
<sect4>
- <title>Setting Up <filename>ppp.conf</filename> for Dynamic-IP
- Users</title>
+ <title>Setting Up <filename>ppp.conf</filename> for
+ Dynamic-IP Users</title>
- <para>The <filename>/etc/ppp/ppp.conf</filename> file should
- contain something along the lines of:</para>
+ <para>The <filename>/etc/ppp/ppp.conf</filename> file
+ should contain something along the lines of:</para>
<programlisting>default:
set debug phase lcp chat
@@ -847,17 +872,17 @@ ttyu1:
<para>The indenting is important.</para>
</note>
- <para>The <literal>default:</literal> section is loaded for
- each session. For each dialup line enabled in
- <filename>/etc/ttys</filename> create an entry similar to
- the one for <literal>ttyu0:</literal> above. Each line
- should get a unique IP address from your pool of IP
- addresses for dynamic users.</para>
+ <para>The <literal>default:</literal> section is loaded
+ for each session. For each dialup line enabled in
+ <filename>/etc/ttys</filename> create an entry similar
+ to the one for <literal>ttyu0:</literal> above. Each
+ line should get a unique IP address from your pool of
+ IP addresses for dynamic users.</para>
</sect4>
<sect4>
- <title>Setting Up <filename>ppp.conf</filename> for Static-IP
- Users</title>
+ <title>Setting Up <filename>ppp.conf</filename> for
+ Static-IP Users</title>
<para>Along with the contents of the sample
<filename>/usr/share/examples/ppp/ppp.conf</filename>
@@ -891,140 +916,146 @@ mary:
add 203.14.103.0 netmask 255.255.255.0 HISADDR</programlisting>
</sect4>
- <sect4 id="userppp-mgetty">
- <title><command>mgetty</command> and AutoPPP</title>
+ <sect4 id="userppp-mgetty">
+ <title><command>mgetty</command> and AutoPPP</title>
- <indexterm>
- <primary><command>mgetty</command></primary>
- </indexterm>
+ <indexterm>
+ <primary><command>mgetty</command></primary>
+ </indexterm>
- <indexterm>
- <primary>AutoPPP</primary>
- </indexterm>
+ <indexterm>
+ <primary>AutoPPP</primary>
+ </indexterm>
- <indexterm>
- <primary>LCP</primary>
- </indexterm>
+ <indexterm>
+ <primary>LCP</primary>
+ </indexterm>
- <para>By default the <filename
+ <para>By default the <filename
role="package">comms/mgetty+sendfax</filename> port
- comes
- with the <literal>AUTO_PPP</literal> option enabled
- allowing <command>mgetty</command> to detect the LCP phase
- of PPP connections and automatically spawn off a ppp
- shell. However, since the default login/password
- sequence does not occur it is necessary to authenticate
- users using either PAP or CHAP.</para>
+ comes with the <literal>AUTO_PPP</literal> option enabled
+ allowing <command>mgetty</command> to detect the LCP
+ phase of PPP connections and automatically spawn off a
+ ppp shell. However, since the default login/password
+ sequence does not occur it is necessary to authenticate
+ users using either PAP or CHAP.</para>
- <para>This section assumes the user has successfully
- compiled, and installed the <filename
+ <para>This section assumes the user has successfully
+ compiled, and installed the <filename
role="package">comms/mgetty+sendfax</filename> port on
- his system.</para>
+ his system.</para>
- <para>Make sure your
- <filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
- file has the following in it:</para>
+ <para>Make sure your
+ <filename>/usr/local/etc/mgetty+sendfax/login.config</filename>
+ file has the following in it:</para>
- <programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
+ <programlisting>/AutoPPP/ - - /etc/ppp/ppp-pap-dialup</programlisting>
- <para>This will tell <command>mgetty</command> to run the
- <filename>ppp-pap-dialup</filename> script for detected
- PPP connections.</para>
+ <para>This will tell <command>mgetty</command> to run the
+ <filename>ppp-pap-dialup</filename> script for detected
+ PPP connections.</para>
- <para>Create a file called
- <filename>/etc/ppp/ppp-pap-dialup</filename> containing the
- following (the file should be executable):</para>
+ <para>Create a file called
+ <filename>/etc/ppp/ppp-pap-dialup</filename> containing
+ the following (the file should be executable):</para>
- <programlisting>#!/bin/sh
+ <programlisting>#!/bin/sh
exec /usr/sbin/ppp -direct pap$IDENT</programlisting>
- <para>For each dialup line enabled in
- <filename>/etc/ttys</filename>, create a corresponding entry
- in <filename>/etc/ppp/ppp.conf</filename>. This will
- happily co-exist with the definitions we created
- above.</para>
+ <para>For each dialup line enabled in
+ <filename>/etc/ttys</filename>, create a corresponding
+ entry in <filename>/etc/ppp/ppp.conf</filename>. This
+ will happily co-exist with the definitions we created
+ above.</para>
- <programlisting>pap:
+ <programlisting>pap:
enable pap
set ifaddr 203.14.100.1 203.14.100.20-203.14.100.40
enable proxy</programlisting>
- <para>Each user logging in with this method will need to have
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-doc-projects
mailing list