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

    Export DHCP entries, import on Captive Portal

    Scheduled Pinned Locked Moved DHCP and DNS
    2 Posts 2 Posters 2.8k 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
      laurocgb
      last edited by

      PFSense 2.0.1.

      I want export DHCP mac entries, and import them on Captive Portal "pass-through MAC". I tried editing the XML config file with sed, but the result was a invalid xml, which made the system unbootable (network interface mismatch error, with only ascii chars on the xml, no acentuation).

      Is there a way to do that? Maybe some plugin?

      –--
      Why  I need this:

      On my network (a class C, with valid Internet IP's) I have to

      • Allow only previously registered workstations, so we can keep track of who is using which ip address
      • Block unregistered personal devices on the network (personal notebooks, smartphones, etc)
      • Allow instant Internet access to clients (these are unregistered devices, which cannot wait for the sysadmins to register their mac address, they need instant Internet access)

      With that in mind, what I am going to do is, keep track of company workstations and servers on the DHCP entries, so we know who is using each ip address. All company devices must be registered with network staff. The DHCP server will give ip addresses to ALL unknown devices, all company and clients devices will receive an ip address. The captive portal will show the auth page to all mac addresses which are not on the "pass-through MAC" list, this list will contain only company devices. Only managers will have the captive portal auth credentials (about 10 usernames/passwords), so they can give it to clients or visitors.

      If anyone can point me how to export the DHCP entries, and import them on the Captive Portal, I will appreciate. Also, any comments to this setup are welcome.

      Lauro

      1 Reply Last reply Reply Quote 0
      • W
        wallabybob
        last edited by

        @laurocgb:

        I tried editing the XML config file with sed, but the result was a invalid xml, which made the system unbootable (network interface mismatch error, with only ascii chars on the xml, no acentuation).

        Interface mismatch is reported on startup when the config file references an interface which isn't present in the system. That suggests to me that your editing may have messed with the interfaces section of the config file, perhaps changing an interface name or adding a new interface name. Did you keep the original config file so you could check your editing made only the intended modifications?

        I don't know of any plugin or script to do what you describe so if you are unwilling to use the web GUI for your configuration changes some sort of editing of the config file is the only alternative I can suggest.

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