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

DHCP server listens on all IPs

Scheduled Pinned Locked Moved DHCP and DNS
dhcp
6 Posts 2 Posters 1.3k 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.
  • S
    scilek
    last edited by scilek Nov 13, 2021, 4:57 PM Nov 13, 2021, 4:56 PM

    I am using pfSense 2.5.2.

    I have two LAN interfaces and I would like to run ISC DHCP on one and FreeRADIUS DHCP on another. To that end, I configured the DHCP tab as shown below:

    d95920f0-b33c-4125-8286-b41f7a30ba48-image.png

    c7850587-34d3-40b3-9a1d-597381aeac20-image.png

    However, when I check the socket status, I get this:

    [2.5.2-RELEASE][root@pfSense.home.arpa]/root: sockstat | grep dhcpd
    dhcpd    dhcpd      73931 3  dgram  -> /var/dhcpd/var/run/log
    dhcpd    dhcpd      73931 8  udp4   *:67                  *:*
    dhcpd    dhcpd      73931 11 stream /var/run/php-fpm.socket
    dhcpd    dhcpd      73931 12 stream /var/run/php-fpm.socket
    root     syslogd    26720 6  dgram  /var/dhcpd/var/run/log
    

    Which suggests that turning DHCP server on one interface turns it on on all. Is this a bug or am I doing something wrong?

    B 1 Reply Last reply Nov 14, 2021, 5:51 AM Reply Quote 0
    • B
      bingo600 @scilek
      last edited by Nov 14, 2021, 5:51 AM

      @scilek

      I don't know the "inners" of the pfSense dhcp setup.

      But why do you care if the DHCP server listens on all interfaces, as long as it does NOT hand out DHCP ip addresses on the disabled interfaces (Non matching scopes)?

      /Bingo

      If you find my answer useful - Please give the post a 👍 - "thumbs up"

      pfSense+ 23.05.1 (ZFS)

      QOTOM-Q355G4 Quad Lan.
      CPU  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
      LAN  : 4 x Intel 211, Disk  : 240G SAMSUNG MZ7L3240HCHQ SSD

      S 1 Reply Last reply Nov 14, 2021, 6:24 AM Reply Quote 0
      • S
        scilek @bingo600
        last edited by Nov 14, 2021, 6:24 AM

        @bingo600 said in DHCP server listens on all IPs:

        But why do you care if the DHCP server listens on all interfaces, as long as it does NOT hand out DHCP ip addresses on the disabled interfaces (Non matching scopes)?

        Because I would like to run FreeRADIUS's DHCP server on one and only one of the interfaces. FreeRADIUS complains when the socket is already bound.

        I could run FreeRADIUS DHCP on all interfaces, but I would like to implement different logic for each. There is also the extra issue of FreeBSD not supporting binding to interface names, but only IP addresses, so it runs in unicast DHCP mode only, which means I will have to use some sort of DHCP relay if I use FreeRADIUS DHCP. However, pfSense's DHCP relay functionality won't allow me to relay the request to a non-default port, which is another complication.

        The problem is that there some rogue users on site that run automatic IP changing software on their devices. Of course, it only makes sense that such software is designed to move to an unused IP address to avoid and IP conflict, but still we don't want them to do that. Also imagine what would happen if the DHCP server leased an IP address to a device that is already using it.

        Currently I can allocate multiple MAC addresses to a user, and they can't log in with a different one. I know I can also issue each registered device its own IP address, but without some sort of DHCP server running on the relevant LAN interface, they will have to configure their IP settings manually.

        What I want to achieve is to configure pfSense and FreeRADIUS so that users will be able to use their registered devices using only the IP addresses assigned to those devices.

        I have set up a test site in my home lab and I am ready and willing to try new ideas.

        B 1 Reply Last reply Nov 14, 2021, 6:59 AM Reply Quote 0
        • B
          bingo600 @scilek
          last edited by Nov 14, 2021, 6:59 AM

          @scilek

          I see the issue.
          And the DHCP forwarder won't work if the DHCP server is active.

          If i had that issue , I'd prob. end up running the specific DHCP & FreeRadius on a separate server , and connect that to the specific L2 Lan.

          Might not be optimal if the site is remote with just a pfSense present.

          /Bingo

          If you find my answer useful - Please give the post a 👍 - "thumbs up"

          pfSense+ 23.05.1 (ZFS)

          QOTOM-Q355G4 Quad Lan.
          CPU  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
          LAN  : 4 x Intel 211, Disk  : 240G SAMSUNG MZ7L3240HCHQ SSD

          S 1 Reply Last reply Nov 14, 2021, 1:53 PM Reply Quote 0
          • S
            scilek @bingo600
            last edited by Nov 14, 2021, 1:53 PM

            @bingo600 said in DHCP server listens on all IPs:

            If i had that issue , I'd prob. end up running the specific DHCP & FreeRadius on a separate server , and connect that to the specific L2 Lan.

            Or even better, get hold of an old laptop, install Debian on it and move FreeRADIUS and other utilities to that one. I can't think of anything else right now. What would you recommend?

            B 1 Reply Last reply Nov 14, 2021, 3:17 PM Reply Quote 0
            • B
              bingo600 @scilek
              last edited by Nov 14, 2021, 3:17 PM

              @scilek said in DHCP server listens on all IPs:

              @bingo600 said in DHCP server listens on all IPs:

              If i had that issue , I'd prob. end up running the specific DHCP & FreeRadius on a separate server , and connect that to the specific L2 Lan.

              Or even better, get hold of an old laptop, install Debian on it and move FreeRADIUS and other utilities to that one. I can't think of anything else right now. What would you recommend?

              That was what i meant with "server"

              A raspberry-pi could do it , but i'd not use such a "beast" for production , primarily due to the SD card.
              If it had M2 or EMMC yes , but SD in a prod environment ... Naah.

              /Bingo

              If you find my answer useful - Please give the post a 👍 - "thumbs up"

              pfSense+ 23.05.1 (ZFS)

              QOTOM-Q355G4 Quad Lan.
              CPU  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
              LAN  : 4 x Intel 211, Disk  : 240G SAMSUNG MZ7L3240HCHQ SSD

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received