Ubuntu 24.04 manages Wi-Fi hotspots through NetworkManager’s native GUI or CLI, not manual hostapd scripts. The most common failure occurs because the system fails to assign an IP address via DHCP to connected clients. This guide resolves connectivity issues by verifying NetworkManager service status, checking interface capabilities, and ensuring proper DHCP configuration within the hotspot profile.
Verifying NetworkManager Service Status
Before troubleshooting specific settings, ensure that the underlying network management daemon is active and functioning correctly. Ubuntu relies entirely onNetworkManager for managing wireless interfaces, including the creation of virtual access points. If this service is stopped or masked, no amount of configuration tweaking will allow a hotspot to function.
Open your terminal and check the status of the service using the following command:
systemctl status NetworkManager
If the service is inactive, start it immediately:
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
A running service ensures that background processes can handle connection profiles and DHCP leases. If you recently updated your kernel to version 6+, verify that no firewall rules are blocking local traffic. While less common, strict ufw policies can sometimes interfere with NAT routing required for hotspots. Check your firewall status with:
sudo ufw status
If enabled, ensure it allows local traffic between the wired and wireless interfaces. For most users, leaving the firewall default is sufficient, but explicit rules may be needed if you have custom configurations.
Checking Wireless Interface Capabilities
Not all Wi-Fi adapters support Access Point mode due to hardware limitations or driver restrictions. You must confirm that your network interface supportsP2P (Peer-to-Peer) and AP modes. Use the wl tool or iw to inspect supported commands.
Run the following command to list supported features for your primary wireless interface, typically wlan0:
iw list | grep -A 10 "Supported interface modes"
Look for AP in the output. If AP is missing, your hardware cannot create a hotspot natively. In such cases, you might need an external USB Wi-Fi adapter known to support AP mode. Additionally, ensure that the interface is not currently managed by another process, such as a VPN client or a conflicting network script.
If the interface shows AP support, proceed to configure the hotspot via the graphical interface or command line. Avoid mixing manual hostapd configurations with NetworkManager, as they compete for control of the same interface.
Configuring Hotspot via GUI
The easiest way to create a stable hotspot is through the GNOME Settings application. Navigate to Settings > Wi-Fi and click the menu icon (three dots) next to your current connection. Select Create New Wi-Fi Network.... Enter a network name (SSID) and a strong password. Ensure the Security dropdown is set to WPA & WPA2 Personal. Older security protocols like WEP are insecure and often unsupported by modern clients. Click Create to activate the hotspot. If the option is grayed out, it usually indicates that the interface is busy or lacks permissions. Restarting the NetworkManager service often clears these locks. After activation, verify that other devices can see the SSID and connect successfully.Troubleshooting DHCP and IP Assignment
The most frequent reason for hotspot failures is the inability of connected devices to obtain an IP address. NetworkManager usesdnsmasq to provide DHCP services for the hotspot. If dnsmasq is missing or misconfigured, clients will connect to the Wi-Fi but remain offline.
Check if dnsmasq is installed:
dpkg -l | grep dnsmasq
If it is not installed, install it:
sudo apt install dnsmasq
After installation, restart NetworkManager to reload the DHCP configuration:
sudo systemctl restart NetworkManager
You can also manually test the hotspot configuration using nmcli. Create a new connection profile with the following command, replacing placeholders with your desired values:
nmcli con add type wifi ifname wlan0 con-name MyHotspot ssid MyHotspot wifi-security key-mgmt wpa-psk wifi-sec.psk "your_password"
Activate the connection:
nmcli con up MyHotspot
Monitor the logs for errors during activation:
journalctl -u NetworkManager -f
Look for messages related to dhcp or hostapd integration. Errors here often indicate permission issues or conflicts with existing network profiles.
Resolving Kernel 6+ Specific Issues
With the Linux Kernel 6+ series, some changes in how network namespaces and virtual interfaces are handled can affect hotspot stability. Ensure your system packages are fully updated, as kernel updates often include fixes for networking drivers.sudo apt update && sudo apt upgrade
Reboot your system after updating to ensure the new kernel modules are loaded correctly. Sometimes, residual state from previous connections can cause conflicts. Clearing old connection profiles helps:
nmcli con delete "MyHotspot"
Then recreate the connection as described above. This fresh start ensures that all virtual interfaces are cleanly initialized under the new kernel environment.
Alternative Connectivity Solutions
If the standard hotspot method continues to fail despite correct configuration, consider alternative approaches. One option is to use a dedicated USB tethering device, which bypasses software-based AP creation entirely. Another is to use a second Wi-Fi adapter specifically designated for AP mode, leaving the primary adapter for internet access. For advanced users, scripting a manual setup withhostapd and iptables is possible but fragile. It requires careful management of IP forwarding and NAT rules. Refer to our guide on Fixing FTP Failure on Ubuntu 24 for insights into network stack troubleshooting, as similar principles apply to routing issues.
Ensure that your router or upstream network does not block private IP ranges. Some corporate networks restrict local subnet usage, which can prevent hotspot clients from communicating effectively. Testing the hotspot on a different network environment can help isolate whether the issue is local or upstream.
Frequently Asked Questions
Why do devices connect to my hotspot but have no internet?
This indicates a DHCP or NAT issue rather than a Wi-Fi signal problem. Ensure thatdnsmasq is running and that NetworkManager is correctly forwarding traffic between the wired and wireless interfaces. Check journalctl for DHCP error messages.
Can I use two Wi-Fi cards to create a hotspot?
Yes, using one card for internet access and another for the hotspot is a robust solution. It avoids hardware conflicts and provides better performance. Assign each interface to a separate NetworkManager profile to manage them independently.Does Ubuntu 24.04 still require hostapd for hotspots?
No, NetworkManager handleshostapd internally when creating a hotspot via GUI or nmcli. Manual installation of hostapd is only necessary if you are building a custom server setup outside of NetworkManager's scope.
How do I reset a stuck hotspot connection?
Restart the NetworkManager service usingsudo systemctl restart NetworkManager. This clears any stuck virtual interfaces and resets the DHCP lease pool. Deleting and recreating the connection profile also forces a clean re-initialization.