1 1.2 andvar # $NetBSD: hostapd.conf,v 1.2 2025/01/07 18:27:26 andvar Exp $ 2 1.1 rpaulo # 3 1.1 rpaulo # hostapd example configuration file (adapted for NetBSD) 4 1.1 rpaulo # 5 1.1 rpaulo # Empty lines and lines starting with # are ignored 6 1.1 rpaulo 7 1.1 rpaulo # Interface name. Should be set in ``hostap'' mode. 8 1.1 rpaulo interface=if0 9 1.1 rpaulo 10 1.1 rpaulo # hostapd event logger configuration 11 1.1 rpaulo # 12 1.1 rpaulo # Two output method: syslog and stdout (only usable if not forking to 13 1.1 rpaulo # background). 14 1.1 rpaulo # 15 1.1 rpaulo # Module bitfield (ORed bitfield of modules that will be logged; -1 = all 16 1.1 rpaulo # modules): 17 1.1 rpaulo # bit 0 (1) = IEEE 802.11 18 1.1 rpaulo # bit 1 (2) = IEEE 802.1X 19 1.1 rpaulo # bit 2 (4) = RADIUS 20 1.1 rpaulo # bit 3 (8) = WPA 21 1.1 rpaulo # bit 4 (16) = driver interface 22 1.1 rpaulo # bit 5 (32) = IAPP 23 1.1 rpaulo # 24 1.1 rpaulo # Levels (minimum value for logged events): 25 1.1 rpaulo # 0 = verbose debugging 26 1.1 rpaulo # 1 = debugging 27 1.1 rpaulo # 2 = informational messages 28 1.1 rpaulo # 3 = notification 29 1.1 rpaulo # 4 = warning 30 1.1 rpaulo # 31 1.1 rpaulo logger_syslog=-1 32 1.1 rpaulo logger_syslog_level=2 33 1.1 rpaulo logger_stdout=-1 34 1.1 rpaulo logger_stdout_level=2 35 1.1 rpaulo 36 1.1 rpaulo # Debugging: 0 = no, 1 = minimal, 2 = verbose, 3 = msg dumps, 4 = excessive 37 1.1 rpaulo debug=0 38 1.1 rpaulo 39 1.1 rpaulo # Dump file for state information (on SIGUSR1) 40 1.1 rpaulo dump_file=/tmp/hostapd.dump 41 1.1 rpaulo 42 1.1 rpaulo # Interface for separate control program. If this is specified, hostapd 43 1.1 rpaulo # will create this directory and a UNIX domain socket for listening to requests 44 1.1 rpaulo # from external programs (CLI/GUI, etc.) for status information and 45 1.1 rpaulo # configuration. The socket file will be named based on the interface name, so 46 1.1 rpaulo # multiple hostapd processes/interfaces can be run at the same time if more 47 1.1 rpaulo # than one interface is used. 48 1.1 rpaulo # /var/run/hostapd is the recommended directory for sockets and by default, 49 1.1 rpaulo # hostapd_cli will use it when trying to connect with hostapd. 50 1.1 rpaulo ctrl_interface=/var/run/hostapd 51 1.1 rpaulo 52 1.1 rpaulo # Access control for the control interface can be configured by setting the 53 1.1 rpaulo # directory to allow only members of a group to use sockets. This way, it is 54 1.1 rpaulo # possible to run hostapd as root (since it needs to change network 55 1.1 rpaulo # configuration and open raw sockets) and still allow GUI/CLI components to be 56 1.1 rpaulo # run as non-root users. However, since the control interface can be used to 57 1.1 rpaulo # change the network configuration, this access needs to be protected in many 58 1.1 rpaulo # cases. By default, hostapd is configured to use gid 0 (root). If you 59 1.2 andvar # want to allow non-root users to use the control interface, add a new group 60 1.1 rpaulo # and change this value to match with that group. Add users that should have 61 1.1 rpaulo # control interface access to this group. 62 1.1 rpaulo # 63 1.1 rpaulo # This variable can be a group name or gid. 64 1.1 rpaulo ctrl_interface_group=wheel 65 1.1 rpaulo 66 1.1 rpaulo 67 1.1 rpaulo ##### IEEE 802.11 related configuration ####################################### 68 1.1 rpaulo 69 1.1 rpaulo # SSID to be used in IEEE 802.11 management frames 70 1.1 rpaulo ssid=NetBSD 71 1.1 rpaulo 72 1.1 rpaulo # Station MAC address -based authentication 73 1.1 rpaulo # 0 = accept unless in deny list 74 1.1 rpaulo # 1 = deny unless in accept list 75 1.1 rpaulo # 2 = use external RADIUS server (accept/deny lists are searched first) 76 1.1 rpaulo macaddr_acl=0 77 1.1 rpaulo 78 1.1 rpaulo # Accept/deny lists are read from separate files (containing list of 79 1.1 rpaulo # MAC addresses, one per line). Use absolute path name to make sure that the 80 1.1 rpaulo # files can be read on SIGHUP configuration reloads. 81 1.1 rpaulo #accept_mac_file=/etc/hostapd.accept 82 1.1 rpaulo #deny_mac_file=/etc/hostapd.deny 83 1.1 rpaulo 84 1.1 rpaulo # IEEE 802.11 specifies two authentication algorithms. hostapd can be 85 1.1 rpaulo # configured to allow both of these or only one. Open system authentication 86 1.1 rpaulo # should be used with IEEE 802.1X. 87 1.1 rpaulo # Bit fields of allowed authentication algorithms: 88 1.1 rpaulo # bit 0 = Open System Authentication 89 1.1 rpaulo # bit 1 = Shared Key Authentication (requires WEP) 90 1.1 rpaulo auth_algs=3 91 1.1 rpaulo 92 1.1 rpaulo # Associate as a station to another AP while still acting as an AP on the same 93 1.1 rpaulo # channel. 94 1.1 rpaulo #assoc_ap_addr=00:12:34:56:78:9a 95 1.1 rpaulo 96 1.1 rpaulo 97 1.1 rpaulo ##### IEEE 802.1X-2004 related configuration ################################## 98 1.1 rpaulo 99 1.1 rpaulo # Require IEEE 802.1X authorization 100 1.1 rpaulo #ieee8021x=1 101 1.1 rpaulo 102 1.1 rpaulo # Optional displayable message sent with EAP Request-Identity. The first \0 103 1.1 rpaulo # in this string will be converted to ASCII-0 (nul). This can be used to 104 1.1 rpaulo # separate network info (comma separated list of attribute=value pairs); see, 105 1.1 rpaulo # e.g., draft-adrangi-eap-network-discovery-07.txt. 106 1.1 rpaulo #eap_message=hello 107 1.1 rpaulo #eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com 108 1.1 rpaulo 109 1.1 rpaulo # WEP rekeying (disabled if key lengths are not set or are set to 0) 110 1.1 rpaulo # Key lengths for default/broadcast and individual/unicast keys: 111 1.1 rpaulo # 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits) 112 1.1 rpaulo # 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits) 113 1.1 rpaulo #wep_key_len_broadcast=5 114 1.1 rpaulo #wep_key_len_unicast=5 115 1.1 rpaulo # Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once) 116 1.1 rpaulo #wep_rekey_period=300 117 1.1 rpaulo 118 1.1 rpaulo # EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if 119 1.1 rpaulo # only broadcast keys are used) 120 1.1 rpaulo #eapol_key_index_workaround=0 121 1.1 rpaulo 122 1.1 rpaulo # EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable 123 1.1 rpaulo # reauthentication). 124 1.1 rpaulo #eap_reauth_period=3600 125 1.1 rpaulo 126 1.1 rpaulo # Use PAE group address (01:80:c2:00:00:03) instead of individual target 127 1.1 rpaulo # address when sending EAPOL frames with driver=wired. This is the most common 128 1.1 rpaulo # mechanism used in wired authentication, but it also requires that the port 129 1.1 rpaulo # is only used by one station. 130 1.1 rpaulo #use_pae_group_addr=1 131 1.1 rpaulo 132 1.1 rpaulo ##### Integrated EAP server ################################################### 133 1.1 rpaulo 134 1.1 rpaulo # Optionally, hostapd can be configured to use an integrated EAP server 135 1.1 rpaulo # to process EAP authentication locally without need for an external RADIUS 136 1.1 rpaulo # server. This functionality can be used both as a local authentication server 137 1.1 rpaulo # for IEEE 802.1X/EAPOL and as a RADIUS server for other devices. 138 1.1 rpaulo 139 1.1 rpaulo # Use integrated EAP server instead of external RADIUS authentication 140 1.1 rpaulo # server. This is also needed if hostapd is configured to act as a RADIUS 141 1.1 rpaulo # authentication server. 142 1.1 rpaulo #eap_server=0 143 1.1 rpaulo 144 1.1 rpaulo # Path for EAP server user database 145 1.1 rpaulo #eap_user_file=/etc/hostapd.eap_user 146 1.1 rpaulo 147 1.1 rpaulo # CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS 148 1.1 rpaulo #ca_cert=/etc/hostapd.ca.pem 149 1.1 rpaulo 150 1.1 rpaulo # Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS 151 1.1 rpaulo #server_cert=/etc/hostapd.server.pem 152 1.1 rpaulo 153 1.1 rpaulo # Private key matching with the server certificate for EAP-TLS/PEAP/TTLS 154 1.1 rpaulo # This may point to the same file as server_cert if both certificate and key 155 1.1 rpaulo # are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be 156 1.1 rpaulo # used by commenting out server_cert and specifying the PFX file as the 157 1.1 rpaulo # private_key. 158 1.1 rpaulo #private_key=/etc/hostapd.server.prv 159 1.1 rpaulo 160 1.1 rpaulo # Passphrase for private key 161 1.1 rpaulo #private_key_passwd=secret passphrase 162 1.1 rpaulo 163 1.1 rpaulo # Enable CRL verification. 164 1.1 rpaulo # Note: hostapd does not yet support CRL downloading based on CDP. Thus, a 165 1.1 rpaulo # valid CRL signed by the CA is required to be included in the ca_cert file. 166 1.1 rpaulo # This can be done by using PEM format for CA certificate and CRL and 167 1.1 rpaulo # concatenating these into one file. Whenever CRL changes, hostapd needs to be 168 1.1 rpaulo # restarted to take the new CRL into use. 169 1.1 rpaulo # 0 = do not verify CRLs (default) 170 1.1 rpaulo # 1 = check the CRL of the user certificate 171 1.1 rpaulo # 2 = check all CRLs in the certificate path 172 1.1 rpaulo #check_crl=1 173 1.1 rpaulo 174 1.1 rpaulo # Configuration data for EAP-SIM database/authentication gateway interface. 175 1.1 rpaulo # This is a text string in implementation specific format. The example 176 1.1 rpaulo # implementation in eap_sim_db.c uses this as the file name for the GSM 177 1.1 rpaulo # authentication triplets. 178 1.1 rpaulo #eap_sim_db=/etc/hostapd.sim_db 179 1.1 rpaulo 180 1.1 rpaulo 181 1.1 rpaulo ##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) ####################### 182 1.1 rpaulo 183 1.1 rpaulo # Interface to be used for IAPP broadcast packets 184 1.1 rpaulo #iapp_interface=if1 185 1.1 rpaulo 186 1.1 rpaulo 187 1.1 rpaulo ##### RADIUS client configuration ############################################# 188 1.1 rpaulo # for IEEE 802.1X with external Authentication Server, IEEE 802.11 189 1.1 rpaulo # authentication with external ACL for MAC addresses, and accounting 190 1.1 rpaulo 191 1.1 rpaulo # The own IP address of the access point (used as NAS-IP-Address) 192 1.1 rpaulo #own_ip_addr=127.0.0.1 193 1.1 rpaulo 194 1.1 rpaulo # Optional NAS-Identifier string for RADIUS messages. When used, this should be 195 1.1 rpaulo # a unique to the NAS within the scope of the RADIUS server. For example, a 196 1.1 rpaulo # fully qualified domain name can be used here. 197 1.1 rpaulo #nas_identifier=ap.example.com 198 1.1 rpaulo 199 1.1 rpaulo # RADIUS authentication server 200 1.1 rpaulo #auth_server_addr=127.0.0.1 201 1.1 rpaulo #auth_server_port=1812 202 1.1 rpaulo #auth_server_shared_secret=secret 203 1.1 rpaulo 204 1.1 rpaulo # RADIUS accounting server 205 1.1 rpaulo #acct_server_addr=127.0.0.1 206 1.1 rpaulo #acct_server_port=1813 207 1.1 rpaulo #acct_server_shared_secret=secret 208 1.1 rpaulo 209 1.1 rpaulo # Secondary RADIUS servers; to be used if primary one does not reply to 210 1.1 rpaulo # RADIUS packets. These are optional and there can be more than one secondary 211 1.1 rpaulo # server listed. 212 1.1 rpaulo #auth_server_addr=127.0.0.2 213 1.1 rpaulo #auth_server_port=1812 214 1.1 rpaulo #auth_server_shared_secret=secret2 215 1.1 rpaulo # 216 1.1 rpaulo #acct_server_addr=127.0.0.2 217 1.1 rpaulo #acct_server_port=1813 218 1.1 rpaulo #acct_server_shared_secret=secret2 219 1.1 rpaulo 220 1.1 rpaulo # Retry interval for trying to return to the primary RADIUS server (in 221 1.1 rpaulo # seconds). RADIUS client code will automatically try to use the next server 222 1.1 rpaulo # when the current server is not replying to requests. If this interval is set, 223 1.1 rpaulo # primary server will be retried after configured amount of time even if the 224 1.1 rpaulo # currently used secondary server is still working. 225 1.1 rpaulo #radius_retry_primary_interval=600 226 1.1 rpaulo 227 1.1 rpaulo 228 1.1 rpaulo # Interim accounting update interval 229 1.1 rpaulo # If this is set (larger than 0) and acct_server is configured, hostapd will 230 1.1 rpaulo # send interim accounting updates every N seconds. Note: if set, this overrides 231 1.1 rpaulo # possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this 232 1.1 rpaulo # value should not be configured in hostapd.conf, if RADIUS server is used to 233 1.1 rpaulo # control the interim interval. 234 1.1 rpaulo # This value should not be less 600 (10 minutes) and must not be less than 235 1.1 rpaulo # 60 (1 minute). 236 1.1 rpaulo #radius_acct_interim_interval=600 237 1.1 rpaulo 238 1.1 rpaulo 239 1.1 rpaulo ##### RADIUS authentication server configuration ############################## 240 1.1 rpaulo 241 1.1 rpaulo # hostapd can be used as a RADIUS authentication server for other hosts. This 242 1.1 rpaulo # requires that the integrated EAP authenticator is also enabled and both 243 1.1 rpaulo # authentication services are sharing the same configuration. 244 1.1 rpaulo 245 1.1 rpaulo # File name of the RADIUS clients configuration for the RADIUS server. If this 246 1.1 rpaulo # commented out, RADIUS server is disabled. 247 1.1 rpaulo #radius_server_clients=/etc/hostapd.radius_clients 248 1.1 rpaulo 249 1.1 rpaulo # The UDP port number for the RADIUS authentication server 250 1.1 rpaulo #radius_server_auth_port=1812 251 1.1 rpaulo 252 1.1 rpaulo # Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API) 253 1.1 rpaulo #radius_server_ipv6=1 254 1.1 rpaulo 255 1.1 rpaulo 256 1.1 rpaulo ##### WPA/IEEE 802.11i configuration ########################################## 257 1.1 rpaulo 258 1.1 rpaulo # Enable WPA. Setting this variable configures the AP to require WPA (either 259 1.1 rpaulo # WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either 260 1.1 rpaulo # wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK. 261 1.1 rpaulo # For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys), 262 1.1 rpaulo # RADIUS authentication server must be configured, and WPA-EAP must be included 263 1.1 rpaulo # in wpa_key_mgmt. 264 1.1 rpaulo # This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0) 265 1.1 rpaulo # and/or WPA2 (full IEEE 802.11i/RSN): 266 1.1 rpaulo # bit0 = WPA 267 1.1 rpaulo # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) 268 1.1 rpaulo #wpa=1 269 1.1 rpaulo 270 1.1 rpaulo # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit 271 1.1 rpaulo # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase 272 1.1 rpaulo # (8..63 characters) that will be converted to PSK. This conversion uses SSID 273 1.1 rpaulo # so the PSK changes when ASCII passphrase is used and the SSID is changed. 274 1.1 rpaulo # wpa_psk (dot11RSNAConfigPSKValue) 275 1.1 rpaulo # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) 276 1.1 rpaulo #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 277 1.1 rpaulo #wpa_passphrase=secret passphrase 278 1.1 rpaulo 279 1.1 rpaulo # Optionally, WPA PSKs can be read from a separate text file (containing list 280 1.1 rpaulo # of (PSK,MAC address) pairs. This allows more than one PSK to be configured. 281 1.1 rpaulo # Use absolute path name to make sure that the files can be read on SIGHUP 282 1.1 rpaulo # configuration reloads. 283 1.1 rpaulo #wpa_psk_file=/etc/hostapd.wpa_psk 284 1.1 rpaulo 285 1.1 rpaulo # Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The 286 1.1 rpaulo # entries are separated with a space. 287 1.1 rpaulo # (dot11RSNAConfigAuthenticationSuitesTable) 288 1.1 rpaulo #wpa_key_mgmt=WPA-PSK WPA-EAP 289 1.1 rpaulo 290 1.1 rpaulo # Set of accepted cipher suites (encryption algorithms) for pairwise keys 291 1.1 rpaulo # (unicast packets). This is a space separated list of algorithms: 292 1.1 rpaulo # CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] 293 1.1 rpaulo # TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] 294 1.1 rpaulo # Group cipher suite (encryption algorithm for broadcast and multicast frames) 295 1.1 rpaulo # is automatically selected based on this configuration. If only CCMP is 296 1.1 rpaulo # allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise, 297 1.1 rpaulo # TKIP will be used as the group cipher. 298 1.1 rpaulo # (dot11RSNAConfigPairwiseCiphersTable) 299 1.1 rpaulo #wpa_pairwise=TKIP CCMP 300 1.1 rpaulo 301 1.1 rpaulo # Time interval for rekeying GTK (broadcast/multicast encryption keys) in 302 1.1 rpaulo # seconds. (dot11RSNAConfigGroupRekeyTime) 303 1.1 rpaulo #wpa_group_rekey=600 304 1.1 rpaulo 305 1.1 rpaulo # Rekey GTK when any STA that possesses the current GTK is leaving the BSS. 306 1.1 rpaulo # (dot11RSNAConfigGroupRekeyStrict) 307 1.1 rpaulo #wpa_strict_rekey=1 308 1.1 rpaulo 309 1.1 rpaulo # Time interval for rekeying GMK (master key used internally to generate GTKs 310 1.1 rpaulo # (in seconds). 311 1.1 rpaulo #wpa_gmk_rekey=86400 312 1.1 rpaulo 313 1.1 rpaulo # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up 314 1.1 rpaulo # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN 315 1.1 rpaulo # authentication and key handshake before actually associating with a new AP. 316 1.1 rpaulo # (dot11RSNAPreauthenticationEnabled) 317 1.1 rpaulo #rsn_preauth=1 318 1.1 rpaulo # 319 1.1 rpaulo # Space separated list of interfaces from which pre-authentication frames are 320 1.1 rpaulo # accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all 321 1.1 rpaulo # interface that are used for connections to other APs. This could include 322 1.1 rpaulo # wired interfaces and WDS links. The normal wireless data interface towards 323 1.1 rpaulo # associated stations (e.g., wlan0) should not be added, since 324 1.1 rpaulo # pre-authentication is only used with APs other than the currently associated 325 1.1 rpaulo # one. 326 1.1 rpaulo #rsn_preauth_interfaces=eth0 327