• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Suppress "bad name in /var/dhcpd/var/db/dhcpd.leases" messages?

Scheduled Pinned Locked Moved DHCP and DNS
11 Posts 3 Posters 897 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Cino
    last edited by Feb 21, 2021, 7:53 PM

    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

    G 1 Reply Last reply Feb 22, 2021, 9:43 AM Reply Quote 0
    • G
      Gertjan @Cino
      last edited by Feb 22, 2021, 9:43 AM

      @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.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      C 1 Reply Last reply Feb 22, 2021, 1:47 PM Reply Quote 0
      • C
        Cino @Gertjan
        last edited by Feb 22, 2021, 1:47 PM

        @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

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Feb 23, 2021, 5:03 PM

          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.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          C 1 Reply Last reply Feb 23, 2021, 6:04 PM Reply Quote 1
          • C
            Cino @jimp
            last edited by Feb 23, 2021, 6:04 PM

            @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.

            J 1 Reply Last reply Feb 23, 2021, 6:42 PM Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate @Cino
              last edited by Feb 23, 2021, 6:42 PM

              @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.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              C 1 Reply Last reply Feb 25, 2021, 10:06 PM Reply Quote 0
              • C
                Cino @jimp
                last edited by Feb 25, 2021, 10:06 PM

                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

                1 Reply Last reply Reply Quote 0
                • C
                  Cino
                  last edited by Mar 3, 2021, 12:52 PM

                  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....

                  G 1 Reply Last reply Mar 3, 2021, 1:13 PM Reply Quote 0
                  • G
                    Gertjan @Cino
                    last edited by Mar 3, 2021, 1:13 PM

                    @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.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    C 1 Reply Last reply Mar 3, 2021, 1:45 PM Reply Quote 0
                    • C
                      Cino @Gertjan
                      last edited by Mar 3, 2021, 1:45 PM

                      @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

                      G 1 Reply Last reply Mar 3, 2021, 2:25 PM Reply Quote 0
                      • G
                        Gertjan @Cino
                        last edited by Mar 3, 2021, 2:25 PM

                        @cino

                        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.

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        1 Reply Last reply Reply Quote 0
                        11 out of 11
                        • First post
                          11/11
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received