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

    Correct pfBlockerNG Set Up?

    Scheduled Pinned Locked Moved pfBlockerNG
    21 Posts 4 Posters 1.6k 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
      last edited by

      If you have a big network, or some stupid rogue device that asks a new DHCP lease every minute,
      and this setting active :

      d52d6fd4-bf9b-409a-b584-801e7cf61a2f-image.png

      then yes.
      All goes as planned.
      Sort of.

      Having restarting unbound every xxx seconds is very counter productive.

      It's worth spending some time to discover why .....

      See you back here after that complete study of your logs.

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

      W 1 Reply Last reply Reply Quote 0
      • W
        WannabeMKII @Gertjan
        last edited by

        @Gertjan said in Correct pfBlockerNG Set Up?:

        If you have a big network, or some stupid rogue device that asks a new DHCP lease every minute,
        and this setting active :

        d52d6fd4-bf9b-409a-b584-801e7cf61a2f-image.png

        Ah ha, I did this about 10 minutes ago after reading about it on the forum and it's not restarted since.

        then yes.
        All goes as planned.
        Sort of.

        Having restarting unbound every xxx seconds is very counter productive.

        It's worth spending some time to discover why .....

        See you back here after that complete study of your logs.

        I've then checked the logs and I've found a device that is showing in the DHCP logs every 1 minute as DHCPOFFER. I'm guessing this is what's causing the issue? If so, is the resolution to reserve it an IP?

        Many thanks for your continued help, much appreciated!!

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

          @WannabeMKII said in Correct pfBlockerNG Set Up?:

          I've then checked the logs and I've found a device that is showing in the DHCP logs every 1 minute as DHCPOFFER. I'm guessing this is what's causing the issue? If so, is the resolution to reserve it an IP?

          A DHCPOFFER is an offer that the pfSense is sending after a DHCPDISCOVER, coming from a network client.
          After the DHCPOFFER is received by the client, it will acknowledge with a DHCPREQUEST. Which is then granted with a DHCP..... from pfSense.
          In that order.

          No other devices on your network should send out DHCPOFFER, If that happens, you have multiple DHCP servers on your network.

          True, if some stupid device is actually REQUESTING a new lease, instaed of RENEWing it, then consider that device as pretty broken.
          Assign it a Static DHCP lease (at least) or a classic static IP/Gateway/mask/DNS, or throw it out of the window (at bast).

          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
          • W
            WannabeMKII
            last edited by

            So the device in question was communication every minute! So I power cycled it and now it's behaving. I've also increased my lease time from 2 hours to 6 hours to limit the DHCP traffic as it's quite a settled environment, especially at the moment! I may eventually increase to 12 or even 24 hours...

            Thanks again, I'll be back if I have any further issues, fingers crossed it's not soon! 😉

            1 Reply Last reply Reply Quote 0
            • JeGrJ
              JeGr LAYER 8 Moderator
              last edited by

              If you absolutely need a client by name, reserve it an IP so its name will be known to unbound anyway and remove the setting that every dumb client will try to get its name into the DNS resolver - that will stop the endless restart orgy. Also your DNS cache gets lost every time that happens so not only it is restarting but getting slow every time it does. That's why you disable that option and if you really need a client to be known by its name (why should you?) get it a reservation via DHCP server. That is loaded into unbound per default - so no restarting after a dhcp registration. Also don't do that for OVPN clients, too. For obvious reasons :)

              Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

              If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

              1 Reply Last reply Reply Quote 0
              • W
                WannabeMKII
                last edited by

                @JeGr said in Correct pfBlockerNG Set Up?:

                If you absolutely need a client by name, reserve it an IP so its name will be known to unbound anyway and remove the setting that every dumb client will try to get its name into the DNS resolver - that will stop the endless restart orgy. Also your DNS cache gets lost every time that happens so not only it is restarting but getting slow every time it does. That's why you disable that option and if you really need a client to be known by its name (why should you?) get it a reservation via DHCP server. That is loaded into unbound per default - so no restarting after a dhcp registration. Also don't do that for OVPN clients, too. For obvious reasons :)

                Superb advice! I've made the relevant changes and all seems well so far and nice and responsive, appreciated!

                1 Reply Last reply Reply Quote 0
                • W
                  WannabeMKII
                  last edited by

                  Actually, a quick question on this - Is there a way to add a client name to the resolver without adding an IP reservation and using just the MAC address? It's just useful when looking at the logs to have a meaningful hostname, or in some cases, just a hostname at all!

                  Many thanks.

                  GertjanG JeGrJ 2 Replies Last reply Reply Quote 0
                  • GertjanG
                    Gertjan @WannabeMKII
                    last edited by Gertjan

                    @WannabeMKII said in Correct pfBlockerNG Set Up?:

                    to add a client name to the resolver without adding an IP reservation

                    There was a thread some time ago that asked for this.

                    Bassically, you're asking to have entered the device name in the DNS cache when it's DHCP-ing - before isn't possible : the IP isn't known.
                    You do understand that the DNS (unbound) has to be restarted to be aware of it, right ;)

                    If your trusted devices network isn't that big, you static-mac all IP's (devices). This gives you also a nice formatted list will all your equipment on a page, known, even when they are not put on or available.
                    Other, more visitor like devices and untrusted devices should be put on a separate network.

                    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
                    • W
                      WannabeMKII
                      last edited by

                      Thanks for the response.

                      50% of my network have reserved IP's anyway and other stuff is on a separate VLAN, it just to keep things looking nice. But it's all working fine as it is, was just a thought.

                      Many thanks once again!

                      1 Reply Last reply Reply Quote 0
                      • JeGrJ
                        JeGr LAYER 8 Moderator
                        last edited by

                        @WannabeMKII said in Correct pfBlockerNG Set Up?:

                        Actually, a quick question on this - Is there a way to add a client name to the resolver without adding an IP reservation and using just the MAC address? It's just useful when looking at the logs to have a meaningful hostname, or in some cases, just a hostname at all!

                        Of course, just use the host override section of the DNS resolver.

                        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          WannabeMKII @JeGr
                          last edited by

                          @JeGr said in Correct pfBlockerNG Set Up?:

                          @WannabeMKII said in Correct pfBlockerNG Set Up?:

                          Actually, a quick question on this - Is there a way to add a client name to the resolver without adding an IP reservation and using just the MAC address? It's just useful when looking at the logs to have a meaningful hostname, or in some cases, just a hostname at all!

                          Of course, just use the host override section of the DNS resolver.

                          I did look at that, but that also needs static IP's to work unless I'm misunderstanding it?

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

                            That's what DNS is all about.
                            Throw in a host name, and get out an IP.
                            So, yes, these two should be known.

                            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
                            • JeGrJ
                              JeGr LAYER 8 Moderator @WannabeMKII
                              last edited by

                              @WannabeMKII said in Correct pfBlockerNG Set Up?:

                              Actually, a quick question on this - Is there a way to add a client name to the resolver without adding an IP reservation and using just the MAC address? It's just useful when looking at the logs to have a meaningful hostname, or in some cases, just a hostname at all!

                              Ah I didn't read the "MAC address" part. But why? If you want a specific Client (MAC) to have a name, give it a static or dhcp-reserved IP. Simple as that. Otherwise, no, you can't map MACs to DNS, that makes no sense as both are on different layers (MACs are on layer 2, IP is layer 3)

                              Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                              If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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

                                Added to that, "names" = host names exists for humans.
                                DNS exists sot that all these names are converted to IP's, something that device actually can use.
                                You could throw away all host names.

                                Try visiting https://[2610:160:11:18::199]/ or https://208.123.73.199/ - your browser will yell at you because the cert of that web site doesn't have 2610:160:11:18::199 or 208.123.73.199 in it's ALT DNS list, so for the sake of testing, just override the warning, accepts it, and you'll see ...... this forum. Without using names (URLs).

                                Edit : when you see these browser certificate warniong, inspect the cert. drill down to the cert info list, and you will find :

                                219e97a7-a3fe-4b91-8519-73eccf73fa58-image.png

                                so you know that you are connected to netgate.com or any sub domain of that site - forum.netgate.com in this example.

                                @WannabeMKII : when you call someone, do you enter his name, or his phone number ?
                                => Well, you use your contact list, a sort of DNS lookup, to have the phone select the according phone number. The phone circuit isn't aware of 'names'. Just numbers. Setting up a contact list without phone numbers ... that's .... not useful.

                                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.