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



## grahamperrin@ (Jul 3, 2021)

Someone looked at source code and suggested that NOAUTO might be deprecated.

Thoughts?

From *rc.conf(5)* <https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=FreeBSD+13.0-RELEASE>:



> If the ifconfig_⟨interface⟩ contains the keyword “NOAUTO” then the interface will not be configured at boot or by /etc/pccard_ether when network_interfaces is set to “AUTO”.


----------



## Fuzzbox (Jul 3, 2021)

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.


----------



## grahamperrin@ (Jul 3, 2021)

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.


----------



## grahamperrin@ (Jul 3, 2021)

… _sometimes_, I can effectively end the unwanted connection to an open network:

`service netif restart wlan0`
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.


----------



## Deleted member 30996 (Jul 3, 2021)

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.


----------



## grahamperrin@ (Jul 3, 2021)

Thanks,



Trihexagonal said:


> Your wlan0 needs to be in promiscuous mode



It's not. I mean, I never used the `promisc` parameter.

Where there's promiscuous behaviour when the interface is brought up (without the parameter), is this a bug?


----------



## Fuzzbox (Jul 3, 2021)

grahamperrin said:


> – 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
}`


----------



## grahamperrin@ (Jul 3, 2021)

Thanks, those lines are commented out.


----------



## Fuzzbox (Jul 3, 2021)

grahamperrin said:


> Thanks, those lines are commented out.


There are now, or they were already ?


----------



## grahamperrin@ (Jul 3, 2021)

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):


```
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".


----------



## Fuzzbox (Jul 3, 2021)

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


----------



## grahamperrin@ (Jul 3, 2021)

Thanks. Let's see what happens. 

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


----------

