Quick Diagnosis
# Check network interface status
ip link show
# Check IP addresses
ip addr show
# Test network connectivity
ping -c 4 8.8.8.8
# Test DNS resolution
ping -c 4 www.google.com
# Check NetworkManager status
nmcli general statusWired Network
Network card not recognized
# Check Ethernet devices
lspci | grep -i ethernet
ip link show | grep -E "^[0-9]"
# If the network card is not shown, check the driver
sudo dmesg | grep -i eth
sudo dmesg | grep -i r8169 # Common Realtek driverNo IP address obtained
# Have NetworkManager re-request an address (dhclient is no longer shipped)
sudo nmcli device reapply enp0s3
# On systemd-networkd systems use instead:
sudo networkctl renew enp0s3
# Or reconnect the interface
sudo nmcli device connect enp0s3
# Manually configure a static IP
sudo nmcli con mod "Wired connection 1" \
ipv4.addresses 192.168.1.100/24 \
ipv4.gateway 192.168.1.1 \
ipv4.dns "8.8.8.8,1.1.1.1" \
ipv4.method manual
sudo nmcli con up "Wired connection 1"Wireless Network
Wi-Fi adapter not detected
# Check wireless devices (iwconfig is deprecated; use iw)
iw dev
nmcli device wifi list
# Check if disabled by RF switch
rfkill list all
sudo rfkill unblock wifiCannot connect to Wi-Fi
# Scan for available networks
nmcli device wifi rescan
nmcli device wifi list
# Connect to Wi-Fi
nmcli device wifi connect "SSID_NAME" password "PASSWORD"
# View saved connections
nmcli connection show
# Delete a problematic connection and re-add
nmcli connection delete "CONNECTION_NAME"Frequent disconnections
# Check if power management turned off Wi-Fi
iw dev wlan0 get power_save
# Disable Wi-Fi power management
sudo iw dev wlan0 set power_save off
# Make it permanent
echo 'options iwlwifi power_save=0' | sudo tee /etc/modprobe.d/iwlwifi-powersave.confDNS Issues
Symptom: Can ping IPs but cannot resolve domain names
# Test DNS
nslookup www.google.com
dig www.google.com
# Check current DNS configuration
resolvectl status
# Check systemd-resolved status
systemctl status systemd-resolvedChange DNS Servers
# Temporary change (lost after reboot)
sudo resolvectl dns enp0s3 8.8.8.8 1.1.1.1
# Permanent change through NetworkManager
sudo nmcli con mod "CONNECTION_NAME" ipv4.dns "8.8.8.8 1.1.1.1"
sudo nmcli con mod "CONNECTION_NAME" ipv4.ignore-auto-dns yes
sudo nmcli con up "CONNECTION_NAME"Recommended Public DNS Servers
| Provider | Primary DNS | Secondary DNS |
|---|---|---|
| 8.8.8.8 | 8.8.4.4 | |
| Cloudflare | 1.1.1.1 | 1.0.0.1 |
| Quad9 | 9.9.9.9 | 149.112.112.112 |
| OpenDNS | 208.67.222.222 | 208.67.220.220 |
Firewall Issues
# Check UFW status
sudo ufw status verbose
# Temporarily disable firewall for testing
sudo ufw disable
# Allow specific ports
sudo ufw allow 80/tcp
sudo ufw allow 443/tcpProxy Settings
System Proxy
# Set environment variables
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
export no_proxy="localhost,127.0.0.1"
# Write to ~/.bashrc for permanenceAPT Proxy
sudo nano /etc/apt/apt.conf.d/proxy.confAcquire::http::Proxy "http://127.0.0.1:7890";
Acquire::https::Proxy "http://127.0.0.1:7890";Reset Network Configuration
# Restart NetworkManager
sudo systemctl restart NetworkManager
# Completely reset network configuration
sudo rm /etc/NetworkManager/system-connections/*
sudo systemctl restart NetworkManagerLast updated on