LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   unable to ping or ssh in ubuntu 9.04 (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-ping-or-ssh-in-ubuntu-9-04-a-748933/)

zagg 08-20-2009 01:29 AM

unable to ping or ssh in ubuntu 9.04
 
Hi,
I was using ubntu 9.04 by dual booting it inside windows(WUBI) 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 10.20.5.2 says "could not resolve the hostname"
(which is a local ssh server of my college.)

what i dont understand is that when i had installed it inside windows(WUBI) 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(with ease).Could that be the source of the error !!!!

If i ssh with the name of the server the error returned is could not resolve the hostname. If I rather give the ip addr of the server then the request times out.

Also i am behind a squid proxy server for external net access.

I have just switched on to linux. Hope somebody can help me....

timvandijk039 08-20-2009 02:19 AM

Hi Zagg,

From what I know of WUBI is that it will install Ubuntu on your system from a Windows installer. De end result however is the same as a normal installation.

With regards to your problem:
It seems to me that you have a problem with your name resolution. When you use DHCP check if a DNS server is provided (cat /etc/resolv.conf) and also if that DNS server is set to resolve names other than it's own domain.

If you have a static ip than check if the correct DNS server is set (cat /etc/resolv.conf). Here a short example:
Code:

domain example.com
search example.com
nameserver dnsserver1.example.com
nameserver dnsserver2.example.com

It would appear that the reason you still can use your browser to visit internetsites is because of the squid proxy server which handles all dns queries for you.

Hope this helps and have fun with Ubuntu. It's realy great ;-)

zagg 08-20-2009 03:37 AM

thanks a lot
 
Hi timvandijk039,

Thanx a lot for being so informative. Earlier I was using dns server's ip as(statically set) '10.10.2.1' and '10.10.1.2' as these work fine on my friend's laptop. I just changed the entry '10.10.1.1' to it and now its working like a magic.. I would like to know why the same dns ip work for my friends but not for me. Anyways thanks again for solving it....

Although I still cant ping to system outside my campus like google.....

timvandijk039 08-20-2009 03:58 AM

Not sure why the DNS servers 10.10.2.1 and 10.10.1.2 aren't working. But because you also pointed out that you couldn't ping Google outsite your campus you could be dealing with one or more firewalls.

For DNS, UDP port 53 (some tools use tcp port 53) must be open on the firewall. For ping the firewall needs to allow the ICMP protocol. (ICMP type 8 for the ping to the remote host and type 0 for the response).

Happy hacking ;-)

repo 08-20-2009 03:58 AM

Without more info of your network, this is hard to say.
ipaddress, netmask, route, ....
Which ditribution?

post the output from
Quote:

ipconfig
cat /etc/resolv.conf
route -n
Can you ping google on IP?
Code:

ping 74.125.127.100
Can your friend ping outside the network?
Does your ip has the permission to go outside the network?
Are the ip's assigned by DHCP?
Do they use a proxy?
Hence, are you allowed to use the network?
Are there restrictions on MAC address in the firewall?
...

jschiwal 08-20-2009 04:26 AM

For the ssh client, look at the VerifyHostKeyDNS option in /etc/ssh/ssh_config. There is a similar setting "UseDNS" for the server as well, but I don't know if you control the server as well.

It is not uncommmon for network admins to have pings dropped. To test name resolution, you could try "getent hosts <domain name>". It will resolve hosts in /etc/hosts or use DNS if your /etc/nsswitch.conf and /etc/host.conf files are configured properly.

Another thing that can cause delays or lookup problems is IP v6. If your previous install didn't use it but your new install does, in an IPv4 only environment, you can have delays waiting for IPv6 lookups to timeout.

zagg 08-20-2009 04:40 AM

more info...
 
Quote:

Which ditribution?
--- ubuntu 9.04 jaunty.

Quote:

Can you ping google on IP?
--- no all the packets get lost.

Can your friend ping outside the network?
--- no, he cant ping as well..

Quote:

Does your ip has the permission to go outside the network?
--- no, since i am behind the proxy ip doesnt go outside.

Quote:

Are the ip's assigned by DHCP?
--- no, i have statically set it.

Quote:

Do they use a proxy?
--- yes, we need to connect to the proxy server.

Quote:

Hence, are you allowed to use the network?
--- yes, we are definitely allowed to use the network as I can browse the internet.

Quote:

Are there restrictions on MAC address in the firewall?
--- sorry no idea.I have disable firewalls on my system (ufw disable)

Code:

:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1d:09:af:09:ee 
          inet addr:10.160.0.5  Bcast:10.160.1.255  Mask:255.255.254.0
          inet6 addr: fec0::8:21d:9ff:feaf:9ee/64 Scope:Site
          inet6 addr: 2002:dede:dedd:8:21d:9ff:feaf:9ee/64 Scope:Global
          inet6 addr: fe80::21d:9ff:feaf:9ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:74729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14498 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16673987 (16.6 MB)  TX bytes:3942008 (3.9 MB)
          Interrupt:17

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)

Code:

:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.10.1.1
nameserver 10.10.1.2

       
Code:

       


:~$ route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
10.160.0.0      0.0.0.0        255.255.254.0  U    1      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    1000  0        0 eth0
0.0.0.0        10.160.1.1      0.0.0.0        UG    0      0        0 eth0


now i m getting how should i ask questions correctly...


All times are GMT -5. The time now is 10:53 AM.