Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-05-2005, 04:54 AM   #1
Registered: Apr 2005
Location: Finland, Nurmijärvi.
Distribution: Ubuntu 5.04 "Hoary Hedgehog"
Posts: 56

Rep: Reputation: 15
HOST name in HOSTS file (

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: localhost.localdomain localhost fw1

The LAN side ip of "fw1" is

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

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

So I changed hosts to: localhost.localdomain localhost 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

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 fw in hosts, and use that from the clients I guess...

Thank You
Old 05-05-2005, 06:22 AM   #2
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.


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
hosts file IP Steve Riley SUSE / openSUSE 4 02-14-2012 11:34 AM
KDE/CUPS printer slow to start up; fixed with " localhost" in /etc/hosts KWTm Member Success Stories 0 03-05-2005 11:11 AM 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 used by another host after Mandrake Update-reboot aridhol Linux - Software 4 01-07-2002 04:11 AM > Forums > Linux Forums > Linux - Networking

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

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