[HOWTO] Wifi hotspot w/ Network Manager

Moderators: mdrjr, odroid, meveric

[HOWTO] Wifi hotspot w/ Network Manager

Unread postby knight » Mon Jan 16, 2017 12:20 am

There are other guides in this forum describing how to setup a Wifi hotspot with Network Manager disabled.
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


In my case, my wifi device was wlan0, so I entered the following:
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


With these steps, everything is set for you:
- 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.
User avatar
knight
 
Posts: 10
Joined: Tue Dec 20, 2016 3:48 am
languages_spoken: english
ODROIDs: xu4

Re: [HOWTO] Wifi hotspot w/ Network Manager

Unread postby odroid » Mon Jan 16, 2017 9:04 am

Thank you for the nice instruction.

We also had some issues in the recent Ubuntu updates and we should edit "/etc/dnsmasq.conf" file to fix the issues.
http://odroid.com/dokuwiki/doku.php?id= ... cess_point
User avatar
odroid
Site Admin
 
Posts: 28257
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: [HOWTO] Wifi hotspot w/ Network Manager

Unread postby m1s3rys1gn4l » Fri May 05, 2017 6:44 am

everythings worked fine but no internet :/
m1s3rys1gn4l
 
Posts: 1
Joined: Fri May 05, 2017 6:43 am
languages_spoken: english


Return to Ubuntu (All Linux'es)

Who is online

Users browsing this forum: No registered users and 1 guest