LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-16-2009, 04:32 PM   #1
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Rep: Reputation: Disabled
cannot connect to host problem


After trying different ways to backup my ubuntu installation, and failing, I am going back to Kubuntu, which I liked better anyway, and I can do things a lot easier.

I am so far using the live cd kubuntu 8.04 and it has Keep so that backus is easy...now for the next lesson:

after I set up kppp the modem dials out and connects...all the external indicator lights show as good...when i try to go to any website using Konqueror i get :

Quote:
an error ocurred while loading http://www.anywebsite.com
could not connect to host http://www.anywebsite.com
where "anywebsite" is any website I try, yahoo.com, google.com, linuxquestions.org, etc. "anywebsite" is not a valid link, just using it as an example.

Any help is appreciated. Thanks in advance.
 
Old 04-17-2009, 08:50 AM   #2
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Looks like either a DNS or a routing (or both) issue.

Check your "/etc/resolv.conf" for DNS servers and/or add a default route to the outbound connection with:
Code:
route add default <gateway address>
Good luck!
 
Old 04-17-2009, 02:44 PM   #3
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Thank you for your reply, Ramurd. I looked at resolv.conf and there are 2 entries...nameserver xx.xxx.xxx.xx, So i don't think thats the problem.

Problem not fixed. Any help would be appreciated. Thanks in advance.

Last edited by joseph2020; 04-17-2009 at 11:58 PM. Reason: further help needed
 
Old 04-18-2009, 04:26 AM   #4
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
There often are >1 nameservers. What you can do is try to traceroute the nameservers and see if you can reach them.
I'm still betting on a default route that didn't get set.

Run the following commands su-ed to root and could you share the output?
Code:
route
Code:
ifconfig -a
 
Old 04-18-2009, 04:14 PM   #5
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
i need to take a break

Last edited by joseph2020; 04-18-2009 at 05:32 PM.
 
Old 04-18-2009, 05:19 PM   #6
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
I tried the same commands from Kubuntu Live CD (the one that doesn't connect to websites)

heres the output:
Code:
ubuntu@ubuntu:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
den-01.cvx.algx *               255.255.255.255 UH    0      0        0 ppp0
default         *               0.0.0.0         U     0      0        0 ppp0
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:92:92:0c
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16 Base address:0xd000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:64.48.158.42  P-t-P:67.95.10.110  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:6371 (6.2 KB)  TX bytes:5093 (4.9 KB)

ubuntu@ubuntu:~$
What do you think?....thanks again!

Last edited by joseph2020; 04-18-2009 at 05:31 PM.
 
Old 04-19-2009, 01:31 AM   #7
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
I have used wvdial, pppconfig, pon/poff before and always found if that worked for websites I could get gnome ppp or kppp to work.

found this on a search:

Quote:
If you find that you connect successfully, but cannot open any webpages in Firefox then add line default route to /etc/ppp/peers/wvdial
Definetely defines my problem...but what does this mean??

"add line default route to /etc/ppp/peers/wvdial"

Any help with translation appreciated. Thanks in advance.
 
Old 04-20-2009, 09:21 AM   #8
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
sorry for the wait, was having a weekend with beautiful weather ;-)

Anyway, looked up some on the internets (google is a good friend, mind) it seems to me that this is giving some clues:
Quote:
cat /etc/ppp/peers/wvdial
noauth
name wvdial
usepeerdns
record /var/wvdial-debug.log
(the usepeerdns might be a nice one to use nameservers)

You could add a line to that file that reads either
Code:
default route
or
Code:
defaultroute
You also stated
Quote:
I looked at resolv.conf and there are 2 entries...nameserver xx.xxx.xxx.xx
Can you do:
Code:
traceroute xx.xxx.xxx.xx
(for each nameserver listed in resolv.conf where xx.xxx.xxx.xx is each IP listed there.)

If this is succesfull, you can do:
Code:
nslookup www.google.com
and see if you get an IP back from the DNS.
 
Old 04-20-2009, 04:12 PM   #9
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Ramurd:

