OPNsense Forum

Archive => 16.1 Legacy Series => Topic started by: liorz on February 01, 2016, 05:00:30 pm

Title: [SOLVED] Captive Portal
Post by: liorz on February 01, 2016, 05:00:30 pm
Hi
I just upgrade for the 16.1 and I really dont understand how to create the captive portal
Please help me , or guide me how to start?

Thanks , Lior.
Title: Re: Captive Portal
Post by: AdSchellevis on February 01, 2016, 07:54:30 pm
More documentation is on the way, but I can help you with the basics first.

1) create a new zone by pressing the (+) in the right corner
2) Choose an interface on which CP should run and an authentication method + description for the zone
3) "save changes"
4) press apply and your basic zone should be functional

If you want to use vouchers, go to System -> Access -> Servers and create a new voucher provider, you can use this provider as authentication method in the zone.



Title: Re: Captive Portal
Post by: liorz on February 01, 2016, 10:19:41 pm
exactly what I've done
but still nothing happen
how I can monitor that or what can cause this problem?

Thanks
Title: Re: Captive Portal
Post by: AdSchellevis on February 02, 2016, 08:25:12 am
Not sure what your issue is, maybe you could share some more details like the interface where you enabled the captive portal on and what your network looks like.

Normally you just enable your zone on lan or an opt interface and press apply, if you want to debug the rules it creates behind the scenes you can open a shell and run "ipfw show"
Title: Re: Captive Portal
Post by: liorz on February 02, 2016, 09:14:12 am
Ok
so when i try to enter to google.com it dosent redirect to captive portal
but when I try to enter 8.8.8.8 its redirect to the captive portal and then I try to login to google.com
and it work..
so I think there is DNS issue before the login to the captive portal or redirect issue
something strange here.
Title: Re: Captive Portal
Post by: AdSchellevis on February 02, 2016, 09:28:48 am
google.com uses https, which probably isn't redirected with your configuration, you can setup a certificate in your zone to catch https traffic.
If you want to check if dns is working correctly first, try to go to a website which doesn't use https and see if it redirects to the login page.
Title: Re: Captive Portal
Post by: liorz on February 02, 2016, 10:09:09 am
I tried with http website
same issue
Title: Re: Captive Portal
Post by: AdSchellevis on February 02, 2016, 10:10:46 am
did you configure a forwarder?
Where does your client sends its dns requests to?
Title: Re: Captive Portal
Post by: liorz on February 02, 2016, 10:13:02 am
I tried with DNS forwarder , same issue
I configured now without DNS forwarder and configured static dns 8.8.8.8 ,8.8.4.4
Title: Re: Captive Portal
Post by: AdSchellevis on February 02, 2016, 10:14:17 am
Can you describe your setup?
Title: Re: Captive Portal
Post by: liorz on February 02, 2016, 10:20:27 am
http://postimg.org/image/iti0t34uf
http://postimg.org/image/5im4qoxcr
Title: Re: Captive Portal
Post by: AdSchellevis on February 02, 2016, 03:51:34 pm
That's not really a description of your network setup  ;)
What does your connection look like (direct attached networks, vlans, etc), ip ranges basic firewall rules, what ip address does your client receive, what kind of features of OPNsense are you using, does all function correctly if CP is disabled. etc. etc..
Title: Re: Captive Portal
Post by: liorz on February 03, 2016, 03:27:36 pm
OK I solved the issue by configure on all interfaces the DNS forwarder
now I want to create voucher .. the vouchers are so complicated
there is an option to configured it with numbers only ? (like the old OPNsense captive portal,  it was option to configured the key )


Thanks , Lior.
Title: Re: Captive Portal
Post by: AdSchellevis on February 03, 2016, 04:24:58 pm
No, you can only generate passwords in the current format.
The configurable key option is not something we're considering, maybe we might add an option to choose "unsafe password" with limited character set later on...