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

    Customizing portal

    Captive Portal
    4
    5
    1.5k
    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.
    • X
      xamber
      last edited by

      Hey, I'll try to explain what i want to achieve and why in the best possible manner.

      I'm organizing an LAN-Party and have been until now been using static IP's for our visitors, which has been structured 10.100.table.seat (IE. 10.100.1.1 or 10.100.2.30) so we can track who's ip is on what seat and such. Which has been fine but, we need to coach our participants how to set static ip's, so i'd like to use dhcp instead.

      So i thought of using the captive portal function, but i'd like to use the portal just as it is, with a few modifications. I'd like to have additional fields, one that the user has to specify it's name and another field that specifies which seat the user has.

      So what i'd like to get from the captive portal on submit is:
      Mac
      IP
      Name and Seat.

      So question is, is this possible, and how would you recommend me tackling this situation?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • J
        jaspras
        last edited by

        I don't  know if you have any programming skills and if you have any SQL servers in your network . If you do then it can be done

        1 Reply Last reply Reply Quote 0
        • X
          xamber
          last edited by

          Yeah, well i think i've got a solution.
          However i can't get my php script to connect to my external database..
          Well i get the following error "Fatal error: Call to undefined function mysqli_connect()"
          But i did not have time to troubleshoot it last night. But i don't understand why that piece of code would not work, i used the exact bit of code for database connection before i uploaded it to the pfsense box. So i'm thinking there's something wrong with the pfsense http server or php extensions or something.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            Yeah.  Instead of trying to get pfSense to do everything, it might be easier to refer to another more generic web server (with apache, php, mysql, etc) and refer to it in the Pre-authentication redirect URL in captive portal.  It can gather and store the data then submit the proper fields back to the captive portal which is presumably set to "no authentication" and you're done.

            I've never done it, but that's what I'd try first.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

              @xamber:

              …..
              Well i get the following error "Fatal error: Call to undefined function mysqli_connect()"
              ....

              Troubleshooting wouldn't take long if you called this function: phpinfo();
              You will discover that PHP as it executes on pfSEnse, has NOT, by default, MySQL (client) support activated.

              I don't recall how, but there is a trick to activate it.
              (it's on this forum).

              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.