Black Bear Information Security
Information Technology Security
penetrationtesting.jpg

Blog

Troubleshooting the Wifi Pineapple

I've discovered a problem that occurs to when setting up my Wifi Pineapple using the wp6.sh script. For whatever reason, the commands do
not run properly and no settings are changed. In lieu of the wp6.sh script, you can do the following to get your Wifi Pineapple working properly every time.

Note: 
Where $eth1ipaddr is the IP address of the interface connected to the Wifi Pineapple. The Wifi Pineapple runs a DHCP server but assumes that your computer will get an IP address of 172.16.42.42This is not always the case, so double check.

1) Make sure that forwarding is enabled.

echo '1' > /proc/sys/net/ipv4/ip_forward  

2) Create the iptables rules to share the network connection with the Wifi Pineapple.

iptables -F  
iptables -A FORWARD -i $eth1ipaddr -o 172.16.42.1 -s 172.16.42.0/24 -m state --state NEW -j ACCEPT  
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT`<br>  
iptables -A POSTROUTING -t nat -j MASQUERADE  

3) Finally, ssh into the Wifi Pineapple and set the default route to the correct IP address.

route del default  
route add default gw $eth1ipaddr  

 

 

Tim Kusajtys