使用openwrt设置Guest Wifi网络
2016-10-09 21:29
681 查看
以下脚本在openwrt路由器上创建一个SSID为Guest-WIFI的访客网络,该网不设置安全检查,能访问外网,但不能访问家庭网络上的资源。
## Add a guest network
uci set network.guest=interface
uci set network.guest.type=bridge
uci set network.guest.proto=static
uci set network.guest.ipaddr=192.168.2.1
uci set network.guest.netmask=255.255.255.0
## Set DHCP for guest network
uci set dhcp.guest=dhcp
uci set dhcp.guest.interface=guest
uci set dhcp.guest.start=100
uci set dhcp.guest.limit=150
uci set dhcp.guest.leasetime=12h
## Add a Guest AP
uci add wireless wifi-iface
uci set wireless.@wifi-iface[1].network=guest
uci set wireless.@wifi-iface[1].device=radio0
uci set wireless.@wifi-iface[1].mode=ap
uci set wireless.@wifi-iface[1].encryption=none
uci set wireless.@wifi-iface[1].ssid=Guest-WIFI
## Add a guest zone
uci set firewall.guest=zone
uci set firewall.guest.name=guest
uci set firewall.guest.network=guest
uci set firewall.guest.input=ACCEPT
uci set firewall.guest.output=ACCEPT
uci set firewall.guest.forward=ACCEPT
## Allow forwarding from guest to wan
uci set firewall.guest2wan=forwarding
uci set firewall.guest2wan.src=guest
uci set firewall.guest2wan.dest=wan
## Allow forwarding from lan to guest
uci set firewall.lan2guest=forwarding
uci set firewall.lan2guest.src=lan
uci set firewall.lan2guest.dest=guest
## Apply changes
uci commit
/etc/init.d/network restart
转自:http://blog.csdn.net/boliang319/article/details/41116051
## Add a guest network
uci set network.guest=interface
uci set network.guest.type=bridge
uci set network.guest.proto=static
uci set network.guest.ipaddr=192.168.2.1
uci set network.guest.netmask=255.255.255.0
## Set DHCP for guest network
uci set dhcp.guest=dhcp
uci set dhcp.guest.interface=guest
uci set dhcp.guest.start=100
uci set dhcp.guest.limit=150
uci set dhcp.guest.leasetime=12h
## Add a Guest AP
uci add wireless wifi-iface
uci set wireless.@wifi-iface[1].network=guest
uci set wireless.@wifi-iface[1].device=radio0
uci set wireless.@wifi-iface[1].mode=ap
uci set wireless.@wifi-iface[1].encryption=none
uci set wireless.@wifi-iface[1].ssid=Guest-WIFI
## Add a guest zone
uci set firewall.guest=zone
uci set firewall.guest.name=guest
uci set firewall.guest.network=guest
uci set firewall.guest.input=ACCEPT
uci set firewall.guest.output=ACCEPT
uci set firewall.guest.forward=ACCEPT
## Allow forwarding from guest to wan
uci set firewall.guest2wan=forwarding
uci set firewall.guest2wan.src=guest
uci set firewall.guest2wan.dest=wan
## Allow forwarding from lan to guest
uci set firewall.lan2guest=forwarding
uci set firewall.lan2guest.src=lan
uci set firewall.lan2guest.dest=guest
## Apply changes
uci commit
/etc/init.d/network restart
转自:http://blog.csdn.net/boliang319/article/details/41116051
相关文章推荐
- 使用openwrt设置Guest Wifi网络
- 使用openwrt设置Guest Wifi网络
- 使用openwrt设置Guest Wifi网络
- 使用openwrt设置Guest Wifi网络
- 使用openwrt设置Guest Wifi网络
- 使用openwrt设置Guest Wifi网络
- OPENWRT使用命令行设置无线和有线网络
- OPENWRT使用命令行设置无线和有线网络
- OpenWrt使用命令行设置有线无线网络,安装luci
- OPENWRT使用命令行设置无线和有线网络
- 使用命令行设置树莓派的 wifi 网络
- 使用命令行设置树莓派的wifi网络
- OPENWRT使用命令行设置无线和有线网络
- OPENWRT使用命令行设置无线和有线网络
- Flex编译参数设置 ,不使用网络
- 在vb中使用Iphlpapi.dll获取网络信息 第二章 第十五节 设置本机默认的生存时间(time-to-live:TTL)值
- 利用WIN7无线承载网络设置WIFI热点,让M9无线上网
- linux下DHCP服务器设置――让自己的智能手机上自己的wifi网络
- Win7下有线网络与无线网络使用优先级设置
- 修改XP默认只能使用guest帐户进行网络访问的办法