Click to See Complete Forum and Search --> : Can't ping using hostname from linux


dperez
12-19-2002, 01:17 AM
Hi
I have DNS setup on my server. If I try to ping any of the PCs on my network using the hostname from the linux box, I get an unknown host error. If I ping from windows to windows computers, it works fine. I can also ping the linux server using the host name from a win machine. I have no problem pinging internet addresses using hostnames from either windows or the linux box. Is there a setting I'm missing? I'm also using DHCP on the linux server. Any tips?

Here is my named.conf...

options {
// DNS tables are located in the /var/named directory
directory "/var/named";
pid-file "/var/run/named/named.pid";

// Forward any unresolved requests to our ISP's name server
forwarders {
24.160.227.33;
// __ISPN2__;
};
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

zone "." {
type hint;
file "root.hints";
};
// All our DNS information is stored in /var/named/domain.name.db

zone "mke-icafe.com" {
type master;
file "mke-icafe.com.db";
// some security
allow-transfer { 127.0.0.1; };
};

zone "0.0.127.in-addr.arpa" {
notify no;
type master;
file "127.0.0.rev";
allow-transfer { 127.0.0.1; };
};

zone "1168192.in-addr.arpa" {
notify no;
type master;
file "192.168.1.rev";
allow-transfer { 127.0.0.1; };
};

Thanks
Dennys

ilin
12-19-2002, 09:26 AM
I think that the problem might be it the /etc/resolv.conf file.
If that file points to another DNS server, not to yours, you'll be able to ping other PCs on Internet, but you will not be able to see the internal PCs. Change the settings in the /etc/resolv.conf with that below (and only that):

nameserver 127.0.0.1

I hope it will work for you!!!
Bye and luck!:)

dperez
12-19-2002, 04:34 PM
Originally posted by ilin
I think that the problem might be it the /etc/resolv.conf file.
If that file points to another DNS server, not to yours, you'll be able to ping other PCs on Internet, but you will not be able to see the internal PCs. Change the settings in the /etc/resolv.conf with that below (and only that):

nameserver 127.0.0.1

I hope it will work for you!!!
Bye and luck!:)

I checked my /etc/resolv.conf and I only have:

domain mke-icafe.com
nameserver 192.168.1.100

(^^^ this is the ip of my linux box).

Should I still have to change it to 127.0.0.1?

Thanks
Dennys

ilin
12-20-2002, 05:49 AM
Well, if that is your PC's IP address then maybe the problem isn't there, but yet you can only try to put in resolv.conf only

---- nameserver 127.0.0.1-----

But :confused: other thing that comes into my mind is if eventually you have configured some firewall it's very likely the problems to come from that firewall config. Meanwhile I've had similar problem and the cause was right in rules of iptables. I've made a post here in a few weeks ago. The title of my post was:
Iptables is blocking DNS queries
Now its on page 3 of the "Networking linux" part of the linuxnewbie forum.
If you have firewall take a look at my thread. :rolleyes:

try that link:

http://linuxnewbie.org/forum/showthread.php?s=&threadid=78420

dperez
12-20-2002, 10:55 AM
Well,
I tried that and still didn't work. I couldn't even dig or nslookup any external hosts.
I don't have a firewall. All I have is a linksys dsl/cable router.

Any other suggestions?

Thanks in advance
Dennys

dperez
12-24-2002, 05:11 PM
Hello...
I noticed that on the win machines, I have a WINS ip address equal to my DNS server's IP. Is this why I can resolve the host names from the windows boxes and not from the linux one? Do I need to setup a WINS server also on the linux box?

Thanks
Dennys