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

    Re-enter a voucher in captive portal when client get new IPaddress

    Captive Portal
    captiveportal voucher re-enter
    2
    5
    734
    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.
    • T
      trungnguyen
      last edited by

      I'm using pfsense version 2.6.0
      My issue is: when I have a voucher and I get connected with the first ip address from pfsense dhcp. The voucher expires in a month, then next day I get a new ip address from the dhcp it is open the captive portal again thus I have to re-enter my voucher to have connection even my voucher still valid.

      Can some one know to fix this?
      Thanks a lot

      1 Reply Last reply Reply Quote 0
      • T
        trungnguyen
        last edited by

        it means, the client is not auto re-connect even the voucher still valid, I have to re-enter my voucher in captiveportal again. is there anyway to auto re-connect without re-enter voucher?

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

          @trungnguyen said in Re-enter a voucher in captive portal when client get new IPaddress:

          even my voucher still valid.

          This needs some thoughts.

          First : what is a captive portal session ?
          It's the collection of device's IP, MAC, voucher code, initial time stamp, and a firewall rule number, and some more stuff.
          When a voucher is valid (not expired), a session is created, the firewall rule (with IP and MAC) is entered = the device can pass through.

          Now comes the soft time out, if you use it, the hard time out, if you use it. When any of these two becomes 'true', the session is deleted, the firewall rule is removed. The user has to login again using the voucher code.
          But also : the user goes away for the day, comes back next day, recognizes your network, will ask for the same IP as yesterday If that IP isn't aviable, he'll be getting another one, so even if the session still exited from yesterday, the user will have to enter again the voucher code because his IP changed.
          Thus : if you use very long voucher times, then it might be advisable to use longer DHCP leases. And with that comes also : big DHCP IP pool.

          So :

          @trungnguyen said in Re-enter a voucher in captive portal when client get new IPaddress:

          the client is not auto re-connect even the voucher still valid

          that's not how it works.
          The voucher user connect right through the portal if the session :

          6587ecb8-4567-493f-9bd7-b0e4ec25bdd9-image.png

          is still visible == exists.

          It will get removed when idle time out hard time out.
          Or voucher time out.
          And, as said, DHCP obtained IP should be the same.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          T 1 Reply Last reply Reply Quote 1
          • T
            trungnguyen
            last edited by

            @gertjan
            Yes, you are right, in this case we need a big DHCP pool and then set the DHCP lease time to match the voucher expire time.

            thanks a lot

            1 Reply Last reply Reply Quote 0
            • T
              trungnguyen @Gertjan
              last edited by

              @gertjan
              btw, I change mode to "last login" in the captive portal setting then it work fine for me, clients should re-enter the code at the time DHCP lease.

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