Page 1 of 1

DNS Strangeness on B2 [Bug Report - bad line in hosts file]

Posted: 24 Apr 2010, 10:16
by RandomUsername
The last few months after the odd occasion I've had to reboot my B2, I've been unable to ping it by it's hostname without loads of kludging.

For e.g. My B2's hostname is "server". From a client PC, accessing the B2 via DNS works OK (I can ping the hostname "server", I can mount samba shares etc etc.).

If I have to reboot, suddenly

Code: Select all

ping server
returns an address of 127.0.0.1 from whatever client I do it from (I'm aware this is the localhost address).

I don't know how I fix it but it usually resolves itself with a few reboots of the Bubba and my PCs in different orders.

However, after a power cut earlier this week I haven't been able to fix it this time.

At the moment,

Code: Select all

ping server
and

Code: Select all

ping server.localdomain
both return the localhost address but

Code: Select all

ping server.local
returns the correct IP address.

My client PCs all use Ubuntu which doesn't have a DNS cache, so that's not the problem. Also trying to browse to http:/server/admin from my iPhone doesn't work any more, I end up getting redirected to http://www.server.com.

Seems to me there's some kind of issue with dnsmasq. The conf file is pretty simple and I can't see anything wrong with it.

Does anyone see a similar issue or is it just me?

Darren.

Re: DNS Strangeness on B2

Posted: 24 Apr 2010, 17:40
by RandomUsername
OK, condsider this a bug report.

When changing the host name via the web interface it creates an invalid line in /etc/hosts (highlighted below):
127.0.0.1 testbox.localdomain testbox
127.0.0.1 localhost.localdomain localhost

testbox.localdomain testbox

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
although I'm not sure if this is connected to the original problem yet...

I fixed it by changing the IP address in the first line to 192.168.10.1. I assume what was happening was that my PC was asking dnsmasq for the IP address of testbox and dnsmasq was returning the IP address from the hosts file (127.0.0.1). I assume this is something screwy with the way the Bubba web interface updates the hosts file.

Re: DNS Strangeness on B2 [Bug Report - bad line in hosts file]

Posted: 25 Apr 2010, 07:01
by carl
The hostfile problem is a known bug which is fixed in upcoming bugfix release due to coming week.

Re: DNS Strangeness on B2 [Bug Report - bad line in hosts file]

Posted: 25 Apr 2010, 13:48
by RandomUsername
Thanks Carl. I wasn't sure if I was right and only fixed it by accident.

Darren.