OPNsense Forum

Archive => 16.7 Legacy Series => Topic started by: dragze on December 19, 2016, 03:10:01 pm

Title: Captive Portal
Post by: dragze on December 19, 2016, 03:10:01 pm

I have a OPNsense server with two physical interfaces, there are multiple VLAN's setup on the physical nics.
There is one virtual WAN interface and multiple virtual LAN interfaces.

I have setup a captive portal on one of the VLANs for wireless guests. This works however I do have an issue if I add that VLAN nic to the proxy server (setup in transparent mode) and the relevant firewall/NAT rules then this breaks the captive portal. I understand that this is because it is probably redirecting to the proxy before authenticating via the captive portal. But I do not know what I need to do to remedy this??

The second issue I have is I created a second captive portal and setup my test VLAN to use it, the purpose of this was to play with the firewall rules and see if I could solve the issue above. However there seems to be an issue that as soon as I enable the second captive portal it causes the first captive portal on the wireless guest network to result in a 404 error and I can see that the zone0 folder disappears from the /var/captiveportal directory. The zones are set to 0 and 1 respectively so I am stumped as to what is the cause of this issue??

Would really appreciate any help given.
Title: Re: Captive Portal
Post by: dragze on December 20, 2016, 09:34:01 am
Anyone got any ideas??

If you need any additional info in order to assist then just ask and I will provide. :)

Thanks in advance.
Title: Re: Captive Portal
Post by: dragze on December 20, 2016, 04:11:19 pm
Still battling with this issue.

I have found that if I disable the proxy server then enable both captive portals, zone0 still works but zone1 still doesn't work. zone0 files stay in place in /var/captiveportal but zone1 files never get generated. I have tried manually copying zone1 into the /var/captiveportal directory and setting ownership/group to www, still no joy.

When enabling both captive portals with the proxy server enabled both portals break. In addition zone0 files from /var/captiveportal get removed.

Zone1 files never get generated in /var/captiveportal unless i disable zone0 and then enable zone1, but as soon as you then enable zone0 again all zones get removed if proxy server is running or just one zone remains if proxy server is disabled.

Please please help, really want to get this working in OPNsense. The captive portal and a bunch of other features are so much nicer in OPNsense than pfSense. So really dont want to have to go back to pfSense if I can help it.