Linux command
create_ap 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
create_ap [wlan0] [eth0] [access_point_ssid]
Example
create_ap [wlan0] [eth0] [access_point_ssid] [passphrase]
Example
create_ap -n [wlan0] [access_point_ssid] [passphrase]
Example
create_ap -m bridge [wlan0] [eth0] [access_point_ssid] [passphrase]
Example
create_ap -m bridge [wlan0] [br0] [access_point_ssid] [passphrase]
Example
create_ap [wlan0] [wlan0] [access_point_ssid] [passphrase]
Example
create_ap --driver [wifi_adapter] [wlan0] [eth0] [access_point_ssid] [passphrase]
说明
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.
参数
- -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
FAQ
What is the create_ap command used for?
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.
How do I run a basic create_ap example?
Run `create_ap [wlan0] [eth0] [access_point_ssid]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n do in create_ap?
Don't share Internet (isolated AP)