Problem trying to isolate clients on Raspberry Pi Hotspot us
Posted: Tue Feb 21, 2017 8:01 am
Dear Community,
I have setup a Hotspot on Raspberry Pi. I want to achieve client isolation using iptables. Before moving to iptables way, I tried putting flag in file. Unfortunately, it did not work for me.
Below are the steps that I took. However, it is not working. Can you kindly let me know if I have missed anything here.
1. Setup Hotspot with Hub address (Raspberry Pi) as 192.168.42.1
2. My iptables is very simple
3. Connect two machines to the hotspot WiFi. The IP address that they receive is 192.168.42.244 and 192.168.42.61
4. Now when I ping from .244 to .61 it pings. When I ssh from .244 to .61 it connects.
5. When I see output it shows
163 packets in ACCEPT chain
and 3 packets in DROP chain
But communication between the two clients is working. I am expecting it that communication should have failed.
Any help / pointers are appreciated.
I have setup a Hotspot on Raspberry Pi. I want to achieve client isolation using iptables. Before moving to iptables way, I tried putting
Code: Select all
ap_isolate=1Code: Select all
hostapd.conf Below are the steps that I took. However, it is not working. Can you kindly let me know if I have missed anything here.
1. Setup Hotspot with Hub address (Raspberry Pi) as 192.168.42.1
2. My iptables is very simple
Code: Select all
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
# Based on this URL http://askubuntu.com/questions/685680/client-isolation-in-ubuntu-with-hostapd
#Accept all the traffic that is intended for me.
-A INPUT -s 192.168.42.0/24 -d 192.168.42.1 -j ACCEPT
#Reject all the traffic that is intended for anyone else in the network.
-A INPUT -s 192.168.42.0/24 -d 192.168.42.0/24 -j DROP
4. Now when I ping from .244 to .61 it pings. When I ssh from .244 to .61 it connects.
5. When I see
Code: Select all
sudo iptables -L -nv 163 packets in ACCEPT chain
and 3 packets in DROP chain
But communication between the two clients is working. I am expecting it that communication should have failed.
Any help / pointers are appreciated.