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 930 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.
    • GertjanG
      Gertjan @Cino
      last edited by

      @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 Reply Quote 0
      • C
        Cino @Gertjan
        last edited by

        @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
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          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 Reply Quote 1
          • C
            Cino @jimp
            last edited by

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

            jimpJ 1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate @Cino
              last edited by

              @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 Reply Quote 0
              • C
                Cino @jimp
                last edited by

                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

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

                  GertjanG 1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan @Cino
                    last edited by

                    @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 Reply Quote 0
                    • C
                      Cino @Gertjan
                      last edited by

                      @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

                      GertjanG 1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan @Cino
                        last edited by

                        @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
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.