Turning your Linux laptop or desktop into a fully-fledged wireless router is a task that may seem daunting at first glance. Modern distributions like Ubuntu offer powerful built-in network management tools that allow you to share Wi-Fi without installing third-party scripts. This solution is ideal for situations where your permanent router is down or you need to provide guests with network access without revealing the main password.
In this article we will take a detailed look at the creation process Hotspot (access points) using various methods: from the standard GNOME graphical interface to advanced configuration via NetworkManager in the command line. You'll learn how to bypass common driver limitations, configure SSID hiding for increased security, and optimize the frequency range for a stable connection. A thorough understanding of these processes will allow you to confidently manage your network environment in any situation.
Hardware and software requirements
Before you begin setting up, you need to make sure that your hardware supports the mode. Master Mode, which is necessary to create an access point. Most modern USB adapters and built-in Wi-Fi modules released in the last 5-7 years handle this task without any problems, but older models may limit functionality to client mode only. Checking compatibility is a critical step; ignoring it can lead to hours of useless debugging.
To work, you will need a current version of the distribution, for example, Ubuntu 20.04 LTS or newer, where the network management daemon takes over NetworkManagerAlso, make sure you have superuser privileges (root or sudo), as changing network configurations requires elevated privileges. If you're using a virtual machine, wireless adapter forwarding may be difficult, so it's best to work on a physical device.
⚠️ Attention: Some proprietary drivers (especially Broadcom and older Realtek drivers) may not support creating an access point. If standard methods don't work, try installing open-source drivers through the "Additional Drivers" menu.
It's also worth considering that simultaneously operating as an access point and connecting to another Wi-Fi network on a single physical adapter isn't always possible. Wi-Fi internet sharing often requires the incoming (WAN) connection to be provided via an Ethernet cable or mobile data (USB modem), although modern dual-band cards can theoretically operate on different frequencies simultaneously.
Creating an access point via the GNOME graphical interface
The easiest and most accessible method for most users is to use the built-in network settings in the Ubuntu graphical shell. This method requires no command knowledge and allows you to quickly deploy a network for temporary use. The process is intuitive, but it conceals several important nuances that affect compatibility with client devices.
To get started, open the system settings menu and go to the "Network" section. In the left menu, select "Wi-Fi," then click the three-dot button or gear icon to open additional options. Here, you'll find the "Use as Hotspot" tab or button, which activates the Wi-Fi hotspot.
☑️ Check before launching Hotspot
After activating the mode, the system will prompt you to configure the network name (SSID) and password. Please note that WPA2/WPA3 encryption may be selected by default, which is the correct choice for security. However, if you are connecting very old devices that do not support modern encryption standards, you may need to lower the security level, although this is not recommended on open networks.
It's important to note that the graphical interface may hide some advanced settings, such as channel or bandwidth selection. In default mode, Ubuntu will attempt to select optimal parameters automatically, but in dense urban environments with many neighboring networks, manual configuration via the terminal may yield better results.
Setting up a Hotspot via the command line (nmcli)
For those who prefer full control over the system or work with server versions of Ubuntu without a graphical shell, the utility will be an indispensable tool nmcli (NetworkManager command line interface). It allows you to create, modify, and delete connections with high precision, bypassing the limitations of the GUI. Using the terminal also helps automate the process through scripts.
The first step is to find the name of your wireless interface. Run the command nmcli device status in the terminal. In the list of devices, find the line where the type is listed as wifi, and remember the name (usually it is wlan0, wlp2s0 or similar). Next we will create a new connection of the type wifi in access point mode.
nmcli connection add type wifi ifname wlan0 con-name"MyUbuntuHotspot" autoconnect yes ssid"MyUbuntuHotspot"nmcli connection modify"MyUbuntuHotspot" 802-11-wireless.mode ap
nmcli connection modify"MyUbuntuHotspot" 802-11-wireless.band bg
nmcli connection modify"MyUbuntuHotspot" ipv4.method shared
nmcli connection modify"MyUbuntuHotspot" wifi-sec.key-mgmt wpa-psk
nmcli connection modify "MyUbuntuHotspot" wifi-sec.psk "YourPassword123"
Let's look at the key parameters of this command: 802-11-wireless.mode ap switches the card to access point mode, and ipv4.method shared Activates NAT (Network Address Translation), allowing you to share internet access coming to another interface (for example, eth0). Range selection bg (2.4 GHz) provides better compatibility, while a (5 GHz) gives speed but less coverage.
| Command parameter | Function Description | Recommended value |
|---|---|---|
con-name |
Name of the connection profile in the system | HomeHotspot |
ssid |
Visible network name for clients | MyWiFi |
ipv4.method |
IP address methods | shared |
wifi-sec.psk |
Network encryption key | Complex password |
After entering the commands, the connection does not activate automatically. To start the access point, use the command nmcli connection up"MyUbuntuHotspot"If everything went well, you'll see a message stating that the connection has been activated, and devices will begin to see your network. If there are any errors, check the logs via journalctl -u NetworkManager.
Troubleshooting Drivers and Hiding SSIDs
One common problem when creating an access point on Linux is the inability to hide the network name (SSID) for increased privacy. The standard graphical interface often lacks this option, but nmcli This makes it easy to implement. A hidden network doesn't broadcast packets with its name, so you can only connect to it by knowing its exact name.
To enable stealth mode, add the parameter hidden yes when modifying a connection. The command will look like this: nmcli connection modify"MyUbuntuHotspot" 802-11-wireless.hidden yesAfter this, you'll need to reboot the connection. Remember that hiding the SSID isn't an encryption method and doesn't protect your data; it simply makes your network less visible to passersby.
⚠️ Attention: When using a hidden SSID, some mobile devices (especially iOS) may constantly search for this network in the background, even when you are away from home, resulting in increased battery consumption.
If you are faced with the situation that the access point is created, but clients cannot obtain an IP address, the problem may lie in the settings dnsmasq or a service conflict. Make sure there's no other DHCP server running on the system. Also, try forcing the address range: nmcli connection modify"MyUbuntuHotspot" ipv4.addresses 10.42.0.1/24.
Why doesn't AP mode work on some maps?
Some drivers (especially for Realtek RTL88xx chips) require a specially built kernel module to support access point mode. Standard Linux kernel drivers may have limitations imposed by the chip manufacturer.
Dual-band distribution and channel selection
Modern routers and adapters support both the 2.4 GHz and 5 GHz bands. When creating an access point on Ubuntu, it's important to understand which band you're using. The 2.4 GHz band (bg) has greater coverage, but is very noisy in apartment buildings. The 5 GHz band (a) provides high speed, but penetrates walls worse.
To force the access point to start on 5