diff --git a/create_ap b/create_ap index f23d444..99e91e7 100755 --- a/create_ap +++ b/create_ap @@ -1000,6 +1000,9 @@ read_config() { local opt_name opt_val line while read line; do + # Skip comments and blank lines + [[ -z "${line}" || "${line:0:1}" == "#" ]] && continue + # Read switches and their values opt_name="${line%%=*}" opt_val="${line#*=}" diff --git a/create_ap.conf b/create_ap.conf index 9f55f09..2e91af8 100644 --- a/create_ap.conf +++ b/create_ap.conf @@ -1,28 +1,82 @@ -CHANNEL=default +# Configuration file for create_ap (https://github.com/oblique/create_ap) + +########## Access Point Information ########## + +# Name of access point +SSID=MyAccessPoint +# Pre-shared key or passphrase of access point (see USE_PSK option) +PASSPHRASE=12345678 +# Type of key in PASSPHRASE +# - Set to "0" if the content of PASSPHRASE is an 8..63 character long ASCII +# passphrase (i.e. what you type when you connect) +# - Set to "1" if the content of PASSPHRASE is a 256-bit secret in hex format +# (64 hex digits) +USE_PSK=0 +# Set whether the access point should hide its SSID or not +HIDDEN=0 + +########## Sharing Options ########## + +# The network interface where create_ap creates access point +WIFI_IFACE=wlan0 +# The network interface to be shared +INTERNET_IFACE=eth0 +# Method to share the network +# Available options: "nat", "bridge" +SHARE_METHOD=nat +# IP address of the gateway in NAT mode (the subnet is /24) GATEWAY=10.0.0.1 +# Set whether the connected clients can see each other or not +ISOLATE_CLIENTS=0 + +########## Wireless Options ########## + +# The channel number on which the access point is served +# Set to "default" will set channel to 1 in 2.4Ghz band and 36 in 5GHz band +CHANNEL=default +# Wireless frequency (band) +# Available options: "2.4", "5" +FREQ_BAND=2.4 +# Country code (ISO/IEC 3166-1) to set regulatory domain +COUNTRY= +# WPA version +# Available options: "1", "2", "1+2" (or "3") WPA_VERSION=2 -ETC_HOSTS=0 +# Whether IEEE 802.11n (HT) is enabled +IEEE80211N=0 +# Whether IEEE 802.11ac (VHT) is enabled +IEEE80211AC=0 +# HT / VHT capabilities +# For all possible options please look at +# https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf +HT_CAPAB=[HT40+] +VHT_CAPAB= + +########## Network Options ########## + +# DNS server to be pushed by DHCP server +# Set to "gateway" to use the gateway itself DHCP_DNS=gateway +# Set to 1 to disable DNS NO_DNS=0 +# Set to 1 to disable dnsmasq completely (DHCP and DNS) NO_DNSMASQ=0 -HIDDEN=0 +# Whether dnsmasq should use DNS servers provided in /etc/hosts or not +ETC_HOSTS=0 +# Set to 1 to enable MAC address based authentication MAC_FILTER=0 +# Acceptance list for MAC address based authentication MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept -ISOLATE_CLIENTS=0 -SHARE_METHOD=nat -IEEE80211N=0 -IEEE80211AC=0 -HT_CAPAB=[HT40+] -VHT_CAPAB= -DRIVER=nl80211 -NO_VIRT=0 -COUNTRY= -FREQ_BAND=2.4 +# New MAC address for the access point, leave it blank to keep it as-is NEW_MACADDR= + +########## Miscellaneous ########## + +# Specify the driver to use +DRIVER=nl80211 +# Set whether create_ap should run in the background DAEMONIZE=0 +# Set to 1 to disable virtual interface creation +NO_VIRT=0 +# Set to 1 to disable haveged random number generation NO_HAVEGED=0 -WIFI_IFACE=wlan0 -INTERNET_IFACE=eth0 -SSID=MyAccessPoint -PASSPHRASE=12345678 -USE_PSK=0