Working with wireless networks in the operating system Kali Linux is a fundamental skill for any information security specialist. Unlike traditional user-based distributions, the connection process here may require tinkering with system configurations or manually installing drivers. Understanding how to properly configure a network interface opens the door to further traffic analysis and security auditing.
There are several proven ways to establish a connection: from a graphical interface that is convenient for quick work, to a command line that gives full control over the adapter. NetworkManager And nmcli These are the main tools you'll encounter. We'll examine each method in detail so you can choose the best one for your situation.
Pay special attention to the compatibility of your wireless adapter. Not all devices support monitoring or packet injection modes, which are critical for pentesting. If your goal is simply to access the internet for updates, any standard adapter will suffice, but professional work requires significantly higher hardware requirements.
Checking compatibility and installing drivers
The first step before attempting a connection is to diagnose your hardware. You need to ensure that the operating system recognizes your Wi-Fi adapter. This can be done in the terminal using the utility lsusb for USB devices or lspci For internal modules. If the device appears in the list but doesn't work, it's likely the necessary drivers are missing.
There are often situations where proprietary drivers for chips Realtek or MediaTek are not built into the kernel by default. In this case, they will need to be compiled and installed manually. To get started, make sure you have access to the Kali repositories and install the packages. linux-headers And build-essentialWithout them, compilation of modules is impossible.
⚠️ Attention: When installing drivers from third-party sources (such as GitHub), always verify the file hash. Using unverified kernel modules can lead to system instability or data compromise.
The installation process often consists of a series of commands in a terminal. First, the driver repository is cloned, then the installation script is executed. After successful installation, you must reboot the system or re-enable the kernel module using the command modprobeIf everything went well, the network indicator should appear in the tray.
List of popular chipsets for pentesting
Atheros AR9271 (works great without drivers)|Ralink RT3070 (good support)|Realtek RTL8812AU (requires drivers)|Intel AX200 (for connection only, not for auditing)
Connecting via the NetworkManager graphical interface
For most users, especially those switching from Windows or macOS, the graphical interface remains the most convenient option. In modern versions of the distribution, this is handled by NetworkManagerTo connect, simply find the network icon in the upper right corner of the screen (usually two arrows or a fan icon).
Click the icon, and the system will scan for available access points. Select the desired network from the list. If the network is open, the connection will be established immediately. If a password is required, a dialog box will appear asking you to enter the WPA/WPA2 security key. After entering the information, the system will attempt to obtain an IP address via DHCP.
- 📡 Automatic IP acquisition: By default, the DHCP protocol is used, which automatically assigns an address.
- 🔒 Saving profile: The system will remember the network and will connect to it automatically when it appears within range.
- ⚙️ Manual setup: In the menu, you can set a static IP address, DNS, and gateway if required by the network policy.
Sometimes the interface gets stuck in a connected state. In this case, switching to airplane mode or restarting the network management service will help. The graphical interface is great for stable operation, but it provides less information about the connection process than console utilities.
Using the Terminal: nmcli Utility
For system administrators and security professionals, knowledge of the command line is a must. Utility nmcli (Network Manager Command Line Interface) allows you to manage connections without a graphical shell. This is especially useful when working via SSH or on servers without a GUI. First, check the device status with the command nmcli device status.
To find available networks, use the scan command. It will display the SSID, signal strength, and security type. Next, create a connection or activate an existing one. The command syntax may seem complicated to a beginner, but it is logical and structured.
nmcli dev wifi list
nmcli dev wifi connect "SSID_network" password "your_password"
After entering the command, the system will display a message about a successful connection. Important: When using the command line, the password may remain in the bash history, so clear the history or use secure input methods. You can also create a persistent connection profile that will be loaded at system startup.
| Team | Description of action | Example of use |
|---|---|---|
nmcli d wifi list |
Scanning available networks | Search for a HomeWiFi hotspot |
nmcli c show |
Displaying active profiles | Checking the current connection |
nmcli c down "Name" |
Disabling a profile | Network connection lost |
nmcli c up "Name" |
Enabling a profile | Reconnection |
Manual configuration via wpa_supplicant
In some cases, especially on minimalist builds or when there are problems with NetworkManager, you have to use a lower-level tool - wpa_supplicantThis method requires manual configuration file creation. It provides direct control over the WPA/WPA2 authentication process.
First you need to create a configuration file, usually located at /etc/wpa_supplicant/wpa_supplicant.conf. Network data is entered into it. To generate a password hash (PSK), you can use the utility wpa_passphrase, so as not to store the password in plaintext. This increases the security of configuration files.
⚠️ Attention: Configuration file
wpa_supplicant.confcontains sensitive data. Make sure the file permissions are set to read-only for the owner (chmod 600), otherwise other system users will be able to see the password.
After preparing the file, you need to start the daemon wpa_supplicant, specifying the interface and path to the configuration. It is usually launched in parallel dhcpcd or dhclient to obtain an IP address. This method requires more steps, but it's universal and works on almost any Linux distribution.
☑️ Configuring wpa_supplicant
Monitoring and injection mode for auditing
If your goal is not just internet access, but rather analyzing WiFi network security, you will need to put the adapter into monitoring mode. In normal mode (Managed) The card filters packets, leaving only those addressed to your device. Monitor mode allows you to "hear" the entire broadcast.
A utility is used to switch airmon-ng, included in the package aircrack-ng. Before starting monitoring mode, you need to kill any processes that might interfere with the card's operation (for example, NetworkManager). This is a critical step that is often overlooked by beginners.
sudo airmon-ng check kill
sudo airmon-ng start wlan0
After executing the command, the interface is usually renamed (for example, to wlan0mon). Now with the help of iwconfig you can verify that the mode has changed to MonitorIn this mode you can run airodump-ng to capture handshakes or mdk4 to test network resilience to loads.
Diagnosis and solution of common problems
Even with proper configuration, errors can occur. A common problem is a weak signal or channel interference. In Kali Linux, you can use the command iwlist For a detailed view of signal quality and noise levels. If the signal is too weak, using an external antenna or USB extension cable will help.
Another common issue is an IP address conflict or DHCP errors. In this case, resetting network settings and clearing the cache can help. It's also worth checking the system logs (/var/log/syslog or dmesg), where drivers often write detailed reports about connection errors.
- 🔍 Checking logs: team
dmesg | grep firmwarewill show microcode loading errors. - 🔄 Network reset: deleting saved profiles and re-authorization.
- 🛡️ Blocking: Make sure that MAC filtering on your router is not blocking your device.
If all else fails, the problem may be a physical defect in the adapter or an incompatibility between the kernel version and the driver. In such cases, it's helpful to check the specific chipset's support forums or try an older or newer Linux kernel version.
Why doesn't Kali Linux see my WiFi adapter?
The most common cause is a lack of drivers for a specific chipset model. Check the lsusb command output, find the device ID (e.g., 0bda:8812), and search for drivers on GitHub or in the Kali repositories. The adapter may also be disabled in the BIOS or blocked by rfkill.
Can I use my laptop's built-in WiFi for pentesting?
Integrated cards (especially Intel and Broadcom) often only support client mode and are unable to perform packet injection. For a full security audit, it is recommended to use an external USB adapter with an Atheros or Realtek chip that supports monitor mode.
How to save WiFi password in Kali Linux?
When connecting via NetworkManager, the password is automatically stored in encrypted form in the system. When using wpa_supplicant, the password is stored in a text configuration file, which must be protected with root access.
What to do if there is a connection, but the Internet does not work?
Check your DNS settings. Try using public DNS (e.g., 8.8.8.8 from Google). Also, make sure the default gateway is correct and there's a route to it. Sometimes, using the dhclient -r command to reset the IP lease resolves the issue.