Click to See Complete Forum and Search --> : Dns not working


AntiWindows
07-11-2003, 03:16 AM
Dns not working on my linux box with redhat 8, it works on my windows box though and i have the right dns addresses in resolv.conf, so wuts the problem?i can browse sites by ip and connect to stuff by ip but not my domains. Ive seen people with same problems but i tried wut they did to fix theres and didnt work.

cowanrl
07-11-2003, 06:45 AM
One easy test to make to see if Linux is actually using the DNS servers you set in resolv.conf is to execute nslookup from the command line. You should get an error message about nslookup being deprecated but it will give you the nslookup command prompt.
Just type in some kind of a hostname such as www.justlinux.com and it will display the DNS server it contacted and try to resolve the hostname.

Check that the DNS server it contacted is one of the ones in resolv.conf. Does it resolve the host name you typed in? If not, can you ping the DNS server. You may not have connectivity to it.

If you can ping the DNS server but you can't get any name resolution through it, you may have a firewall issue. Try executing as root:

service iptables stop
and
service ipchains stop

then try your name resolution again.

serz
07-11-2003, 10:24 AM
What do you have in your /etc/resolv.conf?

Are you sure that you have something like this:

nameserver IP

?

the "nameserver" has to be there.

AntiWindows
07-11-2003, 12:03 PM
When i tried nslookup for google it said connection timed out,Also i can ping my dns servers ip's,also in my resolv.conf i have it as
nameserver ip

Hayl
07-11-2003, 12:10 PM
post your /etc/resolv.conf

AntiWindows
07-11-2003, 12:30 PM
nameserver 68.10.16.25
nameserver 68.9.16.30

mdwatts
07-11-2003, 12:38 PM
Originally posted by AntiWindows
nameserver 68.10.16.25
nameserver 68.9.16.30

You could try adding your isp's domain as

domain isp_domain.com
nameserver 68.10.16.25
nameserver 68.9.16.30

or

search isp_domain.com
nameserver 68.10.16.25
nameserver 68.9.16.30

Are you going through a router or directly connecting?

< searching keywords >

dns resolv.conf domain router

cowanrl
07-11-2003, 04:39 PM
Originally posted by AntiWindows
When i tried nslookup for google it said connection timed out,Also i can ping my dns servers ip's,also in my resolv.conf i have it as
nameserver ip

If you can ping your DNS servers but nslookup times out, you have something blocking your DNS requests. Did you try stopping the firewall?

I ran nslookup and did a lookup on www.google.com against your primary DNS server from my Red Hat 9 machine here and it worked OK.

AntiWindows
07-12-2003, 09:25 PM
I have a router.

mdwatts
07-13-2003, 07:50 AM
Originally posted by AntiWindows
I have a router.

Then the dns entry in /etc/resolv.conf and your gateway address should both point to the routers ip address.

Mine is 192.168.1.1 for my routers ip address and in my /etc/resolv.conf and my gateway address.

domain mdwsystems.net
search mdwsystems.net
nameserver 192.168.1.1

/etc/sysconfig/network/routes

default 192.168.1.1

AntiWindows
07-13-2003, 11:13 PM
so it should be
domain cox.net
search cox.net
nameserver 192.168.0.1

mdwatts
07-14-2003, 11:00 AM
Originally posted by AntiWindows
so it should be
domain cox.net
search cox.net
nameserver 192.168.0.1

If your routers ip address is 192.168.0.1, then that would be correct.

I have my Linksys router setup with my sorta private domain of mdwsystems.net since it doesn't matter as the router finds my isp's domain and dsn servers for me.

As long as I point my /etc/resolv.conf dns address to the routers and also have my gateway address set to the same, it all works.

AntiWindows
07-14-2003, 12:24 PM
sweet it worked thx!