| 1 |
Debian PPP package notes |
| 2 |
======================== |
| 3 |
|
| 4 |
Table of contents: |
| 5 |
|
| 6 |
+ Provided user space scripts |
| 7 |
+ Permissions |
| 8 |
+ Outbound dialing setup |
| 9 |
+ Inbound setup combined with mgetty |
| 10 |
+ Syslog facility level |
| 11 |
+ Logging of ip-up and ip-down |
| 12 |
+ DSL connections |
| 13 |
+ MSS clamping |
| 14 |
+ Naming of PPPoE interfaces |
| 15 |
|
| 16 |
-- Christoph Lameter <[email protected]>, 22 July 1997 |
| 17 |
Phil Hands <[email protected]> |
| 18 |
Josip Rodin <[email protected]>, 27 November 1999. |
| 19 |
Marco d'Itri <[email protected]> |
| 20 |
|
| 21 |
|
| 22 |
Provided user space scripts |
| 23 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 24 |
Since release 2.3.1, the ppp package provides scripts to conveniently |
| 25 |
control PPP from user space. Note that the scripts only work with the |
| 26 |
proper setup in /etc/ppp. Edit the configuration files and test the |
| 27 |
operation of your link in superuser mode first. |
| 28 |
|
| 29 |
pon Bring link up. Executes pppd (you may specify the ISP name |
| 30 |
on the command line), and will immediately return the |
| 31 |
command prompt while still dialing. |
| 32 |
|
| 33 |
plog Shows the last lines of the pppd log. Basically, does |
| 34 |
tail ppp.log. |
| 35 |
|
| 36 |
poff Bring link down. Terminates connection by killing pppd. |
| 37 |
|
| 38 |
Please read the manual page pon(1) for specific descriptions of these |
| 39 |
commands. |
| 40 |
|
| 41 |
|
| 42 |
Permissions |
| 43 |
~~~~~~~~~~~ |
| 44 |
Access to pppd is controlled via the membership in the "dip" group. |
| 45 |
|
| 46 |
|
| 47 |
Outbound dialing setup |
| 48 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 49 |
Edit the file /etc/ppp/peers/provider and put all options in it that you need |
| 50 |
to connect to your server. The most common options are already provided for |
| 51 |
you, and you should only need to set the login name and telephone number. |
| 52 |
|
| 53 |
Edit the file /etc/ppp/pap-secrets and put your password into the designated |
| 54 |
location. |
| 55 |
|
| 56 |
You should then be able to start the PPP connection with pon. |
| 57 |
|
| 58 |
You should never need to modify /etc/ppp/options. |
| 59 |
|
| 60 |
If you want to have PPP started at boot time then add something like this |
| 61 |
to /etc/network/interfaces: |
| 62 |
|
| 63 |
auto myisp |
| 64 |
iface myisp inet ppp |
| 65 |
provider dsl-provider |
| 66 |
|
| 67 |
|
| 68 |
Inbound setup combined with mgetty |
| 69 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 70 |
Note: for this to work you need to have mgetty version >= 0.99 with its |
| 71 |
AutoPPP feature turned on. |
| 72 |
|
| 73 |
Edit the /etc/ppp/options file and uncomment the nameserver lines. Provide |
| 74 |
the IP addresses that you want the users to use for their name services. |
| 75 |
|
| 76 |
To have one options file for each serial port you run mgetty on, use |
| 77 |
the files /etc/ppp/options.ttyXX. Give each serial port an IP address |
| 78 |
in those files. That way that port is locked into using that IP number. |
| 79 |
Think what consequences that assignment might have for outbound use... |
| 80 |
|
| 81 |
That should be enough for dial-up from a Win9x or NT Server. The |
| 82 |
username/password on those system is used for a PAP authentication. |
| 83 |
The /etc/ppp/pap-secrets is already set up for such a situation. Mgetty is |
| 84 |
preconfigured to call pppd with parameters so that the PAP verification will |
| 85 |
be done through the /etc/passwd file. |
| 86 |
|
| 87 |
All your users should now be able to establish PPP connections by just |
| 88 |
specifying phone number, username, and password from Win9x. |
| 89 |
|
| 90 |
Inbound dial-up using dial-up scripts: |
| 91 |
A PPP session can be established from the regular Linux prompt by executing |
| 92 |
/usr/sbin/pppd. The user is limited to use the assigned IP address in |
| 93 |
/etc/ppp/options.ttyname and will not be able to override it. |
| 94 |
|
| 95 |
Note: there is support for callback, it can be done through scripts |
| 96 |
(see /usr/share/doc/ppp/examples/scripts/*callback), and with mgetty's |
| 97 |
`callback' program (see callback(8) manual page). |
| 98 |
|
| 99 |
|
| 100 |
Syslog facility level |
| 101 |
~~~~~~~~~~~~~~~~~~~~~ |
| 102 |
The default level of LOG_DAEMON has been overridden (as described in the |
| 103 |
pppd(8) man page), to be LOG_LOCAL2. The intent being that local2 be sent |
| 104 |
to /var/log/ppp.log for use by plog, if you add the following line to your |
| 105 |
/etc/syslog.conf file: |
| 106 |
|
| 107 |
local2.* -/var/log/ppp.log |
| 108 |
|
| 109 |
|
| 110 |
Logging of ip-up and ip-down |
| 111 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 112 |
If you want to enable logging of the ip-up and ip-down scripts output, |
| 113 |
then create the file /var/log/ppp-ipupdown.log . |
| 114 |
|
| 115 |
|
| 116 |
DSL connections |
| 117 |
~~~~~~~~~~~~~~~ |
| 118 |
The files peers-pppoa, peers-pppoe and interfaces from |
| 119 |
/usr/share/doc/ppp/examples/ contain complete configuration examples |
| 120 |
for the protocols commonly used for DSL connections. |
| 121 |
Beware: the pppoatm kernel driver currently is not autoloaded, so PPPoA |
| 122 |
users probably want to add it to /proc/modules. |
| 123 |
The same applies to PPPoE users who need the br2684 module. |
| 124 |
|
| 125 |
|
| 126 |
MSS clamping |
| 127 |
~~~~~~~~~~~~ |
| 128 |
If the computer running pppd acts as a router for other machines, you |
| 129 |
probably want to make it reduce the MSS field of outgoing packets, to |
| 130 |
avoid fragmentation and problems caused by path MTU blackholing. |
| 131 |
You may add something like this to /etc/ppp/ip-up.d/local: |
| 132 |
|
| 133 |
iptables --insert FORWARD 1 --proto tcp --tcp-flags SYN,RST SYN \ |
| 134 |
--out-interface $PPP_IFACE --match tcpmss --mss 1400:1536 \ |
| 135 |
--jump TCPMSS --clamp-mss-to-pmtu |
| 136 |
|
| 137 |
|
| 138 |
Naming of PPPoE interfaces |
| 139 |
~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 140 |
The pppoe plugin usually accepts only eth*, nas* or tap* as interface |
| 141 |
names. Different names can be specified by adding the "nic-" prefix, |
| 142 |
which will be removed by the program. |
| 143 |
|