LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2005, 05:41 PM   #1
tjulius
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Rep: Reputation: 0
Can't get out to web - DNS issue methinks


I'm pretty much a Linux newbie; I've got 30 years of software development, but have somehow avoided unixland. I've done some limited unix/linux stuff but not much configuration, and pretty much every little task requires opening a book.

I'm setting up a RedHat Enterprise Linux machine that will be a prototype server for a project. Right now I'm just trying to get it to be able to get out to the Internet and basically surf the web. There are other issues, but until I can download files, I can't address them.

The machine sits on a LAN watched over by an NT server. The LAN has a modem router (NetGear RP614) that does the gateway stuff et al.

From the Linux machine I can ping the router just fine, and I can ping an outside IP address, but I don't get any name resolution. I haven't figured out where to declare the DNS server addresses. So, I can ping 68.124.226.40 (for Yahoo) but I can't ask for yahoo.com directly. Therefore I'm assuming it's a DNS configuration issue.

I look up DNS in troubleshooting and this and other forums, but the first 10,000 articles always seem to be about how to make the machine a DNS server, which I'm not interested in. I just want to tell it "the gateway is here, and go there for your DNS". The gateway I think I did correctly, but how do I tell it what IP addresses I want it to use for DNS?

Thanks
 
Old 04-18-2005, 05:57 PM   #2
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 33
Hi,

Put the nameserver addresses in /etc/resolv.conf.
 
Old 04-18-2005, 06:11 PM   #3
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, Android
Posts: 1,819

Rep: Reputation: 46
in this format

nameserver 198.6.1.140
 
Old 04-18-2005, 06:56 PM   #4
tjulius
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks - will try. Related question

If that will do it (and it'd be great), how would I declare a secondary nameserver?
 
Old 04-18-2005, 07:08 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
You do the same thing to put a secondary nameserver in.

nameserver <ip address>
nameserver <ip address>

-twantrd
 
Old 04-18-2005, 07:55 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
iirc resolv.conf get's overwritten when you restart your computer though right? how do you avoid that again?
 
Old 04-18-2005, 08:45 PM   #7
tjulius
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
That was it - thank you

Now I can move onto the next problem!

Thanks again
 
Old 04-18-2005, 09:22 PM   #8
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
mcd,

resolv.conf does NOT get overwritten when you reboot.

-twantrd
 
Old 04-19-2005, 05:07 PM   #9
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
Quote:
here's what was happening - when i edited /etc/resolv.conf to take out 192.168.0.1 as a nameserver i restarted my eth0 interface as i said in a couple postings (i thought that had to be done for the changes to take effect) however, when i did that SUSE queried for a new nameserver and IP address from the router so i lost my changes. I discovered that by looking at those tcpdump logs.
from this thread .

does it only happen with dhcp? only Suse? total BS?
 
Old 04-19-2005, 07:10 PM   #10
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Ahh, then yes. Most likely under dhcp you will be querying for nameserver(s) and your resolv.conf will get overwritten. It's been a while sorry. I always pretty much set the ip's statically. But yes, dhcp will cause this.

-twantrd
 
Old 04-20-2005, 12:48 PM   #11
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
aha! here's what i was thinking of!

Quote:
-R

Prevents dhcpcd from replacing existing /etc/resolv.conf file.

from the dhcpcd man pages. i love it when i'm not crazy, lol.
 
Old 04-20-2005, 05:45 PM   #12
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Well, there you go

-twantrd
 
  


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
dns issue Paxmaster Linux - Security 2 08-20-2005 02:17 PM
DNS issue Red Squirrel Linux - Networking 25 11-02-2004 10:21 PM
DNS issue or caching issue? AZDAVE Linux - Networking 7 10-02-2004 12:28 AM
DNS issue? lauram93 Linux - Networking 3 09-28-2004 11:47 PM
Re: Latest HTTPD version, need help, very st00pid question methinks ;) spineshank Linux - Newbie 5 09-24-2003 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:33 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
Open Source Consulting | Domain Registration