Date : 28 Apr, 2025


Hostapd

attachments/Pasted image 20250428141141.png|750

Explaination of the hostapd.conf file :

  1. interface : specifies which interface we are broadcasting on. (wlan0)
  2. driver : this specifies the wifi standard we are going to use (nl80211)
  3. ssid : name of the wifi
  4. channel : the channel on which our wifi will be broadcasted
  5. hw_mode : the frequency range of our adapter (g = 2.4GHz)
  6. macaddr_acl : (acl = Access control list)
    • 0 : Allow all (any mac addr can join the network)
    • 1 : Use only white list (Only allow mac addresses in the list)
    • 2 : Use only black list (Do not allow mac addresses in the list)
  7. auth_algs : (Authentication algorithms)
    • 1 : Open network (wifi without password)
    • 2 : Secure network
    • 3 : Mix of both

attachments/Pasted image 20250428142221.png|750

Info

Tools:

  • Hostapd
  • airbase-ng (another tool under aircrack-ng suite -> alternative for hostapd)
  • dnsmasq (that will help us in creating DHCP configuration for our access point)

dnsmasq :

nano dnsmasq.conf

attachments/Pasted image 20250430073241.png|750
Explaination :

  1. dhcp-range : this range can join out network
  2. dhcp-option
    • 3 : configure gateway
    • 6 : configure DNS (we can also keep 8.8.8.8 -> google)

attachments/Pasted image 20250428153051.png|750
attachments/Pasted image 20250428153108.png|750

Note

  • When we launch hostapd.conf along with dnsmasq.conf , hostapd launches the access point while dnsmasq will provide DHCP service.
  • With this all the mac addresses or all the devices that are connected to the network or AP can get a dynamic ip.