The options to use when PPP is started up can be controlled using command line options to the pppd command or stored in a file that the PPP daemon (this is what pppd is) reads when it is invoked.
Because PPP needs to set up networking devices, change the kernel routing table and so forth, it requires root privileges to do this.
The pppd program should be setuid root on installation :-
-r-sr-xr-x 1 root root 95225 Jul 11 00:27 /usr/sbin/pppd
If /usr/sbin/pppd
is not set up this way, then as root issue the command
chmod u+s /usr/sbin/pppd
Depending on how you want your system to operate - specifically if you want ANY user on your system to be able to initiate a PPP, you should make your ppp-on/off scripts world read/execute. (This is probably fine if your PC is used ONLY by you).
However, if you do NOT want just anyone to be able to start up a PPP
connection (for example, your children have accounts on your Linux PC
and you do not want them hooking into the Internet without your
supervision), you will need to establish a PPP group (edit /etc/group
) and :-
You should end up with the following ownerships and permissions in response
to ls -l /usr/sbin/ppp-*
-rwxr-x--- 1 root PPP 587 Mar 14 1995 /usr/sbin/ppp-on
-rwxr-x--- 1 root PPP 631 Mar 14 1995 /usr/sbin/ppp-off
You now need to be logged in as root to create the directories and edit the files needed to set up PPP, even if you want PPP to be accessible to all users.
In your /etc
directory there should be a directory:-
drwxrwxr-x 2 root root 1024 Oct 9 11:01 ppp
If it does not exist - create it, cd /etc; mkdir ppp
If the directory already existed, it should contain a template options
file called options.tpl
. This file is at the end of this document.
Print it out as it contains an explanation of all the PPP options (these
are useful to read in conjunction with the pppd man pages). Whilst you
can use this file as the basis of your /etc/ppp/options
file, it is
probably better to create your own options file that does not include
all the comments in the template - it will be much shorter and easier to
read/maintain.
If you have multiple serial lines/modems (typically the case for PPP
servers), create an EMPTY /etc/ppp/options
file and set up individual
option files for each serial line on which you will be establishing a
PPP connection. These are named options.ttyS1, options.ttyS2 and so
forth. If there are ppp options that are common for all lines, then you
can put these in the options file and the port specific options in the
relevant options.ttySx file.
However, for a single PPP connection, you can happily use the
/etc/ppp/options
file. Alternatively, you can put all the options as
arguments in the pppd command itself.
It is easier to maintain a setup that uses /etc/ppp/options.ttySx
files.
If you use PPP to connect to a number of different sites, you can create
option files for each site in /etc/ppp/options.site
and then specify
the option file as a parameter to the PPP command as you connect.
Well, as in all things that depends (sigh)...the following is a basic options file that should work for most client connections that do NOT use PAP/CHAP.
However, if it does NOT work, read through /etc/ppp/options.tpl
and the pppd man
pages. Speaking to the sysadmin/user support people who run the server
into which you are connecting may also be worthwhile.
In case this file is missing, here is a shortened version covering the basic options.
# /etc/ppp/options (NO PAP/CHAP) # # use the modem control lines modem # use hardware flow control crtscts # create a default route for this connection in the routing table defaultroute # do NOT set up any "escaped" control sequences asyncmap 0 # use a maximum transmission packet size of 552 bytes mtu 552 # use a maximum receive packet size of 552 bytes mru 552 # #-------END OF SAMPLE /etc/ppp/options