pfSense Support Subscription

Author Topic: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #15 on: December 28, 2017, 08:02:28 am »
To ease up(same hardware on both configs):
pfSense 2.4: Captive Portal glitches
pfSense 2.3.5: Can't install packages
Please help X. X

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +174/-9
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #16 on: December 28, 2017, 08:05:07 am »
When re-installing, do you use the saved config file ?
If so, don't - the stored settings probably break pfSense.
If not, .... strange.

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #17 on: December 28, 2017, 09:24:45 am »
I am not... Especially on vms, I just use the default config and change what I need for testing.
Now, I was trying to fix packages on pfSense 2.3.5 and somehow the OS broke and I don't have access to webui nor the internet. I am going to reinstall once again and after I may have to switch to OPNSense or smt I really don't know... I love pfSense and don't want to replace it :(

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +174/-9
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #18 on: December 28, 2017, 09:30:26 am »
I am not... Especially on vms,....
VMS ? Some virtual machine ? Your problems are solved ! Just run pFsense on its own machine and it shines !!
I'm not saying that pfSense on a VM doesn't work, thousands are doing exactly that, but it needed a good setup for pfSense (the same as non-VM installs ;) ) but also good VM setup .... and that one ... well .... see dedicated forum for more info.

Example (just guessing) : 2.3.4 (old pfSense version btw) uses an old FreeBSD kernel. 2.4.2_1 uses a newer the Freebsd 11, which needs adapted VM settings.

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #19 on: December 28, 2017, 09:34:25 am »
I meant, I do run pfSense on a dedicated machines, my old pc, but today, as I was trying to figure out these problems, I used vms, because I can't do all of my NAT again, I just put it from the backed up file, but in the vms, I do everything from scratch to find out if the problem is with the main machine, and I still have the same problem, on the dedicated pfSense machine with restored some of the settings, and the virtual machine with a completely fresh and default config. So no, not problem solved.

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #20 on: December 28, 2017, 09:51:19 am »
I found out the problem for packages not being installed, it's because they are made for that newer kernel, freebsd 11, and so can't be installed on 2.3.5, both 2.3.5 and 2.4 use the same links to packages, which is a bummer, what would be the point of 2.3.5 then? Nonetheless, I'll try 2.4 again to see if it still has the same problem with captive portal and can only hope that if it does, it gets patched soon for me.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9606
  • Karma: +1090/-309
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #21 on: December 28, 2017, 10:42:18 am »
System > Update, Update Settings

Switch to Legacy 2.3.X and you will hit the correct package repo for 2.3.5 / FreeBSD 10.3.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #22 on: December 28, 2017, 10:51:25 am »
OK here we go, finally some kind of error(pfSense 2.4 latest stable):
Message from syslogd@pfSense
pfSense nginx: [ emerg ] 99236#100114: bind() to [0.0.0.0]:8002 failed (48: Address already in use)
Another same one, but instead of 0.0.0.0 it's ::
Help?

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +174/-9
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #23 on: December 28, 2017, 11:42:50 am »
Message from syslogd@pfSense
pfSense nginx: [ emerg ] 99236#100114: bind() to [0.0.0.0]:8002 failed (48: Address already in use)
Ah, now we're getting somewhere  ;D
Only one instance of nginx process will bound to port "8002" : normally the first instance, your first zone. More zones could be be defined.
8002 for http access (first zone)
8003 for https access (first zone)
8004 for http (second zone)
and so on.

But : one is already running on that very port. (NOT normal - a previous instance could not be stopped ?! ... )

On my systems, when everything is running, I see this :
Code: [Select]
[2.4.2-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: ps ax | grep 'nginx-'
 5611  -  Is       0:00.00 nginx: master process /usr/local/sbin/nginx -c /var/etc/nginx-webConfigurator.conf (nginx)
 6159  -  Is       0:00.00 nginx: master process /usr/local/sbin/nginx -c /var/etc/nginx-cpzone1-CaptivePortal.conf (nginx)
 7546  -  Is       0:00.01 nginx: master process /usr/local/sbin/nginx -c /var/etc/nginx-cpzone1-CaptivePortal-SSL.conf (nginx)
which shows on instance for the GUI  (webConfigurator) and two for the captive portal (CaptivePortalxxxx) (one for http access and one for https access).

When I stop the captive portal, the latter two will (should !) disappear.

Btw :
Code: [Select]
sockstat -4l | grep 'nginx'
Check out the logs when everything start from boot or reboot and at least one captive portal is active. When changing settings, it should be stopped, and restarted.

Another same one, but instead of 0.0.0.0 it's ::
The IPv6 counterpart. Useless for the Captive portal, because its IPv4 only.

Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #24 on: December 28, 2017, 12:00:07 pm »
Ok, I tried both of those commands and they are the same for me(not the ids of the services ofcourse). I only have 1 CP zone, so for the first command, it's those 3 lines. Now, where should I check logs for starting up captive portal, or what do I even need to look for in logs? Thanks a lot, finally some advancement :D

Offline mikeisfly

  • Sr. Member
  • ****
  • Posts: 493
  • Karma: +11/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #25 on: December 28, 2017, 01:24:49 pm »
What I suspect your problem is your are running a captive portal on the same LAN that you are accessing the firewall through. So while you are connected to the pfSense you activate the portal but your state is not dropped. Your mac is not authorized so you are not forwarded to the redirect page and you get the error that you are getting. I bet if you connect another PC, phone or something that was not on the LAN at that time (so it didn't have any open states) that new device will be forwarded to the portal splash screen. The fix would be to clear all your states, but because you can't connect to the firewall you can't do it. That is why restarting pfsense allows you to work once again. Maybe a fix for you would be to create another interface where you can configure the firewall instead of trying to activate a CP on the same interface you are accessing it through.


Offline aleksasiriski

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #26 on: December 28, 2017, 02:49:28 pm »
No, you suspect falsely. I already have my macs added, since the pfSense 2.3.0, because that's when I set my everything up. Now in the upgraded 2.4 the only problem with pfSense is when changing some settings under the CP zone tab and saving those options, then the nginx breaks and I have to restart the machine. The changes ARE ACTUALLY SUCCESSFULLY SAVED.

Offline mikeisfly

  • Sr. Member
  • ****
  • Posts: 493
  • Karma: +11/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #27 on: December 28, 2017, 03:06:03 pm »
No, you suspect falsely. I already have my macs added, since the pfSense 2.3.0, because that's when I set my everything up. Now in the upgraded 2.4 the only problem with pfSense is when changing some settings under the CP zone tab and saving those options, then the nginx breaks and I have to restart the machine. The changes ARE ACTUALLY SUCCESSFULLY SAVED.

See bugs in https://github.com/pfsense/pfsense/pull/3640 maybe this is the problem that you are running into?

Offline mikeisfly

  • Sr. Member
  • ****
  • Posts: 493
  • Karma: +11/-0
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #28 on: December 28, 2017, 03:15:30 pm »

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9606
  • Karma: +1090/-309
    • View Profile
Re: Captive Portal acting weird in 2.4(2.4.2-RELEASE-p1)
« Reply #29 on: December 28, 2017, 03:21:23 pm »
Do not administer captive portal from a device subject to the captive portal. Period.

Please fix that and try again.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM