Resolv problem

morfargekko

Verified User
Joined
Oct 21, 2007
Messages
189
Hello, one of my servers are acting funny. I can access and ping all domains from the outside but when I try from SSH I can't ping domains or IPs on the outside, they don't resolv. Even when IPtables are deactivated it doesn't work. :confused:
 
Is your server behind an firewall? If you can connect from your server to outside world uisng service like ftp, ssh, web, email etc but not ping, it seems like something in front of your server is blocking some service port.

when you ping the outside world using domain name like ping abc.com, did abc.com reslove to ip address? If yes, this is not an dns problem.
 
I can access IPs on the outside using SSH, FTP, and I can PING an IP but not when using a domain name. PING a domain isn't resolving to an IP. :(
 
Do you have your correct dns servers listed inside:

/etc/resolv.conf

make sure the nameserver listed inside are correct
 
try to run:
nslookup

then type a domain name like "hello.com"
You should see something like the following:

> hello.com
Server: 202.xx.240.221
Address: 202.xx.240.221#53

Non-authoritative answer:
Name: hello.com
Address: 63.236.5.136
> exit

[root@server2 ~]#

to see if your server can connect to the dns server.
 
Within my own subnet it works but when I try a domain outside my subnet it isn't working.

EDIT:
[root@hokus ~]# nslookup hello.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
*** Can't find hello.com: No answer
 
Last edited:
It seems there is problem with your dns setting,

You are using your local server as dns server since your screen dump show that you are using 127.0.0.1.

If the config. is ok, it should be using the nameservers listed in your resolv.conf as dns server during nslookup.


try to run:
nslookup
server x.x.x.x
hello.com

where x.x.x.x is the nameserver ip listed in your resolv.conf

If you can connect to the dns server x.x.x.x, it should be able to resolve external domain name to ip.
 
Yes that works. :)

[root@hokus ~]# nslookup
> server 213.80.98.2
Default server: 213.80.98.2
Address: 213.80.98.2#53
> hello.com
Server: 213.80.98.2
Address: 213.80.98.2#53

Non-authoritative answer:
Name: hello.com
Address: 63.236.5.136


SOLVED:

Deleted nameserver 127.0.0.1 from resolv.conf

:D

EDIT:

Thank's pkilam for the pointers.
 
Last edited:
Back
Top