Captive portal wont re direct after authentication



  • hi just need some configuration tips… i have pfsense and i want to use is as a gateway for my network and from our main router inside our network i have enable the captive portal and set my cisco router DGW to my pfsense and set DNS server to add the the pfsense IP address. when i tried to open portal page shows up but after entering the username and password it doesnt re direct instead it goes to portal page again.. how can i get it to redirect the page to the internet?

    thanks for the help

    my Setup:

    (microsoft server (DNS & DHCP)
                                            |
                                            |Lan||--------{router(cisco 2900)}--------[pfsense(captive portal)]–-Internet
    Users/Computers                  |



  • What browser are you using? I've seen Opera do this quite frequently and Firefox only occasionally. I use vouchers with CP; I don't know if that would make a difference.


  • Rebel Alliance Developer Netgate

    Are you using the "disable MAC filtering" option on the captive portal?

    If so, and your CP clients and the pfSense LAN IP are on different subnets, you're probably hitting a known (and fixed in the repo) bug.
    https://github.com/bsdperimeter/pfsense/commit/4d41d0b8253fb21a28e466e654f1757576898364

    It was fixed after 2.0.1 though so you'll have to edit that in manually or gitsync to RELENG_2_0



  • i am using all known browser IE 8 and 9 firefox and opera and chrome.. when i try to log-in captive portal page comes out but when i login after authentication it gets back to the captive portal and wont redirect the page example google.com

    i have tried to use bridge but still have the same problem..

    i have tried putting static ip and GW my computer is pfsense then the primary DNS is pfsense it works ok..

    thanks
    jeremy



  • found this on the forum from digging in… i will testing this today and post the result thanks.. for all the help!..

    http://forum.pfsense.org/index.php/topic,43089.msg225074.html#msg225074



  • forgot to mention that no i am on the same subnet e.g. 192.168.0.0/24 my router is 192.168.0.254 and pf is 192.168.0.250

    thanks



  • Hello everyones, does anybody knows if this bug has been fixed for the USB stick version of PFSense???
    I added some pictures with brief description, thanks.
    I was looking for a way to add every single pics on this single reply here, but i can't find a way to add a simple written description for each of the images, so, to avoid confusion i will have to add each picture on an additional reply…..sorryyyy

    This is what i am using right now:

    ![System Information.jpg](/public/imported_attachments/1/System Information.jpg)
    ![System Information.jpg_thumb](/public/imported_attachments/1/System Information.jpg_thumb)



  • Some of the options i selected for this test:




  • My browser homepage is set to "www.Google.com", notice what happen on the address bar on top, as soon as i open Internet Explorer




  • And this happen whan i click on "Continue", leaving both the username and password fields blank, the address on the bar changes but doesn't do anything else, if however after this strange "login" you go to insert a new web address there, it will goes to any websites without problems…




  • Ohh…and it works like a charm on the Iphone  ;D  so why not on a computer? ???




  • @jimp:

    Are you using the "disable MAC filtering" option on the captive portal?

    If so, and your CP clients and the pfSense LAN IP are on different subnets, you're probably hitting a known (and fixed in the repo) bug.
    https://github.com/bsdperimeter/pfsense/commit/4d41d0b8253fb21a28e466e654f1757576898364

    It was fixed after 2.0.1 though so you'll have to edit that in manually or gitsync to RELENG_2_0

    The BUG is still there, i swapped the "captiveportal.inc" with the one you suggested (https://raw.github.com/bsdperimeter/pfsense/4d41d0b8253fb21a28e466e654f1757576898364/etc/inc/captiveportal.inc) , but i am still experiencing the same problem addressed on this thread, i hope a new release correcting this issue will be coming out soon….



  • @EOC2611P:

    Ohh…and it works like a charm on the Iphone  ;D  so why not on a computer? ???

    Different browsers might be a factor. On the PC you could try Firefox, Chrome, Opera. I see something similar to what you described fairly frequently when I use Opera, rarely when I use Firefox.



  • Thanks for the suggestion WallabyBob, unfortunately i know for a fact that almost 95% of the people having a computer around here (..but more likely 100%), are using IE.
    Is this bug affecting all versions of PFSense? If not maybe i could try an older version or a different installation.
    I did try a couple of works around suggested by users here, by editing the "captiveportal.inc", so far the only visible change is a new pop-up window asking if i want to continue to the captive portal or not, but the problem is still there…. :-\



  • A curiosity:  i can't remember when did it happen timewise, but i clearly remember to have had to deal in the past with a captive portal which after login, redirected to a page that was instructing to write the webpage you wanted to access on the address bar to start browsing the internet….this bug in PFSense is having exactly that same problem, so, a similar work around could be used, until one day, hopefully, it will start working as it supposed to... :D



  • Try putting the redirection URL with full URI including http~~:// with the address.

    Its mostly a browser issue since they do not redirect if you do not specify that.~~



  • Thank you Ermal, adding the "http" solved the problem  ;D

    It took me sometime to put in place your suggestion because everytime i boot my pc, all the PFSense settings resets to default, i didn't remember which configuration was the correct one so i wasn't able to make it works again….now i have taken a picture of the screen with the correct settings, so, next time i reboot the system it should be easier to put back the correct settings in place.
    I am now going to try to create a custom "login" page, i don't really like the default page with the username and password fields, all i want is a simple button to get access to the internet, where the user will agree that by clicking there and accessing the net, he or she will take the entire responsabilities for his/her own action and the content he/she will get access too, plus some pictures/graphics here and there on the page to not to let it look as a complitely bland/dull page...i will report back soon, thank you all.



  • @EOC2611P:

    It took me sometime to put in place your suggestion because everytime i boot my pc, all the PFSense settings resets to default, ….

    Never saw that issue before.
    pfSense stores it settings, so rebooting the box will not wipe out your changes ….

    Btw: why should you reboot your pfSense box ?



  • Hi Gertjan, i reboot PFSense because when i am done with all my tests, i just switch off the pc,modem,routers, everything which i am not using….
    My version of PFSense is installed on a usb stick, not directly on the pc hard drive.



  • Aha !
    That's ok for testing purposes …
    I advise to get get your hands on an old PC (5 - 7 years) - normally, you can get these for free these days.
    Take out all the media stuff - add two NIC's (5 $ each).
    Run pfSense from its own hard drive - run pfSense on a dedicated system.
    To make things perfect, add a UPS - pfSense can talk with it to shut down properly if needed.



  • @Gertjan:

    you can get these for free these days.

    Well, i am currently living in a somehow very stingy part of our planet right now, so, nothing is free around here, sometime people even try to charge me for what i own! however that's a bit off topic  :D
    I choose the USB stick installation after having seen all the reports of people loosing all their files once PFSense was installed, and guess what? everything i had on the stick got erased, however they were just duplicate files, so not a problem.
    I got another spare old pc right here, i was hoping of being able to operate both PFSense and my webserver on the same pc, but once PFSense is running, doesn't look like i can do anything else on that pc…. :-\


Log in to reply