环境

CHAOS CALMER (15.05.1, r48532)
校园网使用iNode智能客户端认证,使用802.1x协议

参考

B同学的教程(涉及隐私不给出连接)

操作

安装wpad

路由器可以连上互联网,ssh登陆后

  1. root@OpenWrt:~# opkg remove wpad-mini #卸载pwad-mini
  2. root@OpenWrt:~# opkg update #更新软件列表
  3. root@OpenWrt:~# opkg install wpad #安装wpad

路由器无法上网

1.电脑去openwrt站点下载wpad
参考玩openwrt的基础中对于openwrt网站目录的分析,选择合适的软件,以NETGEAR WNDR3700v4为例,依次打开/chaos_calmer系统/15.05.1版本/ar71xxCPU型号/nand flash型号/packages 要下载软件/base基础包
ctrl+f搜索 wpad,下载wpad_2015-03-25-1_ar71xx.ipk
2.上传安装
通过winscp等把wpad_2015-03-25-1_ar71xx.ipk 上传到/tmp

  1. root@OpenWrt:~# opkg remove wpad-mini #卸载pwad-mini
  2. root@OpenWrt:~# cd /tmp
  3. root@OpenWrt:/tmp# opkg install wpad_2015-03-25-1_ar71xx.ipk

opkg 后面可以跟哪些内容 1 源里面提供的安装包 例如 opkg install wpad 2 本地的ipk安装包 opkg install /tmp/wpad_2015-03-25-1_ar71xx.ipk 3 安装包的下载地址 opkg install http://openwrt.8800.org:82/luci-app-oray.ipk

配置wpad

找个文件夹建个配置文件,如

  1. vi /etc/8021x.confvi /etc/8021x.conf

填入

  1. ctrl_interface=/var/run/wpa_supplicant
  2. ap_scan=0
  3. network={
  4. key_mgmt=IEEE8021X
  5. eap=MD5
  6. identity="上网账号"
  7. password="上网密码"
  8. eapol_flags=0
  9. }

启动配置

  1. root@OpenWrt:/tmp# wpa_supplicant -i eth0.2 -B -D wired -c /etc/8021x.conf
  • eth0.2 wan口的网卡,可通过vi /etc/config/network查看,其中config interface 'wan'下面option ifname选项就是wan口网卡名称
  • /etc/8021x.conf为配置文件

    添加开机启动

    推荐装完Luci 后操作,Luci的安装装完openwrt的操作
    假设已经装完了Luci
    Luci —>系统—>启动项—>
    本地启动脚本中加入 (sleep 15 ; wpa_supplicant -i eth0.2 -B -D wired -c /etc/8021x.conf)&

作者:cndaqiang
链接:https://www.jianshu.com/p/fb60a4e3465f
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。