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

    Dhcpd cannot assign DHCP Static Mappings for client after I upgrade pfsense

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    4 Posts 2 Posters 1.4k 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.
    • L
      lucky_nguyen
      last edited by

      I have upgraded pfsense to 2.2.3-RELEASE (amd64) . I am using DHCP static mapping to assign IP for end user. Existing end user get IP from dhcpd without problem but new end user cannot get IP. There is a line in dhcpd log:

      dhcpd: DHCPDISCOVER from xx:xx:xx:xx:xx:xx via igb1: network 192.168.32.0/20: no free leases
      

      Follow the log, I guess Dhcpd don't have free lease to assign IP but my IP range has many free IPs. I go to /var/dhcpd/var/db.

      ls -l
      -rw-r--r--  1 root  _dhcp    59564 Jul 25 20:38 dhcpd.leases
      -rw-r--r--  1 dhcpd  _dhcp    62306 Jul 25 20:38 dhcpd.leases~
      -rw-rw----  1 dhcpd  _dhcp      0 Sep 30  2014 dhcpd6.leases
      

      My dhcpd don't have write permission on dhcpd.leases
      I do it:

      chown dhcpd:_dhcp dhcpd.leases
      

      It works !

      But when I restart dhcpd service, my change went out. I don't want to chown after I restart dhcpd.

      There is other problem. When my pfsense server is  rebooted by loss power, dhcpd is impossible to start.

      -rw-r--r--  1 2051  65    59564 Jul 25 20:38 dhcpd.leases
      -rw-r--r--  1 2051  65    62306 Jul 25 20:38 dhcpd.leases~
      -rw-rw----  1 2051  2051      0 Sep 30  2014 dhcpd6.leases
      

      I absolutely lose all group and user for dhcpd. I don't have any ideas for the reasons.

      My question is how do I make Dhcpd work ?

      P/S: I remember my dhcp group name is dhcpd. I don't know why it is _dhcp.
      This is the command that dhcpd is using to start:

      /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid igb3 igb1 igb6 igb7 igb2_vlan5 igb2_vlan45 igb2_vlan6 igb2_vlan69 igb2_vlan67 igb2_vlan20
      
      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Stop messing with the permissions, they are just fine. You even posted that:

        -user dhcpd -group _dhcp

        which matches both the user and group permissions.

        @lucky_nguyen:

        When my pfsense server is  rebooted by loss power, dhcpd is impossible to start. I absolutely lose all group and user for dhcpd. I don't have any ideas for the reasons.

        Get latest 2.2.4 snapshot. Known issue with filesystem corruption.

        1 Reply Last reply Reply Quote 0
        • L
          lucky_nguyen
          last edited by

          File permission is not fine

          ls -l
          -rw-r--r--  1 root  _dhcp    59564 Jul 25 20:38 dhcpd.leases
          -rw-r--r--  1 dhcpd  _dhcp    62306 Jul 25 20:38 dhcpd.leases~
          -rw-rw----  1 dhcpd  _dhcp      0 Sep 30  2014 dhcpd6.leases
          

          My dhcpd don't have write permission on dhcpd.leases

          I do it:

          chown dhcpd:_dhcp dhcpd.leases
          

          It works ! New end users are possible to get IP from DHCP

          But when I restart dhcpd service, my change went out. I don't want to chown after I restart dhcpd.

          I recreate groupname _dhcp and username dhcpd for dhcpd service but incorrect permission make DHCP no free lease.
          It always changes to  root: _dhcp  after I restart dhcpd service.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Dude. You have a corrupt filesystem with missing/screwed /etc/group. Stop "fixing" permissions, do a clean 2.2.4 install and restore config.

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