littletone2002 Posted December 29, 2012 Share Posted December 29, 2012 So I currently have the Pinapple Mark IV wired to my laptop which is providing an internet connection for anyone who connects to the pinapple. Is it possible to instead have a 2nd wifi card attached to the pinapple that then connects to an AP, and then use this to allow internet connectivity? Quote Link to comment Share on other sites More sharing options...
loozr Posted December 29, 2012 Share Posted December 29, 2012 Yes, that should be possible with the Network Module. Have you checked it out already? Quote Link to comment Share on other sites More sharing options...
duckmanjbr Posted December 30, 2012 Share Posted December 30, 2012 (edited) Yo littletone, I tried for days to get that to work w/ the network module and the easy point and click was to hard for me. I ended up making my own connection script w/ ipforwarding to get mine up and running. I'll attach it so you can adjust for yourself. Some of it I'll admit was cut and paste from Darrens' mp4.sh script but hey, whatever works right?! :) If someone wants to enlighten me on how to get that Netwok Module working I'm all ears! After hours of messing w/ it I couldn't get mine working at all though. #!/bin/bash echo "*****************************************************************************************" echo "-----------------------------------------------------------------------------------------" echo "" echo -n "This scrip will 1st change the MAC of the desired NIC and then connect to a network." echo "" echo "Turning on available NICs: " ifconfig wlan1 up ifconfig wlan2 up ifconfig wlan3 up echo "" echo -n "Available NICs to setup: " echo "" echo "" ifconfig |grep "Link encap" echo "" echo -n "What NIC are you setting up? " read NIC echo "Finding available wireless networks in your area.........." echo "" iwlist $NIC scan |grep ESSID echo "" echo "" echo -n "Whats the wireless network you're attaching to? " read ESSID echo -n "Whats the wireless passphrase? (Leave blank if OPN network) " read PASSPHRASE echo -n "Is this a WPA/WPA2 encrypted network? [y] " read WPA if [[ -z $WPA ]]; then WPA=y fi killall wpa_supplicant & killall udhcpc sleep 2s # set up WPA wireless connection if selected if [[ $WPA == "y" || $WPA == "Y" ]]; then ifconfig $NIC down macchanger $NIC -A ifconfig $NIC up # print iwconfig for trouble shootign if needed #iwconfig $NIC echo "network={" > wpa.conf echo -e "\t\tssid=\"$ESSID\"" >> wpa.conf echo -e "\t\tpsk=\"$PASSPHRASE\"\n\t\t}" >> wpa.conf sleep 2 wpa_supplicant -B -D nl80211 -i $NIC -c wpa.conf rm -f wpa.conf fi # setup WEP/OPN wireless connections if [[ $WPA == "n" || $WPA == "N" ]]; then ifconfig $NIC down macchanger $NIC -A ifconfig $NIC up iwconfig $NIC essid $ESSID $PASSPHRASE fi #remove default route route del default && echo "Default route removed" || echo "No Default route set" udhcpc -i $NIC --release sleep 2 echo -n "Would you like to setup ipforwarding via iptables? [y] " read IPTABLES if [[ -z $IPTABLES ]]; then IPTABLES=y # default yes answer echo '1' > /proc/sys/net/ipv4/ip_forward #echo -n "IP Forwarding enabled. /proc/sys/net/ipv4/ip_forward set to " #cat /proc/sys/net/ipv4/ip_forward #clear chains and rules iptables -X iptables -F #echo iptables chains and rules cleared #setup IP forwarding echo "" echo "" ifconfig |grep -A 1 br-lan ifconfig |grep -A 1 eth0 ifconfig |grep -A 1 eth1 ifconfig |grep -A 1 wlan0 ifconfig |grep -A 1 wlan1 echo "" echo -n "Pineapple Network [172.16.42.0/24]: " read PINEAPPLENET if [[ -z $PINEAPPLENET ]]; then PINEAPPLENET=172.16.42.0/24 # Pineapple network. Default is 172.16.42.0/24 fi echo -n "Interface of Pineapple's client network [br-lan]: " read PINEAPPLELAN if [[ -z $PINEAPPLELAN ]]; then PINEAPPLELAN=br-lan #Interface w/ all clients "got" by the Pineapple fi echo -n "Interface between Live Network and Pineapple [wlan1]: " read PINEAPPLEWAN if [[ -z $PINEAPPLEWAN ]]; then PINEAPPLEWAN=wlan1 # Interface of live network supplying internet to Pineapple fi iptables -A FORWARD -i $PINEAPPLEWAN -o $PINEAPPLELAN -s $PINEAPPLENET -m state --state NEW -j ACCEPT iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A POSTROUTING -t nat -j MASQUERADE echo "IP Forwarding Enabled" fi Edited January 2, 2013 by duckmanjbr Quote Link to comment Share on other sites More sharing options...
PineDominator Posted December 30, 2012 Share Posted December 30, 2012 http://forums.hak5.org/index.php?/topic/27142-mk4-usb-wifi-dongle-internet-sharing-how-to/page__hl__supplicant Quote Link to comment Share on other sites More sharing options...
duckmanjbr Posted December 30, 2012 Share Posted December 30, 2012 @petertfm- I saw that writeup. That's also not through the GUI though. I think he and I are doing the same thing I just made my script a little less hard coded and more user friendly. Basically I automated it. I was looking to build something that would work outta the box for more than just me. Quote Link to comment Share on other sites More sharing options...
Bucky67GTO Posted September 13, 2013 Share Posted September 13, 2013 I am having a similar issue with the WiFi Manager. Will try this. Quote Link to comment Share on other sites More sharing options...
blueAlien Posted September 15, 2013 Share Posted September 15, 2013 I had no problem with the Wifi Manager once I knew what I was doing. What I did after setting up the wifi connection was to make sure I could reach the Internet by "revealing the public ip" on the main page. Then you just need to go back to the WiFi Manager and set the ICS to from wlan1 to br-lan. Change wlan1 to whatever your card is using. Then you should see the new route appear in the routing table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.