FON2100E 刷 OpenWrt 設定公開與私有 Wifi

Openwrt logo

OpenWrt 設定雙 Wifi,公開 SSID 與私有 SSID 切開。

my /etc/config/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 'proto' 'static'
option 'ipaddr' '192.168.100.1'
option 'netmask' '255.255.255.0'
option 'ifname' 'ath0'
option 'defaultroute' '0'
option 'peerdns' '0'

config 'interface' 'wan'
option 'proto' 'dhcp'
option 'ifname' 'eth0'
option 'defaultroute' '0'
option 'peerdns' '0'

config 'interface' 'lan2'
option 'proto' 'static'
option 'ipaddr' '192.168.200.1'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'ifname' 'ath1'

my /etc/config/wireless

config 'wifi-device' 'wifi0' 
option 'type' 'atheros'
option 'channel' 'auto'
option 'disabled' '0'
option 'diversity' '0'

config 'wifi-iface'
option 'device' 'wifi0'
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'OpenWrt'
option 'encryption' 'psk2'
option 'key' '********'

config 'wifi-iface'
option 'device' 'wifi0'
option 'ssid' 'free'
option 'network' 'lan2'
option 'mode' 'ap'
option 'encryption' 'none'

my /etc/config/dhcp

config 'dnsmasq' 
option 'boguspriv' '1'
option 'localise_queries' '1'
option 'local' '/lan/'
option 'domain' 'lan'
option 'authoritative' '1'
option 'leasefile' '/tmp/dhcp.leases'
option 'resolvfile' '/tmp/resolv.conf.auto'
option 'filterwin2k' '1'
option 'readethers' '1'

config 'dhcp' 'lan'
option 'interface' 'lan'
option 'leasetime' '12h'
option 'start' '101'
option 'dynamicdhcp' '1'
option 'limit’ '10'
list 'dhcp_option' '6,8.8.8.8,8.8.4.4'

config 'dhcp' 'lan2'
option 'interface' 'lan2'
option 'start' '201'
option 'dynamicdhcp' '1'
option 'limit’ '10'
option 'leasetime' '6h'
list 'dhcp_option' '6,8.8.8.8,8.8.4.4'

my /etc/config/firewall

config 'defaults' 
option 'syn_flood' '1'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'

config 'zone'
option 'name' 'lan'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'

config 'zone'
option 'name' 'wan'
option 'input' 'REJECT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'masq' '1'
option 'mtu_fix' '1'

config 'zone'
option 'name' 'lan2'
option 'network' 'lan2'
option 'input' 'REJECT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'

config 'forwarding'
option 'src' 'lan'
option 'dest' 'wan'

config 'rule'
option 'src' 'wan'
option 'proto' 'udp'
option 'dest_port' '68'
option 'target' 'ACCEPT'

config 'include'
option 'path' '/etc/firewall.user'

config 'forwarding'
option 'src' 'lan2'
option 'dest' 'wan'

config 'rule'
option 'name' 'Allow DNS Queries'
option 'src' 'lan2'
option 'dest_port' '53'
option 'proto' 'tcpudp'
option 'target' 'ACCEPT'

config 'rule'
option 'name' 'Allow DHCP request'
option 'src' 'lan2'
option 'src_port' '67-68'
option 'dest_port' '67-68'
option 'proto' 'udp'
option 'target' 'ACCEPT'

config 'rule'
option 'name' 'Deny Guest -> LAN'
option 'src' 'lan2'
option 'dest' 'lan'
option 'proto' 'all'
option 'target' 'DROP'

留言

這個網誌中的熱門文章

[連動測距相機] Konica C35 Automatic (Flashmatic).1971

[傻瓜拍相機] 全世界第一台自動對焦相機,Konica C35 AF.1977

Lightroom.製作並匯出 Preset

[古典相機] 巧緻實用的簡單精神.Nikon FE.1978

[古典相機] Leica R4 原型.Minolta XD.世界第一台同時具有光圈先決和快門先決的相機.1977