LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-13-2005, 02:13 PM   #1
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Rep: Reputation: 30
sites are not resolving


New to debian. Trying to use 3.1

This is my thrid attempt to this distro. Before previous 2 attempts I also felt the problem and lost interest after some days.

The problem for me is site names are not resolving. I am damn sure that /etc/resolv.conf contains necessary nameserver entry. Still, for better understanding, I am giving the entry of /etc/resolv.conf.
Code:
nameserver 202.138.103.100
nameserver 202.138.96.2
nameserver 202.138.103.100
nameserver 202.138.96.2
In my browser, if I put the ip address of the sites, it is opening, but if I put the name of the site it is not opening.
Example, http://www.google.com is not opening the site, but 66.249.89.104 is opening the site.

what is the problem?

please help

regrds
anindyanuri
 
Old 10-13-2005, 02:38 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
I had a very similar problem with Solaris once. You might want to check my thread in the case it also helps you:

http://www.linuxquestions.org/questi...hreadid=366690

Best of luck!
 
Old 10-13-2005, 02:39 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,501
Blog Entries: 15

Rep: Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466
You're leaving out the search domains. This means you have to specify the FQDN for the items for which you wish to search.

Example. If you have a sever with FQDN (Fully Qualified Domain Name) of myserver.mydomain.com then you have to type all that in.

With a search list that specifies mydomain.com you would only have to type in "myserver".

/etc/resolv.conf should specify both search and nameservers - Example:

search mydomain.com mydomain.net dmz.mydomain.com
nameserver 202.138.103.100
nameserver 202.138.96.2
nameserver 202.138.103.100
nameserver 202.138.96.2

The above example would find any host in mydomain.com, mydomain.net or dmz.mydomain.com so long as the above nameservers had the corresponding zone files for these. If you searched for "myserver" it would first try to find myserver.mydomain.com and failing that would try myserver.mydomain.net and finally would try myserver.dmz.mydomain.com.
 
Old 10-13-2005, 02:45 PM   #4
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
Oooff............I am not able to follow the thread.

Thank you Megaman for help but i am not able to follow the thread, getting message "Please check the name and try again."

I reached www.linuxquestions.org by its ip address 64.179.4.149
But then there was no problem to follow the 'Forum' link and others to reach here..........but cannot tell you, now I am not able to follow your recommended thread. Hope moderators may give us some light....

please help me........i am sucked

regrds
anindyanuri
 
Old 10-13-2005, 02:55 PM   #5
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Hi again anindyanuri!.

That's quite a situation . I will do a copy/past job here for the relevant parts of that thread:

----------------------------------------

Problem: I am not able to connect outside my LAN, or even ping any other sites:

created /etc/resolv.conf:

I've added my Primary and secondary DNS given by my ISP in two separated lines.

edited /etc/nsswitch.conf

I made sure that the line "hosts: files dns" was in there.

netstat -rn | grep default returns the following:

default 192.168.2.1 UG 0 0

192.168.2.1 is my routers/firewall IP. I also tried to create a file called /etc/defaultrouter and put that number in there

Quote:
by jlliagre
So the problem is not routing but naming, DNS are not properly configured.

Double check:
/etc/resolv.conf
/etc/nsswitch.conf

Possibly, kill and restart /usr/sbin/nscd

run "nslookup www.linuxquestions.org" and see what it says.


Basically, check the files I've checked, especially the ones suggested by jlliagre and see if they exist. I'm not quite sure if Debian works in the same way (and for coincidence, I'm also using Debian, but it worked out of the box for me, as well as newer Solaris)

Good luck!
 
Old 10-13-2005, 03:15 PM   #6
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jlightner
You're leaving out the search domains. This means you have to specify the FQDN for the items for which you wish to search.

Example. If you have a sever with FQDN (Fully Qualified Domain Name) of myserver.mydomain.com then you have to type all that in.

With a search list that specifies mydomain.com you would only have to type in "myserver".

/etc/resolv.conf should specify both search and nameservers - Example:

search mydomain.com mydomain.net dmz.mydomain.com
nameserver 202.138.103.100
nameserver 202.138.96.2
nameserver 202.138.103.100
nameserver 202.138.96.2

The above example would find any host in mydomain.com, mydomain.net or dmz.mydomain.com so long as the above nameservers had the corresponding zone files for these. If you searched for "myserver" it would first try to find myserver.mydomain.com and failing that would try myserver.mydomain.net and finally would try myserver.dmz.mydomain.com.
I tried according to your suggestion, with `search 127.0.0.1' in the /etc/resolv.conf but it did not help me. Waiting....


regards
anindyanuri
 
Old 10-13-2005, 03:45 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,501
Blog Entries: 15

Rep: Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466
In the search statement you do NOT specify a SERVER - you specify a DOMAIN. In the nameserver line you specify SERVERS.

SERVER EXAMPLES (note these are IP addresses for SERVERS):
127.0.0.1
202.138.103.100
202.138.96.2
202.138.103.100
202.138.96.2

DOMAIN EXAMPLES:
mydomain.com
google.com
yahoo.com
comcast.net

Your DOMAIN is what follows the "@" after your name in your email address. Example: billybob@gmail.com has a name of "billybob" and a domain of "gmail.com".

Please reread what I wrote earlier - you do NOT see me specifying a server in the search string. What you are seeing are made up domain names. You should specify the correct domain name for your environment rather than the ones I listed.

Last edited by MensaWater; 10-13-2005 at 03:47 PM.
 
Old 10-13-2005, 10:49 PM   #8
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jlightner
In the search statement you do NOT specify a SERVER - you specify a DOMAIN. In the nameserver line you specify SERVERS.

SERVER EXAMPLES (note these are IP addresses for SERVERS):
127.0.0.1
202.138.103.100
202.138.96.2
202.138.103.100
202.138.96.2

DOMAIN EXAMPLES:
mydomain.com
google.com
yahoo.com
comcast.net

Your DOMAIN is what follows the "@" after your name in your email address. Example: billybob@gmail.com has a name of "billybob" and a domain of "gmail.com".

Please reread what I wrote earlier - you do NOT see me specifying a server in the search string. What you are seeing are made up domain names. You should specify the correct domain name for your environment rather than the ones I listed.
jlightner, I am not running any webserver from my computer. You may treat it a complete desktop for my learning (Linux). I have gone through your messages and as far as I have understood, I need a Fully qualified domain name as the search string. As there is no Fully qualified domain name for my computer, what should I do in this case? I log into my computer as `anindyanuri@debian'
For more info, I am able to use network commands only as root, not from my hostname(=anindyanuri).
Code:
anindyanuri@debian:~$ host www.linuxquestions.org
;; connection timed out; no servers could be reached
anindyanuri@debian:~$ nslookup www.linuxquestions.org
;; connection timed out; no servers could be reached

anindyanuri@debian:~$ su
Password:
debian:/home/anindyanuri# host www.linuxquestions.org
www.linuxquestions.org has address 64.179.4.149
debian:/home/anindyanuri# nslookup linuxquestions.org
Server:         202.138.103.100
Address:        202.138.103.100#53

Non-authoritative answer:
Name:   linuxquestions.org
Address: 64.179.4.149

debian:/home/anindyanuri#
Entry to my /etc/hosts file...
Code:
127.0.0.1       localhost.localdomain   localhost       debian

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Entry to my /etc/nsswitch.conf
Code:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
regrds
anindyanuri
 
Old 10-14-2005, 06:53 AM   #9
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,501
Blog Entries: 15

Rep: Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466
Your examples make it appear your issue is simply one of permissions.

Do "ls -l /etc/resolv.conf" and make sure it has read permissions for everyone:
-rw-r--r-- 1 root root 84 Oct 13 16:19 /etc/resolv.conf

The "-rw-r--r--" means: Owner can r(ead) and w(rite), group can r(ead) and others can r(ead). If you're file does not have an "r" in the positions shown above then it isn't readable and that's your problem. You can make your file look like the above by typing:
"chmod 644 /etc/resolv.conf"

Also check /etc/hosts and /etc/nsswitch.conf permissions. They too should be read for owner, group and other.

The reason I believe it is a permissions issue is because from the examples you gave in your last post you show you can not get host or nslookup to work as user, anindyanuri but when you do "su" to root user it works. This means the issue is your user can not do it rather than it not working at all.

For now don't worry about FQDN or search strings as the examples you gave show your DNS name resolution IS working - the issue is just that it is only working for root at the moment.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/hosts resolving before DNS resolving ? markraem Linux - Networking 4 11-02-2003 04:54 AM
resolving hostnames iceman47 Linux - Networking 3 10-07-2003 09:34 AM
DNS not resolving ElementNine Linux - Networking 5 09-30-2003 06:42 AM
resolving host... soko Linux - Newbie 10 07-07-2002 10:50 AM
Name resolving problem geoff-taylor@ho Linux - Networking 3 06-04-2002 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration