I am trying to build a sort of captive portal out of a RPi3. I started by creating an access point following these instructions. Next I configured dnsmasq to point all traffic on wlan0 at itself.
echo 'address=/#/172.24.1.1' >> /etc/dnsmasq.conf
Once connected all traffic is redirected back to my node app. Now here is where my problem begins. All traffic gets sent to my node app, including traffic that originates from the raspberry pi, so while on the box I am unable to telnet to any websites, or install apps.
I believe the issue is with the iptable rules.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
I need all traffic that originates from the raspberry pi to be able to go out to the internet (through
eth0)and all traffic that comes in through
wlan0 to continue to redirect to my node app.
Any help would be greatly appreciated.