[SOLVED] /etc/hosts broken
-
We have been running pfSense 2.0-RELEASE without problems for a long time, using DHCP static leases as well as DNS forwarder overrides.
That said, DNS problems have been appearing as of late. Some host names are not being resolved any more.
I logged into pfSense by SSH and looked at /etc/hosts. The file is broken. The first paragraph (static dhcp and dns forwarder hosts) is truncated and ends like this:
(hostnames replaced with xx's)... 192.168.1.202 xxx.xxxx.xx xxx 4 ``` Immediately after that, there is the the following section, two times (!):
dhpleases automatically entered
192.168.1.99 xxx.xxxx.xx xxx # dynamic entry from dhcpd.leases
192.168.1.92 xxx.xxxx.xx xxx # dynamic entry from dhcpd.leases
...I had to manually remove hosts from the static dhcp and dns forwarder lists, so that some static hosts reappear in the first paragraph. The list is still garbled though:
...
192.168.1.202 xxx.xxxx.xx xxx
4192.168.1.94 xxx.xxxx.xx xxx # dynamic entry from dhcpd.leases
...Is there a bug somewhere? Or a limit on the number of static hosts? (We have 21 static DHCP entries and 24 static DNS forwarder entries.)
-
Solved the problem by removing the double section "# dhpleases automatically entered" from /etc/hosts manually.
I can add new static leases again, and the hosts file is not truncated anymore.