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

    Hostnames in captive portal status

    Scheduled Pinned Locked Moved webGUI
    3 Posts 2 Posters 1.0k 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
      l.capriotti
      last edited by

      I think it could be useful to have the hostnames listed in the captive portal status page, as there could be cases in which hostnames may give information on the hosts, something a MAC address is definitively hiding…

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

        True.

        hostnames aren't collected when login into the Captive Portal, but it's pretty sure the user/visitor was distributed an IP by the DHCP server from pfSEnse.
        If a hostname exists, it's in the /var/dhcpd/var/db/dhcpd.leases
        It's easy to check this file, the "Status => DHCP Leases" page is doing so already

        So the info exists. Some code from the script that generated the "DHCP leases" status page can be used to collect hostnames (IP and MAC are search fieds).

        This is more a "copy and adapt some existing code" project. I wonder why it wasn't done so before.
        And this there a real need for it - what are the all the advantages, because in larger (thousands of connected users!) networks, all these host names are really 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
        • GertjanG
          Gertjan
          last edited by

          "Rough design"
          If a hostname is available for a connected IP/MAC combination, it will be shown instead of the MAC:

          Capture-hostname.PNG
          Capture-hostname.PNG_thumb

          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.