PDA

View Full Version : No internet connection but connected to wifi



shacvet
2016-12-05, 19:50
Greetings!

New here...I am having issues with internet connection. I am connected to my router via wifi (wlan0) and have tried eth0 with no avail, and i do have internet on other machine. This problem surfaced after full upgrade/update/dist-upgrade and reboot (graphical GUI install | NON VM). Just cannot figure this one out. :confused:

Would love some help,
Thank you kindly!


root@lestat:~# uname -a
Linux lestat 4.8.0-kali1-amd64 #1 SMP Debian 4.8.5-1kali1 (2016-11-04) x86_64 GNU/Linux

root@lestat:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: kali-rolling
Codename: kali-rolling

root@lestat:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:24:e8:a8:00:7e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 22 memory 0xf6ae0000-f6b00000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 16984 bytes 1026448 (1002.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16984 bytes 1026448 (1002.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.16 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 2606:6000:cacc:d200:7b6:4cc0:74bc:524f prefixlen 64 scopeid 0x0<global>
inet6 2606:6000:cacc:d200::2 prefixlen 128 scopeid 0x0<global>
inet6 fe80::310a:7628:6c12:f359 prefixlen 64 scopeid 0x20<link>
ether 00:22:fb:74:4b:18 txqueuelen 1000 (Ethernet)
RX packets 1751 bytes 305093 (297.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 250 bytes 27115 (26.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@lestat:~# airmon-ng start wlan0

Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'

PID Name
638 wpa_supplicant
2147 dhclient
3560 NetworkManager
3596 dhclient
3747 dhclient

PHY Interface Driver Chipset

phy0 wlan0 iwlwifi Intel Corporation WiFi Link 5100

(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
(mac80211 station mode vif disabled for [phy0]wlan0)

root@lestat:~# dmesg | tail
[ 449.385113] usb 5-2: New USB device found, idVendor=03f0, idProduct=0862
[ 449.385120] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 449.385125] usb 5-2: Product: HP Wireless Keyboard Mouse Kit
[ 449.385129] usb 5-2: Manufacturer: HP
[ 449.402686] input: HP HP Wireless Keyboard Mouse Kit as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.0/0003:03F0:0862.0007/input/input21
[ 449.461064] hid-generic 0003:03F0:0862.0007: input,hidraw2: USB HID v1.11 Keyboard [HP HP Wireless Keyboard Mouse Kit] on usb-0000:00:1d.0-2/input0
[ 449.503234] input: HP HP Wireless Keyboard Mouse Kit as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.1/0003:03F0:0862.0008/input/input22
[ 449.561456] hid-generic 0003:03F0:0862.0008: input,hiddev0,hidraw3: USB HID v1.11 Mouse [HP HP Wireless Keyboard Mouse Kit] on usb-0000:00:1d.0-2/input1
[ 488.468705] fuse init (API version 7.25)
[ 488.567783] [drm:i965_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun

root@lestat:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlan0
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0
root@lestat:~# cat/etc/resolv.conf
bash: cat/etc/resolv.conf: No such file or directory
root@lestat:~# ping google.com
ping: google.com: Name or service not known

root@lestat:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:24:e8:a8:00:7e brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:22:fb:74:4b:18 brd ff:ff:ff:ff:ff:ff

root@lestat:~# ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:24:e8:a8:00:7e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 22 memory 0xf6ae0000-f6b00000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 21176 bytes 1278128 (1.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 21176 bytes 1278128 (1.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.16 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 2606:6000:cacc:d200:7b6:4cc0:74bc:524f prefixlen 64 scopeid 0x0<global>
inet6 2606:6000:cacc:d200::2 prefixlen 128 scopeid 0x0<global>
inet6 fe80::310a:7628:6c12:f359 prefixlen 64 scopeid 0x20<link>
ether 00:22:fb:74:4b:18 txqueuelen 1000 (Ethernet)
RX packets 2038 bytes 361756 (353.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 270 bytes 29239 (28.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@lestat:~# dhclient wlan0
[/B]smbd.service is not active, cannot reload.
invoke-rc.d: initscript smbd, action "reload" failed.
RTNETLINK answers: File exists
mkdir: cannot create directory '/etc/resolvconf/run': File exists[/B]

root@lestat:~# rfkill unblock wifi

root@lestat:~# rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

root@lestat:~# iwconfig
eth0 no wireless extensions.

wlan0 IEEE 802.11 ESSID:"Katzen Liebhaber"
Mode:Managed Frequency:5.2 GHz Access Point: 30:F7:72:95:C2:D2
Bit Rate=120 Mb/s Tx-Power=15 dBm
Retry short limit:7 RTS thr :off Fragment thr :off
Encryption key:off
Power Management:off
Link Quality=47/70 Signal level=-63 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:40 Missed beacon:0

lo no wireless extensions.

warrend
2016-12-07, 01:42
dist-upgrade had issue few days ago and you may want to do
apt-get clean
apt-get update && apt-get upgrade -y

also is NetworkManager.conf file edited to read managed=true its located in /etc/NetworkManager (and case sensitive)

mmusket33
2016-12-07, 13:29
Your tests are giving mixed results


You need to test to see if you are connected to the dns thru NetworkManager(NM) and then if the dns has a actual internet connection.

First your cat/etc/resolv.conf is in error

Try

cat /etc/resolv.conf

Note the space between cat and the /etc

You should see

# Generated by NetworkManager
nameserver 192.168.1.1

Note the 192.168.1.1 may be another IP and is your dns

Now try

ping -c 1 www.google.com

ping -c 1 www.facebook.com

This will partially prove that the dns has an internet connection

You can also try

cat /sys/class/net/wlan0/carrier

The wlan0 can be any device interface you are checking

The return of a 1 indicates internet connection and a zero indicates no internet connection. But we find the ping solution more reliable indicator as sometimes a one is returned but the internet access is so weak as to be unuseable.

Musket Teams

shacvet
2016-12-09, 02:01
Thank you for your replies.

Here is what I have tried and still having the same problem. Connected but no internet.

root@lestat:~# cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

Also when I search through GUI files and click on resolv.conf it states it is Broken and same for resolvconf base folder.


root@lestat:~# pine -c 1 www.google.com
bash: pine: command not found

root@lestat:~# cat /sys/class/net/wlan0/carrier
1

root@lestat:~# apt-get clean (No response)
root@lestat:~# apt-get update
Err:1 http://http.kali.org/kali kali-rolling InRealease
Could not resolve 'http.kali.org'

mmusket33
2016-12-09, 07:29
To shacvet

1. If you run the cat /etc/resolv.conf command and there is no dns connection you will get a No such file or directory

2. Your ping command was typed in error as you typed pine. However if you have no dns you cannot get an internet connection hence the result would be the same.

You can manually check thru the command line the Network Manager Connections to a network. Use nmcli

For devices type

nmcli d

For networks seen type

nmcli c

To get a list of nmcli commands just type nmcli [Enter]


It seems to us that you do not have a connection to a network thru NetworkManager.

MTeams

shacvet
2016-12-09, 17:31
mmusket33,

My apologies for the typing error. Since my other machine is not online, I am typing this in manually here, so the typing error was on this side. This is what I came up with...

(I did change which connection I am on to see if that was the problem. Hince the discrepancy in wifi names.)

root@lestat:~# nmcli d
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected 2.4 Katzen
eth0 ethernet unavailable --
lo loopback unmanaged --

root@lestat:~# nmcli c
NAME UUID TYPE DEVICE
2.4 Katzen 2122232e-f3d3-4710-97aa-bba415049201 802-11-wireless wlan0
Katzen Liebhaber 1 d835f109-6d14-4aae-82cf-cee1c9735b5f 802-11-wireless --
Wired connection 1 414fd39f-c5ed-41b3-8ce8-3ef6836e5612 802-3-ethernet --

root@lestat:~# ping www.google.com
ping: www.google.com: Name or service not known

shacvet
2016-12-09, 17:43
FIXED!

I was perplexed to my resolv.conf file and decided to just trash it! Then I # echo "nameserver 8.8.8.8" > /etc/resolv.conf

Problem Fixed!!!

Thank you guys for your help!