文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
DIR-505 Router 模式翻墙教程
/usr/bin/router 代码:
#!/bin/sh
# Author: https://github.com/softwaredownload/openwrt-fanqiang
# Date: 2014-08-22
cp /etc/config/backup/* /etc/config/
uci delete network.lan.ifname
uci delete network.lan.type
uci add network interface
uci rename network.@interface[-1]='wan'
uci commit network
uci set network.wan.ifname='eth1'
uci set network.wan.peerdns=0
uci set network.wan.proto='pppoe'
uci set network.wan.username='wan-username'
uci set network.wan.password='wan-password'
uci set network.wan.peerdns=0
uci commit network
# default is no this option
#uci set dhcp.lan.ignore=0
#uci commit dhcp
uci set wireless.@wifi-device[0].channel=11
uci set wireless.@wifi-device[0].txpower=15
uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-device[0].country='CN'
uci set wireless.@wifi-iface[0].mode='ap'
uci set wireless.@wifi-iface[0].ssid='eastking-dir505'
uci set wireless.@wifi-iface[0].encryption='psk2'
uci set wireless.@wifi-iface[0].key='icanfly9876'
uci commit wireless
wifi
/etc/init.d/network restart
代码说明:
先把备份的原始配置文件覆盖到配置文件目录,所有设置都基于原始配置文件。 在使用 Router 模式时,有线接口为 WAN 口,这时 wan 的 interface name 是 eth1, 默认 lan 的 interface name 使用了 eth1, 要删除。
代码的最新版本,请查看:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论