LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-12-2003, 09:59 AM   #1
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Rep: Reputation: 15
Kppp Setup. Im lost :(


First off hi peeps. i`m a complete linux newbie.

I`ve installed slackware with help from a mate but now I`m trying to connect to my isp.

I load up kppp I put the phone number in as well and then my user name and password.

When i click connect it rings and the lights come on on the modem. THe log says starting pppd but it always times out. WHat am I doing wrong? Are there some setting I need to do.

I`m at my wits end at the mom
 
Old 11-12-2003, 11:01 AM   #2
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
bump

please help Its driving me nuts
 
Old 11-12-2003, 11:54 AM   #3
LittleA
LQ Newbie
 
Registered: Feb 2003
Location: in a house
Distribution: Slackware/Linux From scratch
Posts: 8

Rep: Reputation: 0
Re: Kppp Setup. Im lost :(

Quote:
Originally posted by kopite
First off hi peeps. i`m a complete linux newbie.

I`ve installed slackware with help from a mate but now I`m trying to connect to my isp.

I load up kppp I put the phone number in as well and then my user name and password.

When i click connect it rings and the lights come on on the modem. THe log says starting pppd but it always times out. WHat am I doing wrong? Are there some setting I need to do.

I`m at my wits end at the mom

So, what is your setup ? How exactly did you go about ?
What does your provider need ?
 
Old 11-12-2003, 12:24 PM   #4
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
On the web site it gives these instructions for linux but as I said I`m new and havent got a clue of how to use it
Quote:
Preparation
You will need to be the 'root' user to follow these instructions. These instructions apply in general to using a 'real' modem, that is a Modem which does not require a software driver to run such as many winmodems. If you think your modem is one of these click here.

1 . Connecting the Modem
The communications ports in Linux are named differently than in windows. The correct communications port to use are the devices listed in the /dev directory which begin ttyS followed. Examples are /dev/ttyS0, /dev/ttyS1, /dev/ttyS2 and /dev/ttyS3 for Com ports 1 to 4 respectively. In this example the modem is connected to Com2. You may also wish to ensure that your com port is operating at an appropriate speed. You can use the setserial command to inspect and amend the settings for the com port.

[root@ashaman]# setserial -g /dev/ttyS1
/dev/ttyS1, UART: 16550A, Port: 0x03f8, IRQ: 4

Most distributions provide a rc.serial or serial script in the init directories. These set the com port flags at boot time for each com port. If you cannot locate these or have reasons for setting com speeds differently then you might create the following shell script, not forgetting to chmod +x the script before running it.

setcom1.sh
#!/bin/bash
setserial /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_vhi skip_test

If you ran the above your com port may look like.

[root@ashaman bin]# setserial -g /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4, Flags: spd_vhi

2. Ensuring your requests for the internet are responded to
[root@ashaman nik]# cat /proc/sys/net/ipv4/ip_forward 1

If you see 0 here then you can set this value tru by typing.

[root@ashaman nik]echo 1 >/proc/sys/net/ipv4/ip_forward

You may wish to ensure that this value is set every time that the ppp connection is requested. Later in this guide an example is given as to how to place this in a shell script before starting pppd.

3. Ensuring that your machine is secure
To provide a firewall and protect your machine from unwanted access you should implement an ipchains rule set to control access and stop unwanted visitors. Simply click here, unpack the files and place the file firewall.sh in /usr/sbin ensuring the file firewall.sh is executable. You can enable the firewall by specifying the
name of the external ppp device, usually zero and in the internal networking device.

[root@ashaman]firewall.sh ppp0 eth0

Note eth0 is necessary where you are using Linux as a gateway between the internet and a local area network, otherwise the following command will protect your machine.

[root@ashaman]firewall.sh ppp0

4. Resolving names on the internet
You will need to let Linux know how and where to locate internet sites. This guide assumes that you are not using Domain Name Server local to your box. You will need to amend at least two files. By default your Linux distribution will have configured the other host files correctly.

/etc/host.conf
order hosts,bind
multi on
/etc/resolv.conf
nameserver 212.159.13.49
nameserver 212.159.13.50
/etc/hosts.deny
ALL:ALL

5. Configuring PPP
Distributions of Linux vary, but in general the configuration files for PPP will be stored in /etc/ppp . In the example a simple ppp options file will be created along with a chat script (which will dial the Modem). PPP connections will vary depending on the service you are dialling. You will need to amend the chat script accordingly and this is highlighted below. PPP Connections come in two parts: the chat script and the pppd options.

5.1 Chat Script

To dialup on a Connect account.

/etc/ppp/connect.sh
#!/bin/sh
exec chat -s -v \
SAY "Set modem responses" \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
ABORT '\n% Authentication failed\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
SAY "Send number " \
TIMEOUT 5 \
SAY "Set modem Reponses" \
OK "ATX4V1Q0S7=70" \
OK "ATM0L0DT0808,9933,0xx" \
TIMEOUT 45 \
SAY "Wait for connect" \
CONNECT '\c'


Note: replace xx with the appropriate number for the Connect service you are using.

To dialup via 0845

/etc/ppp/dial0845.sh
#!/bin/sh
exec chat -s -v \
SAY "Set modem Reponses" \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nBLACKLISTED\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
SAY "Send number " \
TIMEOUT 65 \
SAY "Set modem Reponses" \
OK "AT&F" \
OK "ATM0L0DT0845xxxxxx" \
SAY "Wait for connect" \
CONNECT '' \
Login:--Login: [your username here] \
Password: [you password here]


NB: replace xxxxxx with the appropriate number for your account type.

If you want to configure your modem more accurately then ensure that you surround the AT command with quotes. More details are available here. Remember to set the scripts as executable e.g. chmod +x dial0845sh

5.2 PPP Options
Options file for dialup on a Connect account.

/etc/ppp/options
name [your username here]
hide-password
ipcp-accept-remote
ipcp-accept-local
connect-delay 2
passive
noauth
defaultroute
require-chap
asyncmap 0
demand
maxfail 0
holdoff 1
connect /etc/ppp/connect.sh
lock
crtscts
idle 1800
modem
netmask 255.255.255.0

Note you need to use either connect.sh or dial0845.sh as the connection script. For more information about these options try man pppd.

5.3 Other Script options
/etc/ppp/chap-secret
[your username here] * [your password here]
/etc/ppp/ip-up.local
#!/bin/bash
firewall.sh ppp0

Remember to use firewall.sh ppp0 eth0 for a local area network.

5.4 To Launch ppp
[root@ashaman]/usr/sbin/pppd /dev/ttyS0 115200 noauth

From here ppp should become enabled once a request has been made to access the internet. Once PPP is running it will automatically start the chat script to dial the modem and access the internet . If you wish to stop the pppd process you will need to locate its process ID and stop it. This can be done with the following command

[root@ashaman] ps -ax | grep pppd
29064 ttyS1 S 0:00 pppd

The value 29064 is the process id of the running pppd application. You can also find this value by typing the following command

[root@ashaman] cat /var/run/ppp0.pid 29064

In either situation you can stop the process by issuing the kill command

[root@ashaman] kill 29064

Or you could type

[root@ashaman] kill `cat /var/run/ppp0.pid`

6. Making life simpler
Some example scripts to automate stopping and starting ppp
/root/bin/connect.sh
#!/bin/bash
internetdown
ifconfig ppp0 down
echo 1 >/proc/sys/net/ipv4/ip_forward
pppd /dev/ttyS1 115200 noauth
echo "done." /root/bin/internetdown.sh
#!/bin/bash
for pppdevice in /var/run/ppp?.pid
do
if [ -f $pppdevice ]
then
kill `cat $pppdevice`
fi
done
 
Old 11-12-2003, 03:09 PM   #5
dd78749
LQ Newbie
 
Registered: Oct 2003
Location: Austin, TX USA
Distribution: Slackware 9.1
Posts: 12

Rep: Reputation: 0
Click on the SETUP button and then click on DEVICE and make sure your modem is set to /dev/modem. Also be sure that /dev/modem is pointing to the correct device, such as (/dev/modem --> ttyS0). Also, check to see if KPPP is obtaining the DNS nameserver addresses dynamically. If not, you'll need to enter them manually. Check with your ISP if you don't know what they are.

If everything is set up right there and it still doesn't work, run pppsetup as root and enter the info manually. KPPP will read the info from the same ppp configuration files that pppsetup creates.
 
Old 11-12-2003, 03:23 PM   #6
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
The modem is pointing to the right place, i`lll try pppsetup and see if that works.
cheers mate
 
Old 11-12-2003, 04:03 PM   #7
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
Just tried that and it still dont work

Starting to think Its not gonna work

My isp doesnt support linux and are being as much help as a chocolate teapot
 
Old 11-13-2003, 12:24 AM   #8
dd78749
LQ Newbie
 
Registered: Oct 2003
Location: Austin, TX USA
Distribution: Slackware 9.1
Posts: 12

Rep: Reputation: 0
Try another modem initialization string. KPPP defaults to "ATZ" and although that works for most modems, you may be one of the unlucky ones where it doesn't. Check your modem manufacturer's website for the correct init string and try again. If perchance you have a US Robotics modem, one of these three will almost always work: "AT&F" "AT&F1" or "ATZ".

If your modem is dialing and the ppp daemon is running, the only things I think could be causing the problem would be incorrect DNS IP addresses in your /etc/resolv.conf file or an incorrect modem init string.
 
Old 11-13-2003, 06:31 AM   #9
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
I`ll give it a try.

thanks again
 
Old 11-13-2003, 06:45 AM   #10
mjolnir
Member
 
Registered: Apr 2003
Posts: 661

Rep: Reputation: 68
I am not a modem expert but it might have something to do with the timeout setting.
Check out these threads:http://www.linuxquestions.org/questi...=modem+timeout
http://www.linuxquestions.org/questi...der=descending
 
Old 11-13-2003, 01:01 PM   #11
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 551

Rep: Reputation: 43
ISP's usually say they don't support Linux but what they mean is they are not going to provide technical support to users who are having setup/config problems. For MS it's one way only and easy to provide setup aps and telephone advice. There are too many distros/aps/configs for them to cover with Linux and its not worth the effort for a "small share of the market".

There's a 70% chance your ISP is running linux bsd or unix somewhere in there system and in any case internet protocols don't care what O.S. they go through.

Did you set up a loopback network in netconfig during the install? Even if your not part of a network you will need to have loopback running for an internet connection.

Can't check my kppp setup because I'm online but from memory here's some ideas.

There is a dns tab in kppp setup. it should be set to automatic and have your isp's url without the leading www, e.g. bozonetisp.com.au. If this is not right it won't work.

Set your timeout as long as it will go

Did you try to query you modem in kppp setup. You will find out there whether it is "atz" or "atzd" or whatever

Just guessing but have you considered a permission problem?

Try to connect withh kppp when logged in as root. Don't stay connected long as it's not a good idea but connect long enough to ping another website like google. If you connect and log into the ISP and can ping someone other than the ISP as root than you may need to do something about permissions or make users a member of a group that will give them access to the modem or pppd.

I use a winmodem and when I compile my drivers with ltmodem a /dev/modem is created and it belongs to uucp. I make the users members of that group and there is no problem.

Also, what error messages (if any) are you getting in /var/log/messages and /var/log/syslog? Does kppp popup and give you an error message? what is/was it?

Perhaps that will give you some directions. Note that you do not need to run pppsetup to get kppp to work, but after using pppsetup and creating a loopback network in netconfig
 
Old 11-14-2003, 04:23 AM   #12
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
I am trying to connect as root. I know its not the best idea but I just wanna get a connection up then sort things wout.

In the var/log/messages it says disconnecting on status 15. DOes that mean anything to peeps?
 
Old 11-14-2003, 02:44 PM   #13
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 551

Rep: Reputation: 43
By typing "man pppd" in a shell you will get the man page for the pppd daemon,
and if you scroll down the page you will come to a list of error numbers with
corresponding text. Here, I believe, is the entry for your "status 15"

15 The link was terminated because the peer is not responding to echo
request.

Now I could google this for you but you won't learn anything and I have to go to
work today.

Also try running kppp from a shell. All kde aps can be run from a shell and you
will have messages print to the terminal while the program is starting up. You
may get a little more insight doing that.

By using the search words "pppd+peer is not responding" the below showed up as
third listing on the first page of of the google search results.

<snip>
Authentication with PPP
.. If the peer does not support it, or if pppd can't find a CHAP secret for the
remote system in its chap-secrets file, it reverts to PAP. ...
www.faqs.org/docs/linux_network/ x-087-2-ppp.authentication.html - 17k - Cached
<snip>

Also have you tried running pppsetup? If you have then you should then try
logging in using ppp-on ( /usr/sbin/ppp-on ). This too will either get you
connected or give you error messages possible pointing to why you can not
connect.
 
Old 11-17-2003, 12:21 PM   #14
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
thank mate

I`ll give that a go.
 
Old 11-17-2003, 01:08 PM   #15
daYz
Member
 
Registered: Nov 2003
Distribution: Debian
Posts: 164

Rep: Reputation: 30
I had my internet connection working by running "netconfig", submitted a random name, then a random domain name, and at the end I chose loopback instead of DHCP or a static IP.

Before this I could see that I had an internet connection by running "ifconfig", but I couldn't get any other connection.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kppp (+ other various things) gone, lost SP7 MEPIS 1 08-29-2005 03:39 PM
KPPP setup for dial-up internet connection (Indian ISP)... DesiLILO Linux - Software 0 06-14-2004 09:04 PM
Kppp Dialog Setup Help Needed lmanwarren Linux - Newbie 2 10-17-2003 09:00 PM
kppp setup dialogue problem (+various kde apps) cassidy Slackware 10 09-22-2003 08:40 AM
Redhat 9 - Kppp setup problem Cygnusb Linux - Newbie 3 09-17-2003 01:34 PM


All times are GMT -5. The time now is 09:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration