Jump to content

Internet Connection Sharing NOT working in Kali Linux?


Recommended Posts

Hello !

Yesterday i received my Pineapple Mark V by DHL and i have immediately start using it. Upgraded it to 1.2.0 and checked out the web-GUI on 172.16.42.1:1471. Everything seemed to work well, until.. i used the wp5.sh script for sharing my internet connection (wlan0) from my Kali Linux (no VM) with the Pineapple.

What i have:

A working internet connection on my Kali Linux (192.168.0.141)

A working connection from my Kali Linux to the Pineapple (172.16.42.42)

A working GUI on my Kali Linux at 172.16.42.1:1471.

I do not have any internet connection on my Pineapple:

screen1.png

Also, i can connect to my Pineapple by WiFi with any computer, but i can only connect to my Pineapple (172.16.42.1:1471). If i try to go online, there is no connection !! Any ideas?

Link to comment
Share on other sites

This is the output of the script:

....
Pineapple Netmask [255.255.255.0]:
Pineapple Network [172.16.42.0/24]:
Interface between PC and Pineapple [eth0]:
Interface between PC and Internet [wlan0]:
Internet Gateway [192.168.0.1]:
IP Address of Host PC [172.16.42.42]:
IP Address of Pineapple [172.16.42.1]:
Pineapple connected to: eth0
Internet connection from: wlan0
Internet connection gateway: 192.168.0.1
Host Computer IP: 172.16.42.42
Pineapple IP: 172.16.42.1
Network: 172.16.42.0/24
Netmask: 255.255.255.0

_ . ___ \||/ Internet: 192.168.0.1 - wlan0
( _ )_ <--> [___] <--> ,<><>, Computer: 172.16.42.42
(_ _(_ ,) \___\ '<><>' Pineapple: 172.16.42.0/24 - eth0

Browse to http://172.16.42.1:1471

So, i have just entered all enters...

Edited by Barney_Rubble
Link to comment
Share on other sites

And what interface name is your Kali machine really using for wifi? I think a quick ifconfig or iwconfig at the command line will give you what you need.

Link to comment
Share on other sites

The internet-facing nterface of my Kali Linux is: wlan0.

eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:172.16.42.42 Bcast:172.16.42.255 Mask:255.255.255.0
inet6 addr: fXX:XX:XX:XX:XX:XX/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63255 errors:0 dropped:0 overruns:0 frame:0
TX packets:65677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17538486 (16.7 MiB) TX bytes:6802406 (6.4 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11280 (11.0 KiB) TX bytes:11280 (11.0 KiB)

wlan0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.0.141 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: XX:XX:XX:XX:XX:XX /64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:225366 errors:0 dropped:0 overruns:0 frame:0
TX packets:113753 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:277526640 (264.6 MiB) TX bytes:13131493 (12.5 MiB)

Edited by Barney_Rubble
Link to comment
Share on other sites

And have you killed the wicd process? Or whatever the network manager is named in Kali these days..

Edit: Link to why...

https://forums.hak5.org/index.php?/topic/29875-connecting-mark-iv-disrupts-laptop-wifi-connect/?p=225827

Edited by thesugarat
Link to comment
Share on other sites

I haven't killed the wicd process. But i do not have any problems with my connection which are mentioned in your link. I can connect to internet via my wlan0 and i can connect to the Pineapple via eth0 from my Kali machine. If i open Wireshark and start listening on eth0 i get the data of the GUI (HTTP and TCP) of the Pineapple. Is this correct?

Could the iptables be wrong on my Kali machine? Because the iptables on the Pineapple are not affected by the wp5.sh script.

Edited by Barney_Rubble
Link to comment
Share on other sites

The problem is networkmanager may change your eth0 ip address since the pineapple is a dhcp server.

If that is the case, shouldnt i see this when i run ifconfig? My eth0-ip is 172.16.42.42 (gotten from the pineapple) and i can connect to the pineapple AND internet.

Edited by Barney_Rubble
Link to comment
Share on other sites

Does anybody have any clue? I have reset the Pineapple, cleared iptables of my Kali machine and tried a lot.. But no effect! I can connect via wlan1 on my Pineapple to an AP and get a internet-connection, but then i can't see any data on my Kali (eth0) of that connection. I am starting to think that there's something wrong with the Pineapple. The iptables of the Pineapple are full of rules and appear to be correct. But it looks like the data isn't going from the Pineapple-ip to the Kali machine..

This is the br-lan of my Pineapple.

br-lan    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX          inet addr:172.16.42.1  Bcast:172.16.42.255  Mask:255.255.255.0          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:13310 errors:0 dropped:23 overruns:0 frame:0          TX packets:11319 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:1253669 (1.1 MiB)  TX bytes:7433547 (7.0 MiB)
Link to comment
Share on other sites

Aha !! Seem to have found it !! In the wp5.sh script there were some lines commented out. One of those was this one..:

#instructions
#echo All set. Now on the Pineapple issue: route add default gw $pineapplehostip br-lan

So i ran the route add default gw 172.16.42.42 br-lan on the Pineapple and voila.. it worked !! But now the GUI of my Pineapple is getting realllly slow, but this could be affected by the load (2 computers running a script connecting and disconnecting them from Google every minute..)

Edited by Barney_Rubble
Link to comment
Share on other sites

I think the instructions at http://wiki.wifipineapple.com/index.php/Internet_Connection_Sharing were written for Kali being run as a virtual machine.

I have Kali installed fully on one laptop and when I tried to follow these instructions I made a few modifications:

At the command prompt enter ifconfigband note the inet addr value for wlan0 (for example 10.5.50.30).

Then enter ./wp5.sh

In the subsequent seven questions enter:

1. [blank]
2. [blank]
3. eth0
4. wlan0

5. [inet addr]

6. [Enter]

7. [Enter]

This worked for me straightaway, I hope this helps any else who might be struggling too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...