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

    Pfsense Dhcp Log

    Scheduled Pinned Locked Moved DHCP and DNS
    39 Posts 7 Posters 4.0k Views 4 Watching
    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.
    • ahmetakkayaA Offline
      ahmetakkaya @johnpoz
      last edited by

      @johnpoz said in Pfsense Dhcp Log:

      As to AP?? Point it out in t log you posted.. Make it a static IP!!! if its asking for too much dhcp..

      I have manually defined an IP address for the AP device.
      the result has not changed
      AP device is a tp-link AP500 model
      I disabled the AP device
      The new device is a Unifi and the problem is solved.

      Why is Tplink causing problems?

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator @ahmetakkaya
        last edited by

        OMG - there is clearly is some sort of translation issue going on here.

        Not sure how many times it has to be said if you had set a static IP on the device - it wouldn't be asking for dhcp ever!!

        What you posted clearly showed a iphone asking for dhcp multiple times.. ie about every minute..

        Wifi devices are going to do this. If you have some AP where wifi clients connected and disconnect to it - its going to generate dhcp traffic. If you goal is logging this for 2 years because of governmental controls.. Then you need to have your dhcp log to say syslog server..

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        ahmetakkayaA T 2 Replies Last reply Reply Quote 0
        • ahmetakkayaA Offline
          ahmetakkaya @johnpoz
          last edited by ahmetakkaya

          my settings are as they appear
          rental duration 5 minutes
          result 3 minutes comebacks ?

          1.JPG

          2.JPG

          3.JPG

          1 Reply Last reply Reply Quote 0
          • MikeV7896M Offline
            MikeV7896
            last edited by MikeV7896

            If the lease is only good for 5 minutes (300 seconds), the renewal attempt comes at 50% of the lease, or 2.5 minutes (150 seconds). So seeing a renewal that soon would be expected with a lease so short.

            The S in IOT stands for Security

            johnpozJ 1 Reply Last reply Reply Quote 1
            • johnpozJ Offline
              johnpoz LAYER 8 Global Moderator @MikeV7896
              last edited by

              ^ exactly... Why would you ever set a dhcp lease so low? That is nuts..

              Do people buy access in 5 minute increments?

              As mentioned clients will renew around the 50% mark, and if they don't get a renew - they will try again, and again faster and faster until they do.. Or the lease expires - then they will send out discover..

              With such a short lease - yeah your going to get bombed.. Especially if you have lots of clients.. And if you have any sort of issues with renew more and more attempts will happen faster and faster..

              What exactly are you wanting to accomplish with such a short lease? Other than lots of dhcp traffic? ;)

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 1
              • ahmetakkayaA Offline
                ahmetakkaya
                last edited by

                How should the ideal rental period be

                johnpozJ 1 Reply Last reply Reply Quote 0
                • johnpozJ Offline
                  johnpoz LAYER 8 Global Moderator @ahmetakkaya
                  last edited by johnpoz

                  5 minutes seems pretty low ;) For a rental period.

                  And that would/should be controlled at the AP not via dhcp leases..

                  If your not authed you shouldn't even be able to connect to the wifi, if you can not connect to the wifi your dhcp server would never see a request for dhcp..

                  I would set your dhcp lease time to be enough time to support the max number of different clients you might see in a day.. Which would also go hand and hand with the size of your scope /24, /23, /22.. How many different clients might you see in a 24 hour period?

                  Setup your dhcp and scope to handle that many.. Then setup a lease for say 24 hours..

                  Where you could also run into issues with this stuff these days - especially if you need to track user to IP given is clients using private mac when they connect to wifi, and the mac changing - latest ios does this.. You know for the privacy of the user ;)

                  If this is for legal reasons in your country - you really need to make sure you tie user to auth, and logs list all of the IPs and Macs used for that auth for any given period of time..

                  Such logging is quite often beyond the skill sets of say bars and small restaurants or businesses just trying to provide service for their customers. Easier solution to not get in trouble with local laws for such businesses is just not provide wifi.. Some of the legal restrictions on logging is not very realistic for a small shop..

                  Pfsense is not going to be able to provide with with detailed logs, they are circular currently - I believe 2.5 changes that.. But if you need to log for years - you really need to have those logs on something else other than your edge firewall, and backed up, etc.

                  What is funny about the whole thing - is your natted.. So lets say the reason for the logging was IP address (your public did something bad) and the authorities want to know who did that.. Your not logging all firewall traffic are you? Those logs are circular as well.. So if authorities come to you and say hey 3 months ago your public IP did xyz that was bad - how exactly which 192.168.x.x went there at 2:13 pm on a tuesday the 3rd of September? etc.. And if you don't log user was tied to mac that had 192.168.x.x at that time.. All you know is some random mac (private mac) got that IP.. While you might have the dhcp logs, do you have the firewall logs to match the traffic up..

                  Like I said such logging gets well beyond the small business guy ability very quickly..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 1
                  • ahmetakkayaA Offline
                    ahmetakkaya
                    last edited by

                    thanks all my friends. ๐Ÿ‘

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tabmow @johnpoz
                      last edited by

                      @johnpoz He isn't wrong here technically. I also have a TP-Link AP (RE350), it is set as a static address on the network (192.168.1.50), but for whatever reason, it 'tries to get a lease from my DHCP server every minute for the same IP (in my case 192.168.1.113). Other than that, clients that connect through the AP work fine. It is super weird and I haven't gotten down to the bottom of it. I don't really care to much about it either though but maybe one day I will dig a little deeper.

                      It looks like this might fix it - https://community.tp-link.com/en/home/forum/topic/156045
                      It's some stupid TP-Link thing obviously... nothing to do with pfSense.

                      @ahmetakkaya see link above.

                      johnpozJ 1 Reply Last reply Reply Quote 1
                      • johnpozJ Offline
                        johnpoz LAYER 8 Global Moderator @tabmow
                        last edited by johnpoz

                        Yeah that is a good find.. But as I stated way early in this thread. If you set a static IP on a device and it continues to ask for dhcp - that is something wrong with the client.

                        If you set a static on the client - it should NEVER ask for dhcp address..

                        And if it does - nothing pfsense can do about it.. Guess you could set an ignore..

                        ignore.png

                        But that still might be logged? And for it to work you would have to set deny for unknown clients, etc. That would be horrible and not a solution if have a lot of clients.

                        Fix the broken POS.. is the solution.. But if his goal is logging clients IP per some gov regulation like in some places in the EU where bars and restaurants are suppose to log this sort of stuff. Some dhcp server running on your edge router is not the solution for that either..

                        Also if his concern was his AP.. He should that he had set as static.. He should of clearly shown than - via say a screen shot on his AP showing he set it static. And the specific logs in dhcp showing that devices mac asking for dhcp still..

                        Not a log showing iphone macs..

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.8, 24.11

                        ahmetakkayaA 1 Reply Last reply Reply Quote 1
                        • ahmetakkayaA Offline
                          ahmetakkaya @johnpoz
                          last edited by

                          @johnpoz
                          @tabmow

                          thanks for support ๐Ÿ‘

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.