SliTaz SliTaz Forum

You are not logged in.

#1 2019-12-06 10:14:03

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Add blacklist access-point to network.conf

Is possible to add a blacklist for accesspoint (encryption none) to prevent an auto connection?

In my area vodafone-wifi is open, but not free, and this autoconnection annoyng very very much.

Offline

#2 2019-12-06 12:40:03

HGT
Administrator
From: Germany
Registered: 2016-03-25
Posts: 170

Re: Add blacklist access-point to network.conf

It might help to add an entry like

[c] network=

{

key_mgmt=NONE

priority=-999

}[/c]

in wpa_supplicant.conf

Offline

#3 2019-12-06 16:32:29

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

Have appreciated your answer, but not have succes... seem on conflict with:

# Wildcard match for SSID (plaintext APs only). This example select any

# open AP regardless of its SSID.

network={

    key_mgmt=NONE

}

is connected anyway

my only trics to prevent the connection with open network, is comment the lines above.

Offline

#4 2019-12-06 19:03:05

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

how did you configure your /etc/network.conf

with  WIFI_ESSID="any" ?

I had for every ssid I want to connect an extra .desktop entry in .local/share/applications/

it never happened to me

Offline

#5 2019-12-06 20:04:34

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

@kultex

ciao, una volta mi hai detto che capisci l'italiano, e visto che per me rispondere in inglese non mi riesce bene, ti risponderò nella mia lingua.

Network.conf è configurato e funziona correttamente per la mia rete wifi.

Siccome il mio modem non è di rete fissa sempre acceso , ma è portatile e a batteria con sim card, capita che quando è spento, automaticamente il pc aggancia la rete vodafone-wifi di un probabile vicino...

Nel computer me ne accorgo solamente quando faccio per navigare, che mi compare la pagina di promo della vodafone che mi richiede i dati per un login. O in alternativa il pagamento di una cifra per averli e accedere alla rete.

Questa cosa è molto, ma molto noiosa, e, per evitarla volevo creare una blacklist per impedirne la connessione automatica.

Ho cercato di modificare lo script dove esegue la scansione togliendo dal risultato l'ESSID che non voglio, ma il network.sh attraverso wpa_supplicant.conf continua ad accedere a qualunque rete senza cifratura.... salvo disabilitarne le tre righe come nel post sopra.

https://www.vodafone.it/portal/Privati/Vantaggi-Vodafone/Per-i-gia-Clienti/wifi-community

         Cell 07 - Address:

                    Channel:13

                    Frequency:2.472 GHz (Channel 13)

                    Quality=36/70  Signal level=-74 dBm

                    Encryption key:off

                    ESSID:"Vodafone-WiFi"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

Offline

#6 2019-12-06 21:06:48

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

yes I understand - very starnge - I used on the laptop and still on miniPC (amd-geode) a very early version of 5.0 and it never happened

there have been some modifications in those years - http://hg.slitaz.org/slitaz-boot-scripts/log?rev=network.sh

I quick checked the last version, but,I dont find the error, because it should no this - only if WIFI_ESSID="any"

Sorry, I have nearly no time at the moment

Offline

#7 2019-12-06 21:34:39

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

just an idea - can you restart network.sh when your router is off and post the output?

Offline

#8 2019-12-07 15:22:00

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

second idea

try wicd - I wrote a tutorial some years ago - I dont know, if it is still working like this

http://doc.slitaz.org/en:guides:wicd

Offline

#9 2019-12-07 22:18:12

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

In wpa_cli c'è un'opzione apposta per bannare un mac address (blacklist bssid) ma purtroppo ancora non riesco a farlo funzionare, ne sopratutto ad inserirlo in uno wrapper per il lancio di wpa_supplicant.

Manualmente accetta la blacklist ma non sortisce nessun effetto sulla connessione in corso

wpa_cli -i wlan0 blacklist xx:xx:xx:xx:xx:xx

ok

wpa_cli blacklist

Selected interface 'wlan0'

xx:xx:xx:xx:xx:xx

se riavvio network.sh, o se spengo il mio router, quando automaticamente esegue lo scan si cancella la blacklist

https://w1.fi/wpa_supplicant/devel/blacklist_8c.html

https://superuser.com/questions/472731/wpa-supplicant-blacklist-wireless-networks-by-bssid

Offline

#10 2019-12-07 22:42:20

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

I found something here

http://wicd.sourceforge.net/punbb/viewtopic.php?id=38

Wicd won't connect to anything that isn't set to automatically connect. Some wireless drivers, will, however, connect to a nearby unsecured wireless network at their own will. Wicd can't control that.

I think, this could also explain your problem

Offline

#11 2019-12-08 08:06:41

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

Ti ringrazio, wicd lo avevo testato 5 anni fa, e non mi aveva convinto completamente

http://forum.slitaz.org/topic/wicd

per ora rimango sulla mia idea; modificare lo script in modo che ignori una particolare rete.

Offline

#12 2019-12-09 09:54:44

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

Risolto!

La soluzione è semplicissima, basta aggiungere in wpa_supplicant.conf la riga evidenziata al gruppo di regole che esegue connessione senza crittografia.

Prima è:

# Wildcard match for SSID (plaintext APs only). This example select any

# open AP regardless of its SSID.

network={

    key_mgmt=NONE

}

modificata in:

# Wildcard match for SSID (plaintext APs only). This example select any

# open AP regardless of its SSID.

network={

    key_mgmt=NONE

    bssid_blacklist=xx:xx:xx:xx:xx:xx

}

ovviamente le xx:xx:xx:xx:xx:xx

sono il mac address dell'access point da bannare (bssid)

per tutto il resto mantiene la possibilità di connettersi ad altre reti open

Offline

#13 2019-12-09 12:42:31

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Add blacklist access-point to network.conf

perfect - maybe you can write it to guides?

http://doc.slitaz.org/en:guides:start

https://www.deepl.com/translator I think is the best translator.....

Offline

#14 2019-12-09 15:57:18

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Add blacklist access-point to network.conf

Lusingato ma non ho mai scritto al di fuori del comune forum. Oltre alla difficoltà della traduzione, non saprei nemmeno da che parte iniziare.

Ho postato la mia soluzione e potete farne ciò che credete senza chiedermelo. smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 8 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]