Skip to content

Instantly share code, notes, and snippets.

@nodebotanist
Created July 21, 2016 23:21
Show Gist options
  • Save nodebotanist/0b5ba8000582f9b3f865bb3e7ba3dab5 to your computer and use it in GitHub Desktop.
Save nodebotanist/0b5ba8000582f9b3f865bb3e7ba3dab5 to your computer and use it in GitHub Desktop.
config 'dnsmasq'
option domainneeded 1
option boguspriv 1
option filterwin2k 0
option localise_queries 1
# disable rebind protection
option rebind_protection 0
# end changes
option rebind_localhost 0
option local '/lan/'
option domain 'lan'
option expandhosts 1
option nonegcache 0
option authoritative 1
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
config 'dhcp' 'lan'
option 'interface' 'lan'
option 'start' '100'
option 'limit' '150'
option 'leasetime' '12h'
option 'networkid' 'wlan0'
option ra server
option dhcpv6 server
config 'dhcp' 'wifi'
option 'interface' 'wwan'
option 'start' '100'
option 'limit' '150'
option 'leasetime' '12h'
option 'networkid' 'wlan0-1'
option ra server
option dhcpv6 server
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name lan
list network 'ethernet'
list network 'wifi'
list network 'lan'
# add wwan (wireless WAN) network
list network 'wan'
list network 'wan6'
list network 'wwan'
# end
option input ACCEPT
option output ACCEPT
option forward ACCEPT
# so devices can see each other
config 'forwarding'
option 'src' 'wifi'
option 'dest' 'wan'
config 'forwarding'
option 'src' 'lan'
option 'dest' 'wifi'
config 'forwarding'
option 'src' 'wifi'
option 'dest' 'lan'
onfig interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'wifi'
option proto 'dhcp'
config interface 'ethernet'
option ifname 'eth0'
option proto 'dhcp'
config interface 'lan'
option ifname 'eth0'
option proto 'static'
option type 'bridge'
# change IP to be a different subnet than the AP
option ipaddr '192.168.2.XXX'
# end changes
option netmask '255.255.255.0'
option ip6assign '60'
# add wwan section
config interface 'wwan'
option proto 'dhcp'
config switch 'mt7620'
option enable_vlan 0
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
# it says to comment this out, don't know why
# option path '10180000.wmac'
option htmode 'HT20'
option disabled '0'
# add the following section
config wifi-iface
option device radio0
option network wwan # matches interface value in /etc/config/network
option mode sta # launches wpa_supplicant
# The encryption and ssid values need to match those of the hotspot (AP)
option encryption psk2 # not recommended for deployment
option key 'home-wifi-password'
option ssid "Home SSID" # framing quote / apostrophe requ$
# End of changes
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option ssid 'my-tessel-ap'
option key 'ap-password'
option disabled '0'
@madskunker
Copy link

Did you ever get this to Forward requests from the wifi to the lan

@madskunker
Copy link

When I use your configs my device wont even bring up the LAN so I have to restore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment