# How to blacklist APs using wpa_supplicant

## hoputa

I'm using wpa_supplicant to connect to a wireless router with WPA2 encryption. It works like a charm. 

My issue is that I have a neighbor with an open wireless and I want to actively tell wpa_supplicant to NOT associate to that AP. I was looking for something like the 'blacklist_aps' setting in /etc/conf.d/net when using iwconfig.

Does anybody know if this is possible?

----------

## downer

maybe you can use the priority keyword to set the priority of the open AP lower than the one you want to use?

```
network={ 

        key_mgmt=NONE 

        priority=-9999999 

} 
```

//D

----------

## hoputa

That's the approach I use right now but it's not what I'm after. Consider these situations: 

 - my AP is off

 - I'm somewhere where my AP's signal is very weak and it's not detected during connection.

In both these situations your proposed solution will have me happily connected to my neighbor's open AP. What I would like is that the association fails and I realize that something's not right. This is really easy to do with the iwconfig module by using the 'blacklist_aps' setting.

 It seems wpa_supplicant doesn't have the funtionality I'm looking for. Maybe I should ask for a feature request.

----------

## UberLord

wpa_supplicant doesn't support a blacklist as such.

However, it does have a whitelist, so simply specify the ssid in all  network blocks.

----------

## hoputa

I decided to go ahead and submit a feature request to wpa_supplicant.

http://w1.fi/bugz/show_bug.cgi?id=254

----------

