Wifi HotSpot: how to allow access to only few website?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
elconfa
Posts: 3
Joined: Tue Oct 02, 2018 9:22 am

Wifi HotSpot: how to allow access to only few website?

Post by elconfa »

Good morning, I found this project only a few days ago and I'm already converting every raspberry I have at home. I created an access point with Raspberry 3B and it works great! Now I would like to be able to check and block some websites accessible from the access point. More precisely, I would like to leave only 2 or 3 websites accessible to those who connect to the access point left without a password. I searched online, but I would like to be sure that it works well with the hotspot created with Dietpi.
Thank you for any help and advice.

Massimo
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Wifi HotSpot: how to allow access to only few website?

Post by MichaIng »

I also vote for iptables. You need to read a bid how to configure the rules accordingly to block all outgoing/forwarded access but just these few. Also it would be great of course if this only applies for the clients connected to the hotspot, not the RPi itself. So filtering should be done on the AP interface.

Use /etc/network/if-pre-up.d/ (maybe it needs to be if-post-up.d, not sure) to automatically load the rules on boot/network start.
elconfa
Posts: 3
Joined: Tue Oct 02, 2018 9:22 am

Re: Wifi HotSpot: how to allow access to only few website?

Post by elconfa »

I will try.
Thanks
Post Reply