The kppp Handbook: Configuring an Account
Description: KPPP Internet Dialer
Keywords: KPPP Dialer Internet PPP IP PAP CHAP

Next Previous Table of Contents

### 4. Configuring an Account

### 4.1 Dial

Connection Name

  You must give the account a name. You can use anything here, but if you have multiple accounts it must be unique.

Phone Number

  Specify the phone number to dial. You may use characters such as ``-'' to make the number more legible. If you concatenate a series of numbers (separated by a colon) kppp will try these numbers in a cyclic order whenever it receives a busy signal. Example: "1111111:2222222:3333333"

Authentication

  Choose the appropriate method of authentication that kppp should use to log into the server. Check with your provider whether he offers PAP or CHAP support or if you have to use a script or terminal-based login method.

Store password

  Check this option if you want kppp to remember your password at the next session.

Execute Program upon Connect

  kppp will attempt to execute the command specified here once a ppp link has been set up.

Execute Program before Disconnect

  kppp will run the command before closing the connection. This will be useful if you have to change any route or address before you leave the net.

Execute Program upon Disconnect

  analogue with previous item.

Edit pppd arguments

  This will bring up the pppd arguments dialog. You may use this dialog to add any desired options that you want kppp to hand to pppd. See the pppd man page for a list of available options. Unless you know exactly what you are doing you should restrain from tinkering with the pppd options.

### 4.2 IP

Dynamic IP Address

  Check this if your ISP uses dynamic IP address assignment. That is your IP address will most likely change every time you establish a connection.

Static IP Address

  Check this is your ISP has given you a static IP address. In that case you will also need to fill in that address and any Subnet Mask if applicable. Ask your ISP if unsure.

Auto-configure Hostname from this IP

  Select this option if you want kppp to set the hostname and domain for your machine after successful setup of a ppp link on connect. This is done by querying the defined Domain Name Server with the ip assigned for the ppp link. This option is useful for those stand-alone machines which want to use protocols like talk which require the hostname to be the same as your machine is known in the Internet. It overrides the Domain Name Option in the DNS Section. The machine defaults are restored to the original values when you close the ppp link Be careful when choosing this option: It may prove useful to you, but it may also cause lots of undesired side effect. Just play with it ...

### 4.3 DNS

Domain Name

  Specify the domain name for your machine. As with DNS Addresses it is restored to the original specified in `/etc/resolv.conf` when the connection goes down. If it is left blank no changes are made to the domain name specified in `/etc/resolv.conf`

DNS Servers

  Add the Domain Name servers assigned to you by your ISP. You must specify at least a Domain Name server for your OS to be able to resolve human readable IP addresses such as ftp.kde.org. The DNS server addresses supplied must be in numeric form, e.g 128.231.231.233. The addresses will be added at runtime to `/etc/resolv.config`.

Disable existing DNS Servers during Connection

  Select this option if you want kppp to disable already existing nameserver entries in `/etc/resolv.conf` during connection.

### 4.4 Gateway

Default Gateway

  Check this if you want pppd to use the default Gateway for your machine.

Static Gateway

  Check this if you want to specify the Gateway to be used.

Assign the Default Route to this Gateway

  You almost certainly will need this. Leave it on unless you really know what you are doing.

### 4.5 Login Script

Edit Script

  Use this dialog to compose a dial in script for your ISP dialup connection. Use the mini-terminal and the information supplied by your ISP to understand which sequence of actions needs to be executed.

  - Expect: kppp will wait for the specified string to be received.
  - Send: kppp will send the specified string.
  - Scan: kppp will scan the the input stream for the specified string and store any character after the string up to the first newline in an internal buffer. Trailing and leading whitespace will be stripped off.
  - Save: permanently store the previously scanned string in the specified register. So far, the only valid register is 'password'.
  - Pause: pause for the specified number of seconds
  - Hangup: kppp will send the hangup command to the modem
  - Answer: kppp will set the modem into answer mode
  - Timeout: change the default timeout to the specified number of seconds dynamically during script execution. You can change the timeout several times during script execution if necessary.
  - Prompt: Prompt the kppp user to enter a string, given the specified string as a hint. The user will see what is typed. If the specified string includes the mark ## the mark will be replaced with the current content of the internal scan buffer.
  - PWPrompt: Prompt the kppp user to enter a string, given the specified string as a hint. An asterisk will be printed for each character typed.
  - ID: If the ID field on kppp's main dialog is filled in, send that ID. If the ID field is not filled in, prompt the kppp user to enter an ID, given the specified string as a hint. The user will see what is typed. On a second pass, such as in a loop on the second iteration, a prompt will be displayed, given the specified string as a hint.
  - Password: If the password field on kppp's main dialog is filled in, send that password. If the password field is not filled in, prompt the kppp user to enter a password given the specified string as a hint. An asterisk will be printed for each character typed. On a second pass, such as in a loop on the second iteration, a prompt will be displayed, given the specified string as a hint.
  - LoopStart: kppp will wait for the specified string to be received. It will save the string for use by LoopEnd
  - LoopEnd: kppp will wait for the specified string to be received to exit the loop. If the string given by the corresponding LoopStart is received first, it will trigger a jump to the line after the LoopStart, enabling repetition of username/password style paired dialogs.

#### Example scripts

Here is a simple script I could use to connect to my ISP:

> `

>     Expect      ID:                        # wait for ID:
>     Send        myid                       # you have to substitute myid with your id
>     Expect      word:                      # wait for 'password'
>     Send        4u3fjkl                    # send my password '4u3fjkl'
>     Expect      granted                    # My ISP send 'Permission granted' on login success.
>     Send        ppp                        # This starts a ppp connection for
>                                            # me on the ISP side.

> `

