Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


connect wifi pineapple to a switch
by admin
 at 2018-08-22 23:03:00.

how to connect your wifi pine apple to a normal switch or modem.

connect the an Ethernet port from you switch or modem …  to the wifi pineapple wan port.

ssh to your wifi pineapple and save the fallowing command as watever.sh

#!/bin/bash
IP=$(/sbin/ifconfig eth1| grep 'inet addr:'| cut -d: -f2|awk '{print $1}')
MASK=${IP%.*}.0
echo '1' > /proc/sys/net/ipv4/ip_forward

iptables -I FORWARD -s $MASK/255.255.255.0 -j DROP
iptables -A FORWARD -i eth1 -o wlan0 -s $MASK/24 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE

now give it permission to execute. (chmod 755 or chmod +x)

run it ./wan.sh

on the status page by clicking on reveal the public ip. you can make sure that you are connected. (or just ping google.com)