256957 – Wi-Fi: rc.conf(5) NOAUTO, ifconfig(8) up and unwanted WLAN connections to open networks

As far as I understand, what seems to be deprecated is setting network_interfaces to anything other than the default AUTO.
But using the ifconfig_(interface) NOAUTO option is the way to block the given network interface.
 
Thanks.

With either of these lines in /etc/rc.conf:

ifconfig_wlan0="WPA SYNCDHCP NOAUTO"

ifconfig_wlan0="WPA DHCP NOAUTO"

– there are unwanted (troublesome) connections to open networks – passing buses, and so on – in response to:

ifconfig wlan0 up

Bug?

From ifconfig(8) <https://www.freebsd.org/cgi/man.cgi?query=ifconfig&sektion=8&manpath=FreeBSD+13.0-RELEASE>, for the up parameter:

Mark an interface “up”. This may be used to enable an interface after an “ifconfig down”. It happens automatically when setting the first address on an interface. If the interface was reset when previously marked down, the hardware will be re-initialized.
 
sometimes, I can effectively end the unwanted connection to an open network:
  1. service netif restart wlan0
  2. wait for everything (if I'm lucky) to begin working with what's specified in /etc/wpa_supplicant.conf
– however it seems wrong for FreeBSD to associate itself with unwanted (non-specified) open networks when an interface is simply brought up.
 
Your wlan0 needs to be in promiscuous mode to be picking up traffic. That's how I see what wifi hotspots are around me or go past me on my Kali box. A thing of convenience to an Agent of Chaos recently forced out of retirement

In a 48 hour run I logged 350 targets and 155 clients, the terminology of wifite, but I live in the downtown area and most of those transient.
 
– there are unwanted (troublesome) connections to open networks – passing buses, and so on – in response to:
I think this has nothing to do with the NOAUTO option.
I had my wireless trying to connect to open networks too. I suspect it's related to the default entry in wpa_supplicant.conf ? :
network={ priority=0 key_mgmt=NONE }
 
Commented out before beginning this topic.

At the FreeBSD 13.0-RELEASE-p3 machine that I'm currently testing, /etc/wpa_supplicant.conf comprises these lines (psk obscured):

Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
    ssid="piano"
    scan_ssid=0
    psk="…"
    priority=5
}
# network={
#     priority=0
#     key_mgmt=NONE
# }

From wpa_supplicant.conf(5) <https://www.freebsd.org/cgi/man.cgi?query=wpa_supplicant.conf&sektion=5&manpath=FreeBSD+13.0-RELEASE>, for the key_mgmt parameter:

List of acceptable key management protocols; one or more of: WPA-PSK (WPA pre-shared key), WPA-EAP (WPA using EAP authentication), IEEE8021X (IEEE 802.1x using EAP authentication and, optionally, dynamically generated WEP keys), NONE (plaintext or static WEP keys). If not set this defaults to "WPA-PSK WPA-EAP".
 
To sum up, when you prevent the wireless interface to start at boot time, but bring it up afterward, it connects to open networks (less often when using netif instead of ifconfig), even with a well configured rc.conf and wpa_supplicant.conf, correct ?
I have no idea. You have proved to be a good bug chaser, so, I would say it may be a bug :)

Edit : typo
 
Back
Top