Here a script for the same account with ID and password prompt: This script will prompt for ID and password each time, no matter what is typed into the ID and password field on kppp's main dialog. This script also illustrated the use of the LoopStart/LoopEnd structure. If something goes wrong during the login procedure, for example if I mistype the password, my ISP will print an error message and restart the id/password loop by issuing the string "ID:" again. If the string "ID" is caught before the LoopEnd keyword was parsed, kppp will start the script again after the LoopStart keyword.

> `

>     LoopStart   ID:                        # wait for ID:
>     Prompt      Enter ID:                  # Prompt me for my ID and send it off.
>     Expect      word:                      # wait for 'password'
>     PWPrompt    Enter Password:            # Prompt me for my password and send it off.
>     LoopEnd     granted                    # My ISP send 'Permission granted' on login success.
>     Send        ppp                        # This starts a ppp connection for me

> `

Here is the script that I actually use to connect to my ISP: This script will prompt for ID and password only if I haven't filled in the respective fields on kppp's main dialog.

> `

>     LoopStart   ID:                        # wait for ID:
>     ID          Enter ID:                  # Prompt me for my ID and send it off.
>     Expect      word:                      # wait for 'password'
>     Password    Enter Password             # Prompt me for my password and send it off.
>     LoopEnd     granted                    # My ISP send 'Permission granted' on login success.
>     Send        ppp                        # This starts a ppp connection for me
>                                            # on the ISP side

> `

Here is a script that I use to connect to an ISP which is using some sort of challenge/response authentication. Usually you got a hardware token (a smart card with a display and calculator like keypad) from the ISP. You have to know a password to use the token. After dialling in your ISP displays your challenge. You have to type in the challenge to your token and get a dynamic password as a response. Then you have to enter that password.

> `

>     LoopStart   ID:                        # wait for ID:
>     ID          Enter ID:                  # Prompt me for my ID and send it off.
>     Scan        Challenge:                 # Scan for 'Challenge' and store everything behind up to the next newline.
>     Expect      Password:                  # wait for 'password'
>     Prompt      Your token is ## - Enter Password  # Prompt me for my password and send it off.
>     LoopEnd     granted                    # My ISP sends 'Permission granted' on login success.
>     Send        ppp                        # This starts a ppp connection for me
>                                            # on the ISP side

> `

The following log shows the login procedure of a fictitious ISP that provides a new password on each login. The new password has to be verified and recorded for the next session.

> `

>     University of Lummerland

>     Login:mylogin
>     Password:
>     The password for your next session is: YLeLfkZb
>     Please record and enter it for verification.
>     Verification:YLeLfkZb

>     1 = telnet
>     2 = SLIP
>     3 = PPP

>     Your choice:

> `

kppp can be used to do that cumbersome task for you (eliminating the risk of losing that little sheet of paper that holds your current password at the same time). The key part of the following script is a combination of the Scan/Save keywords:

> `

>     Expect      Login:                     # wait for login prompt
>     ID                                     # send ID
>     Expect      Password:                  # wait for password prompt
>     Password                               # send password
>     Scan        is:                        # wait for '... next session is:' and
>                                            # scan the preceding password
>     Save        password                   # save the new password for next login
>     Expect      Verification:              # wait for 'Verification:'
>     Password                               # send new password
>     Expect      choice:                    # wait for a prompt that let's you choose
>                                            # between different options (telnet, SLIP, PPP)
>     Send        3                          # choose option 3, i.e. PPP

> `

### 4.6 Accounting

Accounting Setup

  Use the ``Enable accounting'' button to enable/disable phone cost accounting. Select a rule appropriate for your region. If you can't find a rule for your region you will have to write one by following the supplied `TEMPLATE` in `${KDEDIR}/share/apps/kppp/Rules/`. Don't be afraid though it is really easy. Don't forget to submit your newly created rules file to me. The newly created rules file can be checked for valid syntax with the -r rule_file command line option to kppp and must be installed in `${KDEDIR}/share/apps/kppp/Rules` or in `${HOME}/.kde/share/apps/kppp/Rules` before you will be able to select it in this dialog.

### 4.7 Volume accounting

#### What is volume accounting?

It basically means to count the number of bytes transmitted from or to the Internet. kppp can count incoming bytes, outgoing bytes or both. Itīs up to you what you want (or must) use.

#### Why should I use volume accounting?

Because nowadays, many Internet Service Providers begin to bill their customers depending on the number of bytes transferred. Or very often those ISP give you an arbitrary transfer limit, and charge you for every megabyte above this limit. kppp shows you your current volume and can help you keeping your bills to the minimum. Of course, if you do not have volume limits and you are curious, you can use it too...

#### What type of volume accounting should I select?

That depends on your provider. Many of them only count how many megabytes you get from Internet and ignore how much you send. In that case you should choose "Bytes in". If you have to pay for both you should select "Bytes in and out". "Bytes out" is not of much use and is only here for completeness.

#### Drawbacks

Unfortunately thereīs a drawback on volume accounting. kppp will just count the number of bytes regardless their origin. Many providers set their limit only for internet access, not for their own network. So, if you do a little web surfing and you use a proxy-cache, the proxy will reside inside the network of your provider and he will not charge you for bytes transferred from his proxy cache. However, kppp will not know that these IP packets are coming from the proxy and thus count them. So, if you use a proxy, or your provider uses a caching news server (like nntpcached), the volume reported by kppp may be higher.

Next Previous Table of Contents