I'm happy to hear you had some nice weather to play in...Here in Colorado it snowed about a foot of very wet snow, but today it's 72 F degrees.

I just copied what you said and will boot up Kubuntu and see what happens and try using suggestions. I have a bad feeling though because I could not find the /etc/ppp/peers directory when I tried it last night.

Regardless I will try the "default route" and traceroute commands and report back with the output.

Thanks again for your help and your patience.
 
Old 04-20-2009, 06:11 PM   #10
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Ramurd:

We ar so close now I can almost taste it. It looks like the connection is going out there, notice I downloaded Kedit (first grouping) from the internet, but still can't use a browser.

Code:
ubuntu@ubuntu:~$ sudo apt-get install kedit
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  kedit
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 128kB of archives.
After this operation, 496kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com hardy-updates/main kedit
4:3.5.10-0ubuntu1~hardy1 [128kB]
Fetched 128kB in 25s (4996B/s)
Selecting previously deselected package kedit.
(Reading database ... 96037 files and directories currently installed.)
Unpacking kedit (from .../kedit_4%3a3.5.10-0ubuntu1~hardy1_i386.deb) ...
Setting up kedit (4:3.5.10-0ubuntu1~hardy1) ...
----------------------------------------------
added defaultroute to wvdial:


Code:
ubuntu@ubuntu:~$ nano  /etc/ppp/peers/wvdial

noauth
name wvdial
usepeerdns
defaultroute
-------------------------------------------------------

Trying traceroute manually:

Code:
ubuntu@ubuntu:~$ sudo traceroute 67.221.172.29
sudo: traceroute: command not found
ubuntu@ubuntu:~$ sudo trace route 67.221.172.29
sudo: trace: command not found
ubuntu@ubuntu:~$
-------------------------------------------------------

trying nslookup:


Code:
ubuntu@ubuntu:~$ sudo nslookup www.google.com
Server:         67.211.172.29
Address:        67.211.172.29#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 74.125.115.103
Name:   www.l.google.com
Address: 74.125.115.99
Name:   www.l.google.com
Address: 74.125.115.104
Name:   www.l.google.com
Address: 74.125.115.147

ubuntu@ubuntu:~$
Looks to me like everything works, except for the browser...If i could get firefox to download and install...wondering if that would fix the problem, possible (but unlikely) that Konqueror doesn't work correctly?

Let me know what you think of the output. Thanks again!
 
Old 04-22-2009, 02:24 AM   #11
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Wow, (K)Ubuntu doesn't come with traceroute? A pretty big miss as it's a great tool to determine some issues.

Yet, you indeed managed to get connections with the internet, based on what you printed.
The problem may be as simple as a configuration setting on how Firefox connects to the internet.

If start Firefox and then in the top menu Edit->Preferences
Click the Advanced button, then the Network tab and there the Settings button. You can try system proxy settings.

If it is on there and still not working, then the problem may reside in a so-called transparent proxy; but to be honest I find this situation quite unlikely.
By chance do you have a (basic) firewall running? You can try that out with
Code:
sudo iptables -L
 
Old 04-22-2009, 03:21 PM   #12
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Ramurd:

Thank you for your reply.

Quote:
If start Firefox and then in the top menu Edit->Preferences
Click the Advanced button, then the Network tab and there the Settings button. You can try system proxy settings
I will need to download firefox again, and it takes over 30 minutes at dialup speeds. I did that the other day, and everything seemed fine, except I couldn't find firefox anywhere (probably because I am using the livecd version of Kubuntu), so I am stuck with Konqeror for the moment. Now, I'm wondering if Konqueror has the proxy settings capabilities.

Someone else suggested that in the Kubuntu forum, so I am going to go look for the proxy settings now. Thanks again.
 
Old 04-22-2009, 06:33 PM   #13
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
I checked proxy setings in Konqueror (the Kubuntu browser) and it shows up just like firefox: no proxy, connect direct to internet.

I saw this on one of my searches, if it makes any sense to you, please tell me how to implement it.

Quote:
Problem:

Used kppp to set up modem dialup.

