Debian WiFi + Ethernet Setup Fix¶
Problem¶
- Ethernet connected locally (192.168.1.x)
- WiFi has internet but not routing properly
- DNS not working or packet loss
Quick Diagnostic¶
ip addr # Check interfaces have IPs
ip route # Check default gateway
ping 8.8.8.8 # Test internet
ping google.com # Test DNS
Fix DNS (if 8.8.8.8 works but google.com doesn't)¶
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
ping google.com # Should work now
Fix Default Route (if no internet at all)¶
Check which interface should have default route:
Should show something like:
If default is missing or wrong:
# Remove bad default (if exists)
ip route del default via 192.168.1.1
# Add correct default via WiFi gateway (adjust IP as needed)
ip route add default via 192.168.x.x dev wlp3s0b1
Reconnect WiFi (if disconnected)¶
With NetworkManager (if installed)¶
Without NetworkManager (manual)¶
# Bring interface up
ip link set wlp3s0b1 up
# Create config
wpa_passphrase "NetworkName" "YourPassword" > /etc/wpa_supplicant.conf
# Connect
wpa_supplicant -B -i wlp3s0b1 -c /etc/wpa_supplicant.conf
dhclient wlp3s0b1
Make DNS Permanent¶
If using NetworkManager¶
nmcli connection modify "WiFi-connection-name" ipv4.dns "8.8.8.8 1.1.1.1"
nmcli connection down "WiFi-connection-name"
nmcli connection up "WiFi-connection-name"
If using /etc/network/interfaces¶
Edit:
Add under WiFi interface:
Network Info¶
- Ethernet interface: enp4s0f0 (local network only, 192.168.1.x)
- WiFi interface: wlp3s0b1 (internet connection)
- WiFi SSID: [Your network name]
- Local ethernet IP: 192.168.1.12
Notes¶
- WiFi must be default route for internet
- Ethernet is for local device communication only
- Router is not accessible via ethernet (building restriction)
Fix APT IPv6 Issues¶
If apt fails with "Network is unreachable" on IPv6 addresses:
This forces apt to use IPv4 only.