Configuring Centos 7 / RHEL as an Infrastructure Access Point WAP

Last Updated on

With the right hardware, it can be possible (and effective) to run your wifi NIC as an infrastructure access point.  This is entirely dependent on if your NIC card supports this mode – most business oriented machines are equipped with wireless lan cards that support this mode.  Although this is kind of “neat,”  it’s been my experience that this is by no means a replacement for a physical access point, mainly due to the strength of the signal it puts out.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@nuuk ~]# iw list
Wiphy phy0
max # scan SSIDs: 20
max scan IEs length: 195 bytes
max # sched scan SSIDs: 0
max # match sets: 0
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports RSN-IBSS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* 00-0f-ac:10
* GCMP (00-0f-ac:8)
* 00-0f-ac:9
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
1
yum install hostapd dhcp

vi /etc/hostapd/hostapd.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
driver=nl80211

wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

wpa_passphrase=yourpassword
interface=wlp01
bridge=br-AP
hw_mode=g
channel=6
ssid=CentOSAir

interface => on which interface that setup this wireless access point
bridge => a virtual “type => bridge” interface that manage the IP address space for the hosting access point
ssid => the name that client see as your wireless AP

1
nmcli con add con-name br-AP type bridge ifname br-AP autoconnect yes stp no ip4 192.168.10.1/24

DHCP Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
option domain-name-servers 192.168.5.49;
default-lease-time 600;
max-lease-time 7200;
#
# this DHCP server to be declared valid
authoritative;
#
# specify network address and subnet mask
subnet 192.168.10.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.10.200 192.168.10.220;
option broadcast-address 192.168.10.255;
option domain-name-servers 192.168.10.1;
option domain-name "example.org";
option routers 192.168.10.1;
}
1
rfkill unblock wlan
1
systemctl start hostapd

Your system should now be running a basic infrastructure access point.

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply