Giter Site home page Giter Site logo

[Feature request] Blacklist access points. about netctl HOT 10 OPEN

 avatar commented on August 28, 2024
[Feature request] Blacklist access points.

from netctl.

Comments (10)

 avatar commented on August 28, 2024

Anyone? PLEASE HELP!

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

Questions have a better chance of getting an answer in the Arch forums, but let me try to help you.
So you have a profile for Eduroam and some networks with an Eduroam SSID don't work, correct? One thing I can think of is that you list those APs that do work for you and use their BSSIDs in profiles for them. You could keep a general Eduroam profile around and add an ExcludeAuto=yes line to it.

from netctl.

 avatar commented on August 28, 2024

Thanks, I will try and ask the question there.

The problem with "whitelisting" the BSSIDs which work is, every time you go to a new place (or probably even another part of the same building) you will have to manually add more BSSIDs to the list. And then have to maintain and prune the list as it grows over time.

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

Let me know when you find a solution! I just found that wpa_supplicant has the ability to blacklist BSSIDs and your use case is a good reason to support such a blacklist. I would be interested in adding support to netctl(-auto). Any suggestions as to how this functionality should be exposed are welcome!

Note: it is currently possible to start netctl-auto and then use wpa_cli -i <interface> blacklist <BSSID> to add BSSIDs to the blacklist. You could put a few of these statements in a script:

#! /bin/bash

for bssid in \
  <BSSID> \
  <BSSID> \
  ... \
  <BSSID> \
; do
    wpa_cli ${1:+-i $1} blacklist $bssid
done

and run this script each time after starting netctl_auto (supply the interface as an argument to the script).

from netctl.

 avatar commented on August 28, 2024

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

Have you tried including something like

Security=wpa-configsection
WPAConfigSection=(
    'ssid="eduroam"'
    'key_mgmt=WPA-EAP'
    'eap=PEAP'
    'pairwise=TKIP CCMP'
    'anonymous_identity="anonymous"'
    'identity="<USERNAME>"'
    'password="<PASSWORD>"'
    'bssid_blacklist=<BSSID> <BSSID> ... <BSSID>'
)

in your profile?

from netctl.

 avatar commented on August 28, 2024

Wow, thanks, according to $ strings '/usr/bin/wpa_supplicant' |grep -i bssid_blacklist it seems to be there. Strange that neither manpages nor my Internet searches had shown it to me. I will definitely give it a try today!

The external-script solution seems to work more or less, and it can be used on the systems whose wpa_supplicant is old and does not include this feature yet, and I improved the script to accept input with comments:
`
#!/bin/sh --

sed -E -e'/^#/d' -e's/#.*//' ${@:?} |while read bssid; do
wpa_cli blacklist "${bssid}"
done
`

from netctl.

 avatar commented on August 28, 2024

The output of $ wpa_cli blacklist is only Selected interface 'wlp2s0' meaning it does not work somehow?..

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

It looks like the blacklist you set in the config section does not show up in the output of wpa_cli blacklist. This would be a bug in wpa_cli and (if so) should be reported upstream.

from netctl.

 avatar commented on August 28, 2024

The setting does have effect, that means wpa_cli is indeed bugged.

from netctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.