0

I followed this guide https://pimylifeup.com/raspberry-pi-wireless-access-point/ on how to setup an Ethernet to WiFi access point using the built in RPi WiFi adapter successfully. I connected my phone via the Pi WiFi and could get online.

I then connected my Edimax EW-7811Un WiFi adapter with the hope of using it instead of the Ethernet as the Internet source.

I amended the iptables rules as follows:

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o wlan1 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT

My phone will connect to the RPi built in WiFi but it has no Internet access even though the Edimax adapter is connected to the Internet and I can browse the web from the Pi.

Any thoughts on why the Ethernet adapter will pass traffic but not the Edimax adapter?

Thanks

chrislacey
  • 96
  • 4
  • Have you enabled net.ipv4.ip_forward? Your iptables commands look fine. – Aloha Aug 02 '17 at 07:50
  • Yes I have enabled net.ipv4.ip_forward. When I have eth0 in place of wlan1, everything works fine, but as soon as I change it back to wlan1, no Internet on my connected devices – chrislacey Aug 02 '17 at 09:30
  • I have this exact setup in my dorm room in the past (wireless to wireless "repeater"). Try checking out my answer here: https://raspberrypi.stackexchange.com/a/39240/24224 – Aloha Aug 04 '17 at 08:48
  • Using your IP tables rules instead of the ones above seems to have made it work. I didn't need to set the default route or name server. Cheer mate – chrislacey Aug 04 '17 at 10:01
  • I think there's an error in the tutorial. I could not find any INPUT directive in the iptables commands. Heck, I couldn't find the word "input" in the entire page. Consequently, iptables knows what to forward where, but it's not accepting any traffic (to forward) in the first place. – Aloha Aug 04 '17 at 11:06

0 Answers0