LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-22-2010, 02:58 AM   #16
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405

Hi,

Looking at all the info you have given so far this seems to be your setup:

- Your PC has IP 192.168.1.33 (and 127.0.0.1 by convention)
- Your modem/router has IP 192.168.1.1 (and has a connection to the internet)

- The /etc/nsswitch.conf output is correct.

- Your /etc/hosts file should at least contain the following:
Code:
127.0.0.1         localhost.localdomain   localhost
192.168.1.33      mypc.myplace.com        mypc
192.168.1.1       router.myplace.com      router
- Your resolv.conf should look like this:
Code:
search myplace.com
nameserver 127.0.0.1
nameserver 192.168.1.1
mypc and the myplace.com are examples.

It seems that your hostname is localhost (root@localhost), which you should change to mypc. Have a look here: 28.1.22. /etc/sysconfig/network

Here's a link that gives you a good overview of the files you need to look at: 14.1. Network Configuration Files

Hope this helps.

@frankbell:
Code:
127.0.1.1	[localdomain]	tuna
192.168.1.5     [localdomain]   tuna
That is incorrect!!

If you use tuna it will _always_ point to 127.0.1.1
If a hostname -> ip translation is done it will quit when it finds the first hit, so it will never reach the 192.168.1.5 entry.
 
Old 11-22-2010, 09:26 AM   #17
vbekker
Member
 
Registered: Aug 2010
Location: Brooklyn, NY
Distribution: CentOS
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tommyttt View Post
This indicates the DNS(nameserver) is on your gateway. Is that correct? Are you providing your own DNS? If not, the nameserver needs to point to your DNS provider.

Tom
That is correct Tom, the router is also the DNS server.
 
Old 11-22-2010, 11:39 AM   #18
jwl17330536
Member
 
Registered: Feb 2010
Location: Raleigh, NC
Posts: 83

Rep: Reputation: 22
What is at the 192.168.1.1 address? I'm assuming this is your gateway. (wireless router perhaps) Regardless of the device you need to see what the nameservers it is using. Can you post the output of the DNS that 192.168.1.1 is using?
 
Old 11-22-2010, 04:20 PM   #19
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Oppps.

Last edited by jefro; 11-22-2010 at 07:47 PM.
 
Old 11-22-2010, 07:21 PM   #20
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
Originally Posted by druuna View Post

@frankbell:
Code:
127.0.1.1	[localdomain]	tuna
192.168.1.5     [localdomain]   tuna
That is incorrect!!

If you use tuna it will _always_ point to 127.0.1.1
If a hostname -> ip translation is done it will quit when it finds the first hit, so it will never reach the 192.168.1.5 entry.
Thanks. Will change it straightaway.

(One of the things I like about this place is that I learn stuff even when I don't expect to.)

Last edited by frankbell; 11-22-2010 at 07:24 PM.
 
Old 11-23-2010, 09:04 AM   #21
vbekker
Member
 
Registered: Aug 2010
Location: Brooklyn, NY
Distribution: CentOS
Posts: 38

Original Poster
Rep: Reputation: 0
Yes, the DNS server is on the router as well. I think i figured out my problem. "ping localhost" returned 208.68.143.55 since i fatfingered my /etc/hosts file 127.0.0.1 entry, but "ping balhgarbageblah" also returned 208.68.143.55...which seems to be the address of a web server that my ISP hosts...any requests that it cannot resolve, it returns this IP...The webpage contains what i typed in to the address bar as search terms. Not sure how i can disable that.
 
Old 11-23-2010, 10:22 AM   #22
jwl17330536
Member
 
Registered: Feb 2010
Location: Raleigh, NC
Posts: 83

Rep: Reputation: 22
I would use google's dns if you want to get around using your ISP's redirects.

http://code.google.com/speed/public-dns/

You can either configure your linux box to use it via your /etc/resolve, or configure your dhcp server (192.168.1.1 router in your case) to use the google dns which would then propogate the dns.
 
  


Reply



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
ping with even number ttl always return "Time to live exceeded" yafrank Linux - Networking 4 02-12-2012 02:30 AM
difference between "localhost" and "127.0.0.1"?? MarkoSan Linux - Newbie 8 07-25-2010 07:16 PM
Trying webmin, getting "attempt to connect to 127.0.0.1:10000 (localhost) failed" jeffreybluml Linux - General 1 08-16-2007 11:16 AM
KDE/CUPS printer slow to start up; fixed with "127.0.0.1 localhost" in /etc/hosts KWTm LinuxQuestions.org Member Success Stories 0 03-05-2005 11:11 AM
"host" ok, but "ping" can't find ip address hardigunawan Linux - Networking 2 05-16-2002 05:41 PM

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

All times are GMT -5. The time now is 08:16 AM.

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