LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-10-2008, 06:37 AM   #1
xeross
Member
 
Registered: Apr 2008
Location: The Netherlands
Distribution: Debian 4.0
Posts: 48

Rep: Reputation: 15
localhost not working but 127.0.0.1 does


localhost isnt working on my debian server, everything that has localhost as adress can't connect, but with 127.0.0.1 it works fine.
Anyone know how to fix this, probably just something missing somewhere.

Thanks for your time, Xeross
 
Old 10-10-2008, 06:43 AM   #2
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
Your /etc/HOSTNAME should contain your machine's host name (i.e. darkstar or whatever) and /etc/hosts should contain a list of hosts, like this:

127.0.0.1 localhost
127.0.0.1 darkstar.localhost darkstar

That's the basic format. Do those two files look correct to you?
 
Old 10-10-2008, 08:37 AM   #3
xeross
Member
 
Registered: Apr 2008
Location: The Netherlands
Distribution: Debian 4.0
Posts: 48

Original Poster
Rep: Reputation: 15
/etc/hostname sais
Quote:
Silvermoon
That's correct.
/etc/hosts sais
Quote:
127.0.0.1 localhost
127.0.1.1 Silvermoon.lecowow.com Silvermoon

# 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
wait the second one should be 127.0.0.1 would that fix that ?
 
Old 10-10-2008, 11:33 AM   #4
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
man hostname
man hosts
 
Old 10-13-2008, 04:30 PM   #5
perezyanez
LQ Newbie
 
Registered: Sep 2008
Posts: 19

Rep: Reputation: 0
127.0.1.1 exists?

If 127.0.1.1 Silvermoon.lecowow.com Silvermoon do not exists edit the file /etc/hosts as:



127.0.0.1 Silvermoon localhost
# 127.0.1.1 Silvermoon.lecowow.com Silvermoon

# 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
 
  


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
Post rejecting connections on 127.0.0.1 on localhost flashingcurser Linux - Server 2 04-26-2007 01:48 PM
Fedora C4, Localhost, 127, lo, ifconfig bpk Fedora 1 01-15-2006 04:08 AM
127.0.0.1 v localhost.localdomain Bill Barrington Linux - Software 2 06-28-2003 08:47 PM
Localhost 127.0.0.1 may be forged ?? Mzee Linux - Networking 14 03-20-2003 02:51 PM
localhost vs computer name vs 127.0.0.1 modeler4547 Linux - General 0 02-26-2003 06:53 PM


All times are GMT -5. The time now is 03:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration