unable to ping or ssh in ubuntu 9.04

Asked by zagg

Hi,
I was using ubntu 9.04 by dual booting it inside windows but then i installed it outside windows as an independent OS. Earlier ping and ssh all were working fine but now neither ping nor ssh work.
1)ping google.com says "ping:unknown host google.com"
2)ssh google.com says "could not resolve the hostname"

what i dont understand is that when i had installed it inside windows it was working perfectly but now when i have installed it outside ping ssh sftp and mail client too have stopped working...I am able to browse the internet though. I used ext2 as the filesystem while installing it.Could that be the source of the error !!!!
 I have just switched on to ubuntu.Hope somebody can help me....

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Solved by:
zagg
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Seem you need to specify a valid DNS on your configuration...

How have you set your network layer configuration as dhcp or with fixed ip... ? Please tell us something more...

Can you surf the net using Firefox...?

Thank you

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#2

I thing DNS is set properly. I have set the network layer configuration as fixed ip.. and I am able to surf the net using Firefox...

ssh -vv option outputs---
"OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
"

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#3

Hi marcobra,
I think DNS is set properly. I have set the network layer configuration as fixed ip.. and I am able to surf the net using Firefox...

ssh -vv server_name outputs---
"OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname **************: Name or service not known
"

even if i use the ip of the ssh server,i.e. "ssh -vv server_ip" the output is----
"OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.20.5.2 [10.20.5.2] port 22.
debug1: connect to address 10.20.5.2 port 22: Connection timed out
ssh: connect to host 10.20.5.2 port 22: Connection timed out
"

(10.20.5.2 is the server's ip i am connecting to...)

there is definitely no problem with the server as i can ssh it from windows.

thanks

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

I think you must dress the ssh options...

man ssh

Using ssh in my private network... works

ssh -vv ubuntu@192.168.1.64

But with your

ssh -vv option outputs--- ubuntu@192.168.1.64

I get dns error...

 ssh -vv option outputs--- ubuntu@192.168.1.64
OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname option: Name or service not known

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Plase also check the nat and port redirection rules of your router and or firewall if there are any...

Hope this helps

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#6

Hi,
10.20.5.2 is my college's server ip which is accessible only from inside the campus. thats why you cant ssh to it...besides i cannot ssh to any other server also not just 10.20.5.2.. also , "-v" option is just for more debugging information as the man pages says.

Can you please tell me some detail about the nat and port redirection rules of router / firewall u mentioned. One thing is for sure that the problem is only in my system as i am able to ssh through putty in windows (as mentioned earlier)

Thanks for ur help...

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#7

I think there is some problem in my kernel IP routing table as the destination shows 10.160.0.0 while my ip (statically set) is 10.160.0.5 and the gateway should have shown 10.160.1.1..... How do I correct this and what could be the reasons for the table showing wrong entries??

$-netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.160.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.160.1.1 0.0.0.0 UG 0 0 0 eth0

Thanx for any help ...

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#8

Hi, please ignore the above message as netstat -nr shows the same entries in my friends laptop (ubuntu 8.04) although it can successfully ping and ssh.

Please somebody help me as i have been struggling for a long time to get these working....

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#9

If it is an internal server i think you must not ( i mean: you cannot ) play with some router under your control.

Can you send here the complete terminal command you type when you try to access to it...

Thank you

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#10

:~$ ssh 10.20.5.2

and the output is "ssh: connect to host 10.20.5.2 port 22: Connection timed out"

I am using just this command. What bugs me is that it was working perfect when i was using ubuntu installed inside windows and now it doesn't. besides ssh, ping is also not working .

When I "ping google.com" it says "ping: unknown host google.com"
and when i ping google's ip i.e. "ping 66.102.9.147" the output is
 "PING 66.102.9.147 (66.102.9.147) 56(84) bytes of data.
^C
--- 66.102.9.147 ping statistics ---
134 packets transmitted, 0 received, 100% packet loss, time 133987ms
"

I am sorry if I am bothering you too much but please bear considering i am total newbie...

Revision history for this message
azwan ali (novatech) said :
#11

zagg what do you mean install inside/outside windows?
did your network use proxy?

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#12

inside windows means WUBI
outside windows means a general dual boot with windows
yes my network does use proxy.

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#13

I changed the dns and ssh has started working .... although ping for systems outside my campus still not working... all the packets are lost.. does that have something to do with the proxy. ?? ...

Revision history for this message
azwan ali (novatech) said :
#14

try set auto detect proxy/or you campus spesific proxy at
system>preference>network proxy and apply it for system wide
i think its related to proxy since you can surf through firefox, test it by
telnet google.com 80

hope this will help

Revision history for this message
zagg (sagar23jan-rediffmail) said :
#15

i have dont that but no success.telnet google.com 80 says

"Trying 74.125.45.100...
Trying 74.125.67.100...
Trying 74.125.127.100...
telnet: Unable to connect to remote host: Connection refused"

anyways my ssh problem has been solved ..