[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ppp-configuration



On Sun, Oct 08, 2000 at 08:39:22AM +0200, thus spake Tor Kjemo:
> I  try to configure my debian-installation for ppp without any sucsess.
> In the installation-documentation it says:
> 
> Be sure you have the following packages installed: 
> ppp 
> ppp-pam 
> wvdial
> 
> I can find ppp-pam anywhere. Is the docs wrong?
> Can`t find any info on the Debian-homepage either.

Tor,

Relax!  From the package description of the ppp that comes with
potato

"This package contains pppd with PAM support built-in, so `ppp-pam' package
is obsolete."

So you probably have the kit you need.  Are you trying to set up
with wvdial or with pppconfig?  What sort of errors are you
getting?  

I've attached the wvdial faq to this, just in case it answers the
need.  

HTH

Glyn M



-- 
       ******************************************************
       * "The soul is greater than the hum of its parts. "  *
       *                 Douglas Hoftstatder                *
       ******************************************************
     WvDial: FAQ Text File
WvDial Frequently Asked Questions - December 1998
-------------------------------------------------

1. The author and other friendly animals.

This FAQ was written by Dave Baker  in conjuction with the
wvdial mailing list.  Normal disclaimers apply.  This FAQ should be considered
pre-alpha and subject to much revision.  For the sake of a number, lets call
it version 0.02b.

Feedback on the FAQ should be sent either directly to the author or to the
mailing list at wvdial-list@worldvisions.ca.  To subscribe to the mailing list
send a mail to wvdial-list-request@worldvisions.ca with "subscribe" as the only
word in the subject line.  The list is really low volume (a handful of
messages a week) and none^H^H^H^Hfew of us bite.

This file is currently being maintained as a plain text file - if anyone has
suggestions as to a nice alternative let me know.  I may default to a HOWTO
style document for the next revision.

In addition to the meagre work done by myself, the following have given me
much information that in one way or another I've mangled into something not
quite as precise as they originally intended:
- Avery Pennarun
- Patrick Patterson


2. Where to get it.

Wvdial is available in source form and packaged for several distributions.
Start at http://www.worldvisions.ca/wvdial and follow the links.
As of this writing, the latest version is 1.40.


3. Quick start.

Assuming everything works perfectly, the following will get you on-line if
you're running as root.
- wvdialconf /etc/wvdial.conf
- vi /etc/wvdial.conf           [edit username/password/phone]
- vi /etc/resolv.conf           [edit nameservers]
- wvdial


3b. Command not found?

Note that the executables wvdial and wvdialconf are installed in
/usr/local/bin by default.  Under some distributions (Redhat is one) this is
not in roots path, but is in a non-root users path.  If you try running wvdial
and it reports 'command not found' then either:
- add /usr/local/bin to you path.  How to do this depends on what shell you
  run, but typically you will edit /root/.bashrc, /root/.cshrc, etc, and
  then log back in (or use the 'source' command to reread the file).
- specify the full path, such as /usr/local/bin/wvdialconf when running
- change directory to /usr/local/bin and use ./wvdialconf - not the leading
  period must be used because your current directory should not be in the path
  either for security reasons.


4. What nameserver should I use?

If you're migrating from a Windows environment you may find yourself without a
nameserver that you're aware of.  Certain extensions to the ppp negotiation
protocol provided in some Windows dialers allow it to be told what the IP
address of the nameserver is - these do not work under linux.

- Ask someone at your ISP's technical support line.
- If you can dial up under Windows it may be possible to determine the
  nameserver being used from the TCP/IP configuration panels.  If you can
  run the 'winipcfg' program and click on 'more info' you should see the
  details you need.
- Use a well known nameserver to look up the IP of your local nameserver.
  For example, using the IP of a known nameserver (in this case we'll use
  ns1.sprintlink.net) we type:  host -t ns earthlink.net 204.117.214.10
  This will return a series of lines, each one listing the domain, the
  letters NS (nameserver) and the hostname of the nameserver.  We now run
  a host lookup no those addresses to get the actual IP addresses to use in
  our resolv.conf.
- Set your linux machine up as it's own nameserver.  Redhat has a
  caching-nameserver package to do exactly this.  Be warned that this in my
  experience will introduce lookup delays while you are OFFline unless you
  dynamically change your /etc/resolv.conf file.


5. It dials and then pppd dies for no reason.

- Check the log file!  It will typically be /var/log/messages or
  /var/log/ppp.log depending on your system.  Scan to the end and look for
  anything marked pppd.  Do not send the complete file when asking for help!
- Check the /etc/ppp/options file.  If you set up pppd before and added any
  lines in here you may well need to take them out due to the way wvdial
  accesses pppd.
- Use the 'script' command to capture the exact output when wvdial runs.
- Check you're using the correct username/password.


6. What if I don't want to run wvdial as root?

Firstly, wvdial should not be run as root because that means you've logged
in as root!  There are a few ways to get around this and make wvdial
available to the normal user.

- Make wvdial itself suid.  This is not recommended but is the quickest,
  easiest fix.  It also gives Avery and Dave nightmares.  Try not to do it.
  If you must do this, then at least only allow a limited group execute rights
  to the executable (debian has a dialout group for this very purpose).
- The other ways are more complicated and the spaces will be filled in later.
  Basically, the user needs access to the serial device, may need access to
  read/write the chap/pap-secrets file (if not using terminal authentication).


7. What if I don't want to tie up the terminal session?

You can run wvdial in the background.  I use the following scripts,
simplified for the example.

---- /usr/local/bin/netup
#!/bin/sh
wvdial $*  &
----

Note the $* is substitued by the entire argument list passed to netup.  Thus
when I run 'netup quiet', the script runs 'wvdial quiet' and hooks out a
separate init string to turn off the modem noise.


---- /usr/local/bin/netdown
#!/bin/sh
killall wvdial
sleep 2
echo ""
----

Note the sleep and echo just tidy the screen a little since it takes pppd
a second or so to die nicely.  This will NOT work if you run multiple
instances of wvdial (two modems, for example) nor will it work if one
non-root user tries to terminate a session started by another user.


8. Interfacing to graphical ppp dialers.

Depending on the interface, you may be able to run the scripts above.
I don't typically use a graphical ppp interface except to see data
throughput rate so haven't explored this as much as could be.  Yet.


9. What about WinModems?  Plug and Play?  PCI modems?  Multiport?

If you have/bought a WinModem you're out of luck.  Take it back to the store
if you can and spend a little more cash for a real modem!  These modems will
not work under Linux AT ALL.  (If you can correct me on this, please do so!)

If it's a plug and play modem try using the isapnptools package to configure
it.  If you can find it, wvdial can use it.  Often a tool such as minicom will
be helpful here to reduce the turnaround time for making changes to the serial
configuration.

If it's a PCI modem you're probably in for a wild ride trying to get it to
work.  If anyone has had/has heard of success stories please let me know.

I've not used a multiport modem under Linux for several years but if yours is
supported there should be no trouble in using it.  You will probably need to
create /etc/wvdial.conf entirely by hand if you don't want to edit wvdialconf
to look at a different range of devices to probe.


10. I use AOL.  What should I do?

No dialer I know of will access AOL.  There are reports of using early AOL
software under WINE/WABI to access AOL's content pages when already connected
to the internet though.  My personal opinion is that you should get another
service provider, but I'll leave that choice up to you.


11. How about CompuServe, Microsoft Network?

Reports are varied.  Some people have reported success.  If anyone can provide
details I'll gladly include them.


12. I couldn't get wvdialconf to work.

At risk of sounding redundant, let's check you have a modem, it's turned on
and plugged in.  If that doesn't solve your problem then you probably either
have a tricky modem (WinModem, Plug&Play, PCI Modem) or have an IRQ conflict.
IRQ conflicts will sometimes manifest with enormously delayed reaction times to
modem commands, or by refusing to respond at all.  If you're using an internal
modem and your motherboard has serial devices on-board you should disable the
one you're using in the BIOS setup (refer to the blurry photocopied page that
normally comes with all high quality motherboards for details).

Remember that the /dev/ttyS? numbers are off by one from the COM numbers in
the DOS/Windows world.  COM1 corresponds to /dev/ttyS0.  You should be using
ttyS? and not cua? unless you have a very VERY good reason to do otherwise.

There is much debate over the merits of using a /dev/modem symlink in place of
the real device.  (Technically you can even create a device file named
/dev/modem with the correct major/minor but this is definitely discouraged!)
Some software looks for /dev/modem first; if all software looks for /dev/modem
and you change your modem you only need to reconfigure in one place; if you
have ANY mixup of modem vs ttyS? you'll run into the worst device locking
problems imaginable.  Try whichever you think you prefer but be aware of the
differences!

[stuff about setserial, UART numbers etc to go in here]


13. Dialing more than one provider.

Wvdial has a very flexible configuration file that allows it to dial different
numbers and authenticate as different users depending on how it is run.  One
exception to this rule is that it will not (yet) alter the /etc/resolv.conf
file automagically according to what system you dial.  If you dial up to
different ISP accounts you may be able to get away with leaving
/etc/resolv.conf the same for each, especially if you're running a local
caching nameserver.  If you have the situation of dialing either an ISP or a
private network (such as the office) you will have to get creative with
scripts to copy/edit resolv.conf dynamically.  One suggestion is to put some
checks in /etc/ppp/ip-up to determine the host at the far end of the ppp
connection and act accordingly.  You may also want some code in ip-down to
revert to the previous versions (especially if running a caching local
nameserver to avoid offline delays as mentioned previously).

Look at the manual page for details of the [Dialer Default] section and how to
use [Dialer whatever] to make 'wvdial whatever' act differently.


14. Common settings for wvdial.conf

Everybody has different needs for their dialer so this section is just for a
few examples that myself or others have found useful.  If you want to suggest
other options then please let me know and I'll include them if they're not too
peculiar.

- Call Waiting
  Change the phone number from (eg) 555-1212 to *70,555-1212

- Quiet dialing
  Add an Init line such as:  Init3 = ATM0 L0

- Other features
  Add an empty dialer section such as [Dialer up] to make it easy to integrate
  with other scripts that examine a single list of command line arguments.
  For example 'up' may be used to instruct the dialer script to leave the
  network connection established.  By passing the whole string to wvdial to
  parse this empty section prevents the warning that the section named does
  not exist.



99. Improvements to this document.

- Spell check
- Ordering of all sections into cascading levels of detail
- Flexible document source to allow text/html/ps output
- Translations?
- Categorization of each FAQ into relative frequence
- Update to SGML/HTML.

Reply to: