Hi first time posting in this forum. Recently got openwrt on my raspberry pi and got an AP to host by following the tutorials on the forum. However, the tutorials online only show the configurations for hosting an AP based on a pre-existing lan interface/connection, like so:
config wifi-iface 'wifi_ap'
option network 'lan'
option mode 'ap'
option device 'radio3'
option ssid 'getoffmywifi'
option encryption 'none'
However when I tried to host using a wan network, I was not able to get any traffic through the AP:
config wifi-iface 'wifi_ap'
option network 'wwan' #what does this even mean???
option mode 'ap'
option device 'radio3'
option ssid 'getoffmywifi'
option encryption 'none'
I was able to work around it by hosting using hostapd directly and configuring iptables forwarding rules.
iptables -A FORWARD -i wlan1 -o wlan0 -m state --state ESTABLISHED, RELATED -j ACCEPT
iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT
*where wlan1 is the STA and wlan0 is the AP hosted with
My question(s) is why does this configuration work but using the Openwrt configuration menus not? How does Openwrt forward internet to the AP's clients?