Open krackers opened 2 years ago
Actually seems like any modifications made to hostap conf are somehow undone in a few hours even without a reboot. Looks like something is restoring the original hostap config, and as a consequence ifconfig
shows the old (manually configured) ssid no longer having access to the underlying hardware (which has been reclaimed by hostap).
I couldn't find any cron job that controls this, nor could I find how hostapd
launch in an y of the rc files. So I assume it ends up being launched by one of the commands in crunchprog, maybe ACPd?
Also of note is that the airport also has standard broadcom wl
so you can control the radios at a lower level.
Since I didn't find anything online about this, I thought I'd leave some quick notes on how to do this. (It wasn't obvious to me at first, although it's possible that this is common sense for those with bsd networking experience)
ifconfig
works as you'd expect. Be aware thatifconfig
has some AP specific suboptions that you may not have used before, e.g.ifconfig wlan0 list sta
The airports use hostapd to handle the access points creation. At boot there's an rc script that starts
hostapd
(see the invocation inps auxww
). The corresponding files are in/etc/
, e.g.hostap_wlan1.conf
.Let's say you want to change the ssid currently broadcast on wlan2. You'd do
ifconfig wlan2 down
followed by killing the corresponding hostapd process (check output ofps
). Then change the ssid inhostap_wlan2.conf
(since there's novi
, you can usesed
to rewrite). Update the wpa psk inhostap_wlan2.wpa_psk
as well (same as you would for wpa supplicant). Then relaunch hostap with the same invocation you saw before (add anohup
so it's not killed when you logout), and your changes should be live.The specific version of
hostapd
used seems to be non-standard since I couldn't find the specific config options documented anywhere, but most should be self explanatory. You can download and disassemble thehostapd
binary to see a list of all possible config options.