LinuxCommandLibrary

create_ap

WiFi access point creation tool

TLDR

Create an open network without passphrase

$ create_ap [wlan0] [eth0] [access_point_ssid]
copy
Create AP with WPA/WPA2 passphrase
$ create_ap [wlan0] [eth0] [access_point_ssid] [passphrase]
copy
Create AP without Internet sharing
$ create_ap -n [wlan0] [access_point_ssid] [passphrase]
copy
Create bridged network with Internet sharing
$ create_ap -m bridge [wlan0] [eth0] [access_point_ssid] [passphrase]
copy
Use pre-configured bridge interface
$ create_ap -m bridge [wlan0] [br0] [access_point_ssid] [passphrase]
copy
Share Internet from same WiFi interface
$ create_ap [wlan0] [wlan0] [access_point_ssid] [passphrase]
copy
Use different WiFi driver
$ create_ap --driver [wifi_adapter] [wlan0] [eth0] [access_point_ssid] [passphrase]
copy

SYNOPSIS

create_ap [options] wifiinterface [internetinterface] [ssid] [passphrase]

DESCRIPTION

create_ap creates a WiFi access point using hostapd. It handles the complex configuration of hostapd, dnsmasq, iptables, and network interfaces automatically, abstracting away the tedious manual setup typically required.
The tool configures hostapd to create the access point, sets up dnsmasq for DHCP and DNS services, establishes NAT routing through iptables (or bridging if specified), and manages network interface configuration. It supports NAT mode (default) for sharing Internet connections, bridge mode for transparent network bridging, and isolated mode without Internet sharing.

PARAMETERS

-n

Don't share Internet (isolated AP)
-m mode
Mode: nat (default), bridge, none
--driver driver
WiFi driver (nl80211, rtl871xdrv, etc.)
-c channel
WiFi channel
--hidden
Hide SSID
--ieee80211n
Enable 802.11n
--ieee80211ac
Enable 802.11ac

CAVEATS

Requires hostapd and dnsmasq. WiFi adapter must support AP mode. Some adapters may not work due to driver limitations. Requires root privileges.

SEE ALSO

hostapd(8), dnsmasq(8), iw(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community