Getting Started with NetworkManager on Kali Linux
Are you looking to take control over network connections on your Kali Linux machine?
NetworkManager is the ideal tool for easily managing Wi-Fi, VPNs, and wired connections. With just a few commands, you can get NetworkManager up and running.
This guide will show you step-by-step how to start using NetworkManager on Kali Linux.
Understanding NetworkManager
NetworkManager is a handy utility included in Kali Linux for monitoring and configuring how your device connects to networks. It gives you a simple interface to switch between wired, Wi-Fi, and VPN connections without having to dig into network settings.
Some key advantages of using NetworkManager include:
Easily connecting to available wireless networks and remembering passwords
Creating and storing different VPN connections
Setting static IP addresses or using DHCP
Sharing internet connections with other devices
Getting notifications when networks disconnect or come online
Overall, NetworkManager aims to make dealing with networks easy for the average user. It's a must-have tool for managing connectivity on Kali Linux.
Checking if NetworkManager is Running
Before configuring anything, let's first check whether NetworkManager is active on your system.
Open up a terminal and run:
systemctl status NetworkManager
If NetworkManager is running, you'll see output indicating it is “active (running)”.
If it is not running, start it with:
systemctl start NetworkManager
And check again to confirm it started successfully.
Connecting to a Wi-Fi Network
With NetworkManager enabled, connecting to wireless networks is straightforward.
First, scan for nearby available networks with:
nmcli device wifi list
This prints out SSIDs, signal strengths, and security types of networks in range.
Choose which network you want to join and connect to it:
nmcli device wifi connect "MyWiFiNetwork" password "wifiPassword"
Swapping out “MyWiFiNetwork” and “wifiPassword" with your network's actual SSID and password.
Once connected, confirm your new IP address using:
ip address show
And try pinging an internet domain like google.com to validate you have internet access.
That’s all there is to getting on Wi-Fi with NetworkManager! It remembers connected networks going forward, so reconnects are seamless.
Connecting a VPN
Virtual private networks (VPNs) provide encrypted tunnels to access remote private networks securely over the internet. NetworkManager makes configuring VPN connections simple.
For example, to connect an OpenVPN tunnel on Kali Linux, first install the openvpn plugin:
apt install network-manager-openvpn
Then place your .ovpn config files, which define the OpenVPN server to connect to, in /etc/NetworkManager/system-connections.
Once added there, check your VPN list:
nmcli connection show
You should see your VPN connection names output.
To activate your VPN:
nmcli connection up "MyVPN"
Use the exact VPN name listed from “nmcli connection show”.
Enter your VPN username and password when prompted to establish the encrypted VPN tunnel.
Now you can route traffic securely through the VPN using NetworkManager’s connectivity.
Further, Use Cases
We’ve just scratched the surface of what’s possible with NetworkManager. Here are some other common tasks made easy:
Set static IPs or use DHCP: Easily assign static IP addresses to your interfaces for more control, rather than using DHCP.
Create hotspots to share connections: Turn your Wi-Fi into a hotspot to share internet connectivity with other devices.
Get notifications: Enable notifications to get alerts when networks drop or become available.
Use CLI or GUI tools: Manage connections via command line with nmcli or graphically with GNOME's panel applet.
In short, NetworkManager provides the core networking foundation you need to connect Kali Linux systems and route traffic. It’s a robust, cross-desktop solution for wiring up connectivity.
Potential Challenges
While extremely versatile, NetworkManager does come with some potential pitfalls to note:
Conflicts with manual networking: Changes made directly to interfaces rather than through NetworkManager may cause issues.
Automatic connectivity changes: Default behavior connects to any open networks automatically, which could connect insecure hotspots.
VPN disconnects: Connected VPN tunnels may disconnect unexpectedly at times.
Thankfully these are easy issues to mitigate once aware. But it helps to understand these possibilities when adopting NetworkManager.
Looking Forward
It’s clear connectivity is only growing more complex, with more devices, networks, and security considerations than ever. NetworkManager aims to simplify this for the average user through automated management.
Some interesting areas NetworkManager could improve going forward include:
Container networking integration: Allow connecting Docker containers and VM networks through NetworkManager.
Commercial VPN support: Add native options for commercial VPN services like NordVPN, ExpressVPN, etc.
Wi-Fi 6 and 5G evolution: Keep evolving to support next-gen protocols and cellular networks.
The Kali Linux project will likely continue adding new capabilities to NetworkManager as networking tech advances.
Get Connected Now
Managing networks doesn’t need to be hard. NetworkManager’s intuitive utilities give you the foundation for connecting Kali Linux to wired, Wi-Fi, and VPN networks.
To get started, first confirm NetworkManager is running:
systemctl status NetworkManager
Check for nearby Wi-Fi networks:
nmcli device wifi list
Connect to one securely:
nmcli device wifi connect "MyWiFiNetwork" password "wifiPassword"
Or set up an encrypted VPN tunnel:
nmcli connection up "MyVPN"
Learning NetworkManager’s capabilities takes just minutes while providing connectivity tools that will benefit you for years. Its automation simplifies how you connect Kali Linux to the world.
Also read -
Getting Kali Linux Network Manager Up and Running