How to setup hostapd on Fedora (or any other Red Hat based systems)
Kees de Jong
keesdejong+fedora
Tue Feb 17 01:09:38 PST 2015
I used to run hostapd on a Debian system, which worked flawless. I now
use Fedora and that seems to be a total different deal.
Below was my Debian configuration. I had two access points on the same
wireless interface (virtual interface). I can't seem to get this to
work on Fedora...
# General
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
# Private
interface=wlan0
bssid=b8:a3:86:73:60:01
ssid=sovereign_20
ignore_broadcast_ssid=1
driver=nl80211
country_code=NL
hw_mode=g
channel=11
preamble=1
wpa=2
wpa_ptk_rekey=600
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_psk_file=/etc/hostapd/20.wpa_psk
auth_algs=1
macaddr_acl=1
ap_isolate=1
accept_mac_file=/etc/hostapd/hostapd.accept
# Public
bss=wlan1
bssid=b8:a3:86:73:60:02
ssid=sovereign_30
ignore_broadcast_ssid=1
driver=nl80211
country_code=NL
hw_mode=g
channel=11
preamble=1
wpa=2
wpa_ptk_rekey=600
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_psk_file=/etc/hostapd/30.wpa_psk
auth_algs=1
macaddr_acl=0
ap_isolate=1
On Debian this was my network configuration in /etc/networking/interfaces:
# Private wireless interface
auto wlan0
iface wlan0 inet static
address 10.20.0.1
network 10.20.0.0
broadcast 10.20.0.255
netmask 255.255.255.0
hostap /etc/hostapd.conf
# Public wireless interface
auto wlan1
iface wlan1 inet static
address 10.30.0.1
network 10.30.0.0
broadcast 10.30.0.255
netmask 255.255.255.0
hostap /etc/hostapd.conf
I guess the biggest show stopper is the way Fedora manages it's
networks. For Red Hat systems I found the most creative ways to setup
hostapd. Mostly with scripts that configure the wireless interface
(managed mode and IP address) and then the script loads the
configuration into hostapd. Some scripts even do the iptables
configurations. I can't believe that this is the way to do it...
NetworkManager on Fedora doesn't seem to be able to configure wireless
devices. I came accross this configuration though:
TYPE=Wireless
DEVICE=wlan0
BOOTPROTO=dhcp
BROADCAST=192.168.0.255
HWADDR=48:02:2a:91:63:90
NETMASK=255.255.255.0
ONBOOT=no
ONHOTPLUG=yes
PEERDNS=no
USERCTL=yes
IPV6INIT=no
ESSID=minimallinux
CHANNEL=6
MODE=Managed
RATE=150Mb/s
Which sorta looka okay. But also in that howto they refer to a start
up script for all the configurations:
http://minimallinux.blogspot.nl/2012/06/centos-6-wireless.html
Here is one for Arch, same ridicules solution (script):
https://wiki.archlinux.org/index.php/Software_access_point
So my question comes down to this. Is hostapd only made with Debian in
mind? Because it only seems to have a clean setup on that system.
If it isn't meant to be exclusively on Debian, then why are all
non-Debian systems setup with these scripts? How can I setup hostapd
without all these script solutions?
More information about the Hostap
mailing list