其实很简单,主要是被那些radio0, lan, wan什么的搞懵了
root@OpenWrt:/etc/config# cat network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'wan'
option proto 'dhcp'
option defaultroute '1'
config wifi-device wlan0
option type mac80211
option channel 9
option hwmode 11ng
option path 'platform/ar933x_wmac'
option htmode HT20
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1
config wifi-iface
option device wlan0
option network wan
option mode sta
option ssid 'SSID'
option encryption psk
option key 'PASSWORD'
: Change the firewall configuration
Edit the /etc/config/firewall file and locate the WAN zone definition. Disable masquerading and set the incoming traffic policy to ACCEPT:
config 'zone'
option 'name' 'wan'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'mtu_fix' '1'
option 'masq' '0'
Proceed with adding a new forwarding section allowing traffic flow from WAN to LAN:
config 'forwarding'
option 'src' 'wan'
option 'dest' 'lan'