I have a wifi access point that I'm connecting to through my Raspberry Pi on wlan0. I have a DHCP server setup on my Raspberry Pi to give out addresses on eth0. I have an old router setup attached to eth0, which is then just transmitting its own access point and doing some other stuff.
It kinda looks like this:
[main wifi AP] <-wlan0-> [raspberry pi] <- pi's eth0 -> (router/client)
The DHCP server is giving out addresses just fine, but I'm having trouble getting the traffic to route from eth0 to wlan0 (not sure if that makes any sense). I can also ssh into the pi without issue too.
I am using a couple of rules for iptables to try to do this, but it doesn't seem to be working at all. I cannot connect to any address outside of the local network. E.g., I can't connect to the DNS server that the main AP gave out through DHCP to my Raspberry Pi, whether I use the router in between the Pi & laptop.
Here is the dump of
# Generated by iptables-save v1.4.21 on Wed Feb 24 01:11:24 2016 *nat :PREROUTING ACCEPT [1:32] :INPUT ACCEPT [1:32] :OUTPUT ACCEPT [7:432] :POSTROUTING ACCEPT [5:336] -A POSTROUTING -o eth0 -j MASQUERADE COMMIT # Completed on Wed Feb 24 01:11:24 2016 # Generated by iptables-save v1.4.21 on Wed Feb 24 01:11:24 2016 *filter :INPUT ACCEPT [3:140] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [5:308] -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i eth0 -o wlan0 -j ACCEPT COMMIT # Completed on Wed Feb 24 01:11:24 2016
Anyone have any ideas as to why it can't connect outside of the local network?