trentreznor321
sry for so many responses, but i know this was a big issue for me and trying to get to work so i thought i'd share my final little wps button script.
My setup can be connected to any cracked access point. The only thing that needs to be enabled on the AP is either all your ports forwarding, or a DMZ setting with the server set to the pineapple's ip address (in this case 192.168.1.2)
I am forwarding ports 32400,5000,80 and 21 through the pineapple to my router from wlan0 to br-lan
This is my setup so you know what things are and can change them for your situation:
[NAS Server]--(LAN 192.168.1.6)--[My Router]--(LAN br-lan 172.16.42.182)--[Pineapple]--(wlan0 192.168.1.2)--[Any access point]
My little script:
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 32400 -j DNAT --to 172.16.42.182:32400 iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 5000 -j DNAT --to 172.16.42.182:5000 iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 80 -j DNAT --to 172.16.42.182:80 iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 21 -j DNAT --to 172.16.42.182:21 iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 32400 -j DNAT --to 172.16.42.182:32400 iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 5000 -j DNAT --to 172.16.42.182:5000 iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 80 -j DNAT --to 172.16.42.182:80 iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 21 -j DNAT --to 172.16.42.182:21 iptables -A INPUT -i wlan0 -p tcp -m multiport --dports 32400,5000,80,21 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -o br-lan -p tcp -m multiport --sports 32400,5000,80,21 -m state --state ESTABLISHED -j ACCEPT iptables -A INPUT -i wlan0 -p udp -m multiport --dports 32400,5000,80,21 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -o br-lan -p udp -m multiport --sports 32400,5000,80,21 -m state --state ESTABLISHED -j ACCEPT
Hope this helps some people out. And if anyone has any reccomendations for my setup I'd like to hear it