Navigation

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

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

    DHCP and DNS
    3
    11
    202
    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

      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

      Gertjan 1 Reply Last reply Reply Quote 0
      • Gertjan
        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.

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

            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.

              jimp 1 Reply Last reply Reply Quote 0
              • jimp
                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.

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

                    Gertjan 1 Reply Last reply Reply Quote 0
                    • Gertjan
                      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.

                      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

                        Gertjan 1 Reply Last reply Reply Quote 0
                        • Gertjan
                          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.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Products

                          • Platform Overview
                          • TNSR
                          • pfSense Plus
                          • Appliances

                          Services

                          • Training
                          • Professional Services

                          Support

                          • Subscription Plans
                          • Contact Support
                          • Product Lifecycle
                          • Documentation

                          News

                          • Media Coverage
                          • Press
                          • Events

                          Resources

                          • Blog
                          • FAQ
                          • Find a Partner
                          • Resource Library
                          • Security Information

                          Company

                          • About Us
                          • Careers
                          • Partners
                          • Contact Us
                          • Legal
                          Our Mission

                          We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                          Subscribe to our Newsletter

                          Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                          © 2021 Rubicon Communications, LLC | Privacy Policy