LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 05-05-2005, 04:54 AM   #1
fipeso
Member
 
Registered: Apr 2005
Location: Finland, Nurmijärvi.
Distribution: Ubuntu 5.04 "Hoary Hedgehog"
Posts: 56

Rep: Reputation: 15
HOST name in HOSTS file (127.0.0.1)


I have a linux firewall that runs "dnsmasq" and "Squid".

The host name of the firewall is fw1.

Ubuntu added this line in my "etc/hosts" file at install:
127.0.0.1 localhost.localdomain localhost fw1

The LAN side ip of "fw1" is 10.0.0.1

Now I wanted to use from my client "ssh fw1" in stead of using "ssh 10.0.0.1", and set proxy = fw1, instead of proxy = 10.0.0.1, on my kids win98 pc's.

(dnsmasq makes some magic to the clients through dns from the hosts file)

So I changed hosts to:
127.0.0.1 localhost.localdomain localhost
10.0.0.1 fw1

It looked good all good, until I re-booted the firewall

At that point "Squid" crashed, it did not like the change.

I set the "hosts" file back to how it was before and "Squid" started up again.

But now if I "ping fw1" from a client, I get the loop back address 127.0.0.1

So my question is, how should the hosts name be set correctly in the hosts file?

Maybe the way "dnsmasq" works, is a bit nonstandard.

I can just put 10.0.0.1 fw in hosts, and use that from the clients I guess...

Thank You
 
Old 05-05-2005, 06:22 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Yes, you are correct just enter the details in /etc/hosts for name resolution. '98 also has a hosts file which should do the job on those systems.
 
  


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
hosts file IP 127.0.0.2 Steve Riley SUSE / openSUSE 4 02-14-2012 11:34 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
127.0.0.1 Entry in Zone file and /etc/hosts, will this cause probs? mikeyt_333 Linux - Networking 7 12-02-2003 02:51 PM
Adding a host to /etc/hosts kzazula Linux - Newbie 1 10-25-2003 12:22 AM
127.0.0.1 used by another host after Mandrake Update-reboot aridhol Linux - Software 4 01-07-2002 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:07 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