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

    Flushing Kea DHCP Leases, CMDline

    DHCP and DNS
    2
    6
    4.6k
    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.
    • NollipfSenseN
      NollipfSense
      last edited by

      As the title says, how to flush Kea DHCP leases from the command line? Cannot access Proxmox's pfSense VM webGUI because of this; however, I have access through console.

      pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
      pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by kiokoman

        /var/lib/kea/dhcp4.leases

        pfsense is using the memfile backend so there is nothing special involved, it's a simple csv file.
        edit or delete it

        https://kea.readthedocs.io/en/kea-1.6.3/arm/admin.html?highlight=memfile#supported-backends

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        NollipfSenseN 1 Reply Last reply Reply Quote 0
        • NollipfSenseN
          NollipfSense @kiokoman
          last edited by

          @kiokoman said in Flushing Kea DHCP Leases, CMDline:

          /var/lib/kea/dhcp4.leases

          I tried editing...nano isn't available or no permission...

          Screen Shot 2023-12-10 at 11.04.19 AM.png

          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

          kiokomanK 1 Reply Last reply Reply Quote 0
          • kiokomanK
            kiokoman LAYER 8 @NollipfSense
            last edited by

            @NollipfSense
            nano need to be installed

            pkg install nano
            

            vi should be available

            vi /var/lib/kea/dhcp4.leases
            

            or to view only you can use cat

            cat /var/lib/kea/dhcp4.leases
            

            you can't call it directly with /var/lib/kea/dhcp4.leases, it's not an executable,that's why you get "permission denied"

            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
            Please do not use chat/PM to ask for help
            we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
            Don't forget to Upvote with the 👍 button for any post you find to be helpful.

            NollipfSenseN 1 Reply Last reply Reply Quote 0
            • NollipfSenseN
              NollipfSense @kiokoman
              last edited by NollipfSense

              @kiokoman I had tried VI but there wasn't any editable list...all I saw was:
              Screen Shot 2023-12-10 at 12.19.04 PM.png

              So, I deleted the file dhcp4.leases and rebooted, still could not access the webGUI...the old lease is still attached to the MAC address when the client is set to new static address. Is there a way to switch to ISC dhcp via the CMDline?

              pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
              pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

              1 Reply Last reply Reply Quote 0
              • NollipfSenseN
                NollipfSense
                last edited by

                I managed to use a third laptop that had never had a lease to login to pfSense and to switch back to ISC dhcp. I think my TP-Link smart switch, it seems, is working with Kea too well acting like a firewall when a device had a lease, and was later switched to static IP address.

                pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

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