[HOWTO] Wifi hotspot w/ Network Manager

Post Reply
knight
Posts: 14
Joined: Tue Dec 20, 2016 3:48 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

[HOWTO] Wifi hotspot w/ Network Manager

Post by knight »

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
odroid
Site Admin
Posts: 41084
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3194 times
Been thanked: 1753 times
Contact:

Re: [HOWTO] Wifi hotspot w/ Network Manager

Post by odroid »

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

m1s3rys1gn4l
Posts: 1
Joined: Fri May 05, 2017 6:43 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Wifi hotspot w/ Network Manager

Post by m1s3rys1gn4l »

everythings worked fine but no internet :/

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 2 guests