Acujl
Posts: 13
Joined: Wed Jan 20, 2016 9:01 am

Redirect all trafic on a hotspot

Sun Sep 16, 2018 10:38 pm

Heya there!
Raspberry Pi 2 B+

I have a hotspot configured on wlan0 and I want to redirect all traffic to a wordpress website that I have installed on the raspberry too (for example, if someone connects my website pops up)

How can I do that? I've already tried with iptables but nothing..

ejolson
Posts: 2159
Joined: Tue Mar 18, 2014 11:47 am

Re: Redirect all trafic on a hotspot

Mon Sep 17, 2018 4:39 am

Acujl wrote:
Sun Sep 16, 2018 10:38 pm
Heya there!
Raspberry Pi 2 B+

I have a hotspot configured on wlan0 and I want to redirect all traffic to a wordpress website that I have installed on the raspberry too (for example, if someone connects my website pops up)

How can I do that? I've already tried with iptables but nothing..
I think it is difficult, because maybe an Android phone will check that certain Google data services respond before accepting a WiFi connection.

Acujl
Posts: 13
Joined: Wed Jan 20, 2016 9:01 am

Re: Redirect all trafic on a hotspot

Mon Sep 17, 2018 8:40 am

ejolson wrote:
Mon Sep 17, 2018 4:39 am
Acujl wrote:
Sun Sep 16, 2018 10:38 pm
Heya there!
Raspberry Pi 2 B+

I have a hotspot configured on wlan0 and I want to redirect all traffic to a wordpress website that I have installed on the raspberry too (for example, if someone connects my website pops up)

How can I do that? I've already tried with iptables but nothing..
I think it is difficult, because maybe an Android phone will check that certain Google data services respond before accepting a WiFi connection.
I've used many wifis that do this. It redirects to a page so that I can login and then use the wifi. Now I don't want login, I just want that users visit a certan page before I gave them wifi

procount
Posts: 1304
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Redirect all trafic on a hotspot

Mon Sep 17, 2018 9:26 am

Search for "captive portal".
Something like "coovachilli" (https://coova.github.io/CoovaChilli/) will do it.
Here is an easy tutorial for how to set it up: https://www.pihomeserver.fr/en/2015/08/ ... il-captif/ But I'm not sure how up to date it is, it may need tweaking for the latest Raspbian Stretch.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574


Return to “Networking and servers”