Captive Portal

Posted by wassilychair 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Captive Portal
July 16, 2018 05:16PM
Hi,
we are trying to set up a captive portal on a Raspberry Pi(rate)Box (RPi3).
We would like to have a pop up window to redirect to the content page. All the documentations that we found was for TP-Link 3020.
Is there a way to set it up also on Raspberry Pi?
Thanks
Re: Captive Portal
July 22, 2018 05:25PM
Hi,
no, there is no easy way or a description to implement a captive Portal solution on the RPi.

Best regards Matthias
Re: Captive Portal
December 16, 2018 01:53AM
I don't know about popup window, but if you want all the traffic to automatically redirect to the Pi server
one could try the following:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.10.10.10
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.10.10.10
Replacing 10.10.10.10 with the IP address of the Pi server.
80 and 443 are the web server ports.

in /etc/dnsmasq.conf add:
address=/#/10.10.10.10
also replacing 10.10.10.10 with the IP address of the Pi server.

Have a nice day
Re: Captive Portal
December 16, 2018 02:07AM
for a full captive portal setup you might try:
using iptables and PHP to create a captive portal
As Matthias said, it not necessarily easy.

Have a nice day.