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