I have found it much simpler to go with Network Manager, rather than disable it.
After populating the parameters below with values that suite you, perform the following as root or sudo:
Code: Select all
apt-get install dnsmasq-base network-manager
nmcli c add type wifi ifname WLAN_DEVICE_NAME con-name ARBITRARY_NAME autoconnect no ssid YOUR_SSID
nmcli connection modify ARBITRARY_NAME 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection modify ARBITRARY_NAME wifi-sec.key-mgmt wpa-psk
nmcli connection modify ARBITRARY_NAME wifi-sec.psk "YOUR_WIFI_PASSWORD"
nmcli connection up ARBITRARY_NAME
Code: Select all
apt-get install dnsmasq-base network-manager
nmcli c add type wifi ifname wlan0 con-name ap-wlan0 autoconnect no ssid zmserver
nmcli connection modify ap-wlan0 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection modify ap-wlan0 wifi-sec.key-mgmt wpa-psk
nmcli connection modify ap-wlan0 wifi-sec.psk "password"
nmcli connection up ap-wlan0
- wifi gets configured for 10.42.0.0/24 network
- dhcp assigned addresses from the pool
- dns forwarding is enabled
- traffic routes from the wifi network to the wired
I have used these same steps on my Odriod, a Raspberry Pi, and an OrangePi, using either Armbian (a.k.a. Debian 8) or Fedora. Wifi devices were all using common Realtek chipsets.
There is one potential "gotchya". It is important you only install dnsmasq-base. Do NOT install the full dnsmasq package. The full dnsmasq package will start dnsmasq as a service, and when you attempt to enable the access point with nmcli, the access point will not start because the dns port is already in use by the dnsmasq service.