2

Context: I am trying to set up a WiFi hotspot on a Raspberry Pi by bridging my ethernet connection.

Question: How do I disable AP isolation or client isolation?

Pre-work: Here is what I have done yet.

  1. Install the following modules.

    apt-get install hostapd bridge-utils
    
  2. Stop hostapd service.

    systemctl stop hostapd
    
  3. Prevent eth0/wlan0 ports from being allocated by DHCP.

    vi /etc/dhcpcd.conf
    
  4. Add the following lines towards the end of the file, but above any interface blocks.

    denyinterfaces wlan0
    denyinterfaces eth0
    
  5. Add the bridge.

    brctl addbr br0
    
  6. Connect eth0 to br0.

    brctl addif br0 eth0
    
  7. Add to interfaces.

    vi /etc/network/interfaces
    auto br0
    iface br0 inet manual
    bridge_ports eth0 wlan0
    
  8. Configure access point.

    vi /etc/hostapd/hostapd.conf
    interface=wlan0
    ssid=wifi-ssid
    hw_mode=g
    channel=7
    wmm_enabled=0
    macaddr_acl=0
    auth_algs=1
    ignore_broadcast_ssid=0
    wpa=2
    wpa_passphrase=passphrase
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP
    rsn_pairwise=CCMP
    
  9. Point system to use this file.

    vi /etc/default/hostapd
    DAEMON_CONF="/etc/hostapd/hostapd.conf"
    
  10. Reboot

    systemctl start hostapd
    reboot
    
1
  • 1
    FYI: To create code sections in a list, use 2*4=8 spaces in front of the code.
    – zx485
    Nov 12, 2018 at 23:30

1 Answer 1

1

Looking at hostapd.conf, it says

# Client isolation can be used to prevent low-level bridging of frames between
# associated stations in the BSS. By default, this bridging is allowed.
#ap_isolate=1

So client isolation (WLAN clients on the same AP can talk to each other) is disabled by default. Unless your built of hostapd has it enabled by default, clients should be able to talk to each other. If that is the case, enable it in the config file.

How did you determine that WLAN clients can't talk to each other, and client isolation is enabled? Have two WLAN clients ping each other?

In case your question is not about client isolation, but about the bridge between eth0 and wlan0 not working: Again, how did you test that it doesn't work? Have a host on LAN and a host on WLAN ping each other? Did you check the IP configuration on each of those hosts? How do the hosts get their IP addresses (from which DHCP server? Or static?) Did you check routes? You can debug with tcpdump -ni interface_name in a terminal window for each important interface, and see where your packets get stuck.

To actually isolate LAN from WLAN one usually uses ebtables rules, and it's unlikely you accidentally inserted the correct ones... So pretty sure something in your setup is just not working.

5
  • It makes sense that client isolation is disabled by default.
    – sid
    Nov 14, 2018 at 4:01
  • Full disclosure - one of the devices is a cast speaker and the other is a phone. I tried pairing the device and the phone, and I got an error message saying it could not talk to the speaker. You got the question right. It was abou client isolation. Hosts are assigned IPs via DHCP.
    – sid
    Nov 14, 2018 at 4:06
  • So things to test: (1) Connect two devices you fully control to the AP, like two laptops, see if they can ping each other. (2) Run wireshark on wlan0 on the AP to debug the "pairing" attempt. I don't remember if inter-client communication shows up; if it doesn't, (3a) replace one device with one you control and run wireshark on that device to at least debug half of the "pairing", or (3b) use two APs bridged via LAN if you have the hardware, run wireshark on LAN port. My money is on "pairing" making assumptions that are not given, like link-local IP address, or multicast stuff.
    – dirkt
    Nov 14, 2018 at 6:30
  • I was able to figure out that the speaker could not connect to the hotspot. Which is why the phone and the speaker were unable to talk to each other. I set up a hotspot from my Windows laptop and I was able to get things set up properly. But, I wanted the hotspot to run from the Raspberry Pi. So, I looked for other OS's that natively supported hotspots instead of manually using hostapd. I installed Ubuntu MATE and it works now.
    – sid
    Nov 18, 2018 at 2:01
  • I bet Ubuntu MATE is also using hostapd, just with a different configuration, and possibly different wifi drivers. So in your place, and to learn something, I'd closely look at what Ubuntu MATE is doing differently. "I'll just install different 'OS' (rather, distros) until one will work" is hit or miss, because all distros are using more or less the same software, just configured a bit differently.
    – dirkt
    Nov 18, 2018 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .