Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?
-
Re: Dhcpleases: bad name in /var/dhcpd/var/db/dhcpd.leases
Is there any way to suppress these messages? Updated to 2.5 yesterday and holy cow, the logs are full of them. For devices where I can control the hostname, its always upper/lower case characters and a "-" if needed.
I have a couple of Sensibo devices and the hostname has spaces and also colons in them since the mac address is included. Also have a few other devices (Nest/Wyze) that are using IP address for the hostname, going to assuming it's not liking the "." in there
-
@cino said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
Sensibo devices and the hostname has spaces and also colons in them since the mac address is included
I didn't verify, up but tend to say : do not accept (buy, use, etc) devices that obvious break the rules (RFC).
If possible, assign static IP parameters to these devices. -
@gertjan said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
I didn't verify, up but tend to say : do not accept (buy, use, etc) devices that obvious break the rules (RFC).
If possible, assign static IP parameters to these devices.I've thought about assigning static IPs but I would rather not too if I can. I've had these devices on the network for some time and the spam in the logs didn't get out of control until ver pfSense 2.5. There were a couple here and there and now its like 95% of the logs
-
You can make a static mapping entry but just put in the MAC and a hostname, leave the IP address blank. Then it will still get a random IP address, but use your custom name.
-
@jimp said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
You can make a static mapping entry but just put in the MAC and a hostname, leave the IP address blank. Then it will still get a random IP address, but use your custom name.
How did I not know this @jimp ? Thanks for the tip, I'll have to try it out.
-
@cino said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
How did I not know this @jimp ? Thanks for the tip, I'll have to try it out.
The GUI may not make it very obvious. This is the mechanism used when defining "known" clients for DHCP so you can limit access to who gets DHCP addresses as well.
-
thanks @jimp
I haven't completed making all of static mappings to MAC/hostname but while reviewing the DHCP logs, can I assume these hostnames are causing these log entries?
Feb 25 16:55:40 dhcpleases 369 Sending HUP signal to dns daemon(9253) Feb 25 16:55:40 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:55:40 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:55:40 dhcpd 6906 DHCPACK on 192.168.20.120 to cc:50:e3:c7:56:55 (snake_terrarium_sensor) via igb2.20 Feb 25 16:55:40 dhcpd 6906 DHCPREQUEST for 192.168.20.120 from cc:50:e3:c7:56:55 (snake_terrarium_sensor) via igb2.20 Feb 25 16:55:21 dhcpleases 369 Sending HUP signal to dns daemon(9253) Feb 25 16:55:21 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:55:21 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:55:21 dhcpd 6906 DHCPACK on 192.168.20.119 to cc:50:e3:c7:52:57 (water_softener_sensor) via igb2.20 Feb 25 16:55:21 dhcpd 6906 DHCPREQUEST for 192.168.20.119 from cc:50:e3:c7:52:57 (water_softener_sensor) via igb2.20 Feb 25 16:54:24 dhcpleases 369 Sending HUP signal to dns daemon(9253) Feb 25 16:54:24 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:54:24 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:54:24 dhcpd 6906 DHCPACK on 192.168.20.113 to 84:f3:eb:eb:6e:0e (Lightstrip-3598) via igb2.20 Feb 25 16:54:24 dhcpd 6906 DHCPREQUEST for 192.168.20.113 from 84:f3:eb:eb:6e:0e (Lightstrip-3598) via igb2.20 Feb 25 16:53:38 dhcpleases 369 Sending HUP signal to dns daemon(9253) Feb 25 16:53:38 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:53:38 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:53:38 dhcpd 6906 DHCPACK on 192.168.20.117 to b0:4e:26:18:71:96 (HS105) via igb2.20 Feb 25 16:53:38 dhcpd 6906 DHCPREQUEST for 192.168.20.117 from b0:4e:26:18:71:96 (HS105) via igb2.20 Feb 25 16:52:52 dhcpleases 369 Sending HUP signal to dns daemon(9253) Feb 25 16:52:51 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:52:51 dhcpleases 369 bad name in /var/dhcpd/var/db/dhcpd.leases Feb 25 16:52:51 dhcpd 6906 DHCPACK on 192.168.0.111 to 1c:f2:9a:10:9e:11 (Google-Nest-Hub) via igb1 Feb 25 16:52:51 dhcpd 6906 DHCPREQUEST for 192.168.0.111 from 1c:f2:9a:10:9e:11 (Google-Nest-Hub) via igb1
If so, aren't they all legal chars?
PS Yes, I have a ton of IoT devices
-
Maybe this is related or maybe not. A few days ago I 'Clear all DHCP leases'. Noticed no more messages in the system/dhcp log. A couple of days later, I manually restarted unbound/dhcp and now the messages are popping up again. If I clear all DHCP leases, messages go away. I've even rebooted devices I know that are not following the guidelines and don't see messages until I restart unbound/dhcp. Strange behavior....
-
@cino said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
Strange behavior....
You have the logs, so a solution is a couple of clicks away.
If you can go in the past, you'll find the moment where the "bad name" messages started to show up.
This will be the moment a device asked for a lease, and proposed this "bad name". By now, it will be easy to find the guilty one.To get rid of the issue :
1 change the 'name' of the device - if it has a GUI or SSH/telnet access.
2 stop the DHCP client mode of the device, give it static IP settings.
3 disconnect it from the network@cino said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
If so, aren't they all legal chars?
That's why the RFC's exist. There are many of them that details the entire DHCP protocol. Every bit is defined. Literally.
@cino said in Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?:
PS Yes, I have a ton of IoT devices
..... and one of them has a DHCP client that uses a 'bad name'. It's probably written using de "BS-in - BS- out" method of coding.
Up to you to find it and eliminate the problem ;)
water_softener_sensor
Wow. Impressive.
-
@gertjan thank you for the different solutions. What has me puzzled, I didn't experience this when I was running 2.4.5. I performed a fresh install of 2.5 and restored the config file. I'm receiving the error message for hostnames that follow the RFC
-
pfSense uses itself several open source products, like world's most famous https://www.isc.org/dhcp/.
Going from FreeBSD 11.2 to 12.2 probably updated also that package.
With new behaviour ....This is just what I think is that happened.