It connects to ISP but no Internet access.

I've seen this problem before.

Solution is to delete a line from the Kernel IP routing table

root@ubuntu:/media/dvdrecorder# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ra0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ra0

The second line needs to be deleted because it interferes with pppd.

root@ubuntu:/media/dvdrecorder# route del -net 0.0.0.0 netmask 0.0.0.0 dev ra0

Deletes it.

After deletion, I can use kppp to connect to The Internet and everything works OK.
For starters there's no file named dvdrecorder under media, neither in Ubuntu or Kubuntu, which makes sense since I don't have a dvd hooked up. But, is there another way to access the "Kernel IP routing table" info, another directory ? another command?

I am ready to just give up and use Ubuntu for now...If you have any final ideas or thoughts I would be happy to try it. Nothing about this makes sense and honestly I am willing to declare defeat and use Ubuntu until I can figure out some other way. Maybe someday.

Thanks much for all your help.
 
Old 04-24-2009, 07:42 AM   #14
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Quote:
root@ubuntu:/media/dvdrecorder# route -n
If you see a line like this, it's practical to know what the prompt is and what the command:
Everything before the "#" is the prompt, normally the "#" is used to indicate that you're working under the user "root" (so you must be extra careful). Normal users normally come with a dollar sign ($) as the end of their prompt.

The prompt you quoted said "user root AT machine called ubuntu whose current directory is /media/dvdrecorder" and then he runs the command "route -n".

This command you can run by yourself (as root) from any directory (given that the route command is in your path, which it should be).

The quote you took gave the command "route -n" which resulted in the output that was below it: (I added spaces for readability)
Code:
Kernel IP routing table
Destination  Gateway      Genmask        Flags Metric Ref Use Iface
192.168.0.0  0.0.0.0      255.255.255.0  U     0      0   0   ra0
0.0.0.0      192.168.0.1  0.0.0.0        UG    0      0   0   ra0
Here the default route ran to the host 192.168.0.1, which could've resulted in the wrong interface being selected (probably the ethernet card) (ra0 doesn't really ring a bell what kind of device this is, maybe wireless) instead of the route that should become default.

Think of routes just being those signs near crossroads you sometimes can see:
You get there and you see a sign reading:
"<-- Denver | Other destinations-->"
If you have to to go Denver you should turn left, if you need to go anywhere else you go to the right. The latter is the default route, and if it points you to the wrong direction the "traffic" gets lost. (Computers really are dumb things that do exactly as you tell them)

Now if your default route changes, because you just built a connecting road to the outside world (so you actually can get there) (read: you just dialed in) the signs for your computer to go to "the other destinations" has to be replaced, by removing the old one with a new one:
Code:
route del -net 0.0.0.0 netmask 0.0.0.0 dev ra0
or
Code:
route del 0.0.0.0/0
should work as well.

(it's been a long time ago that I had to manually set routes, am not 100% sure if you could do it easily this way by setting the device to go to by default; Otherwise add the default route with the IP number your ISP gave you: route add default aaa.bbb.ccc.ddd)

However since you could get something from the internet (your wget for the apt-get) I don't think it's a kernel routing issue; But, to be honest: it's worth trying ;-)

Question: does Konqueror allow you to connect to google or do both Firefox and Konqueror give issues?
If Konqueror can browse the internet and Firefox won't something is wrong with Firefox and we're searching in the complete wrong direction of issues. If both won't connect, it may well be possible something is odd with the connection (routing table, firewall, proxy, DNS etc)
 
  


Reply



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
Problem config NX to connect to Linux host from MS machine phoenixenigma Linux - Software 4 01-08-2006 08:01 PM
Can't connect to host localhost Scoobsky Linux - Networking 3 10-26-2005 11:47 AM
unresolved host - trying to connect ktjuano Linux - Newbie 2 05-16-2005 03:33 AM
host to connect to itself through eth0 ? vlad Programming 1 02-01-2005 01:29 PM
Same host to connect to itself over eth0 ? vlad Linux - Networking 2 12-15-2000 10:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration