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

    Ubiquiti + fpSense + Captive Portal

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 6 Posters 13.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.
    • DerelictD
      Derelict LAYER 8 Netgate
      last edited by

      Create VLAN interfaces on pfSense and tag the SSID with the right VLAN from the AP.  Captive portal still doesn't care.  It's just another interface.

      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
      • B
        BlazeStar
        last edited by

        @Derelict:

        Create VLAN interfaces on pfSense and tag the SSID with the right VLAN from the AP.  Captive portal still doesn't care.  It's just another interface.

        Thanks for your replies.

        1. I went into INTERFACES > ASSIGN
          Then the VLAN tab
          I created a new VLAN, and named it CP_VLAN (for captive portal)
          I gave it the tag "10"
          I used the same "Parent interface" as my LAN, which in this case is bge0

        2. Then back into INTERFACES > ASSIGN
          Then the Interface assignments tab.
          I created a new inteface, called it CP_Interface.
          Configured a few things, and assigned it to CP_VLAN.

        3. Then I went into SERVICES > DHCP
          I configured the CP_Interface DHCP.

        4. Then I went into SERVICES > CAPTIVE PORTAL
          I created a new one called CP.
          I enabled it and added the CP_Interface.

        5. In the UniFi app, I created a new SSID, I called it CAPTIVE PORTAL (for now)
          I tagged it with the tag "10".
          No password, just "open"

        applied everything…

        It doesn't work :(

        When I try to connect to the SSID "CAPTIVE PORTAL" it will not ever connect.

        I tried to remove the VLAN tagging, then it works !

        Where did I screw up?

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

          How is the AP connected to pfSense?  Do you have a managed switch?  VLANs are layer 2.  The switch needs to know about them too.

          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
          • B
            BlazeStar
            last edited by

            @Derelict:

            How is the AP connected to pfSense?  Do you have a managed switch?  VLANs are layer 2.  The switch needs to know about them too.

            The AP is just plugged into the switch.

            The switch does not manage VLANs.

            I was under the impression that I could just tag the trafic from the AP and somehow associate this tagged trafic to an interface, then manage this interface with a captive portal.

            Maybe I got it all wrong?

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

              Yes, you've got it wrong.  You cannot expect an unmanaged switch to pass VLAN tags.  It might or it might not.

              Something like this will do what you need:

              http://www.amazon.com/D-Link-EasySmart-Gigabit-Ethernet-DGS-1100-08/dp/B008ABLU2I/

              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
              • B
                BlazeStar
                last edited by

                @Derelict:

                Yes, you've got it wrong.  You cannot expect an unmanaged switch to pass VLAN tags.  It might or it might not.

                Something like this will do what you need:

                http://www.amazon.com/D-Link-EasySmart-Gigabit-Ethernet-DGS-1100-08/dp/B008ABLU2I/

                Well it appears I have 2 of those : HP Procurve 1810G-24
                And that they are manageable.
                And you can set up VLAN.
                I just never even opened the webconfigiruator… I just plugged everything in and it worked.

                My question is : do I need to create a VLAN for everyone except the CP of the AP, and then a VLAN for the CP of the AP ?

                Or can I just create a VLAN for the CP of the AP ?

                Thanks !

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

                  http://en.wikipedia.org/wiki/Vlan

                  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
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    Why don't you just run the captive portal on your unifi controller?  Pretty sure is has more features than the pfsense one.

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • D
                      deinspanjer
                      last edited by

                      @johnpoz:

                      Why don't you just run the captive portal on your unifi controller?  Pretty sure is has more features than the pfsense one.

                      I second this.  I'm running an UniFi AP-LR, and if you are looking for a captive portal to allow wireless guests, just do it through the UniFi configuration app instead.

                      If you actually do want to captivate not only WLAN users but also LAN users, then carry on with trying to get it going in pfSense.

                      1 Reply Last reply Reply Quote 0
                      • B
                        BlazeStar
                        last edited by

                        @johnpoz:

                        Why don't you just run the captive portal on your unifi controller?  Pretty sure is has more features than the pfsense one.

                        Sounds like a very good idea!

                        What I ideally wanted was to work without a password, without vouchers and without payments.
                        When I select the HOTSPOT option on the UniFi controller, it requires that I select PAYMENT or VOUCHER.

                        I just wanted users to see the WiFi, connect to it and end up on a landing page where they have to put their names or something.

                        Then they have 30 minutes of WiFi and they are disconnected.

                        Also I would have liked to set some trafic shaping rules so they can't hog the bandwidth.

                        And finally, of course, I didn't want these users to have access to other computers / servers on the network… (CIFS shares, etc.)

                        Is that something that is possible with the Hotspot feature of UniFi ?

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          You can do whatever you want with the portal of unifi - since you can customize it, etc.  Why do you want them to put in their name?  With just a click you can have some simple password they enter and get 30 minutes for example.

                          Pretty sure could be setup to just take any info you wanted.
                          http://community.ubnt.com/t5/UniFi-Configuration-Examples/UniFi-Hotspot-portal-customization/ta-p/474293

                          As to bandwidth limits, yeah you can set those as well for guests
                          https://community.ubnt.com/t5/UniFi-Configuration-Examples/UniFi-Set-traffic-bandwidth-limits/ta-p/523185

                          simplepassword.png
                          simplepassword.png_thumb

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • N
                            ndutyme
                            last edited by

                            BlazeStar, did you ever get the solution that you wanted figured out?
                            I have some extra AP AC units and could possibly set one up with a pfSense box and test (if I can find some extra time).

                            1 Reply Last reply Reply Quote 0
                            • Q
                              QuantumLynk
                              last edited by

                              im trying to do exactly this. If you just use the unifi captive portal, you need a dedicated computer to run the captive portal on, which is why i want to use pfsense. I can customize the pfsense CP more, and i dont need to sit a second computer on the lan to run it.

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