|
本帖最后由 jshensh 于 2018-10-11 15:44 编辑
研究了好久。。终于把无线热点开起来了
1. 先开启 3.14 内核无线模块
- modprobe dhd && echo dhd >> /etc/modules
复制代码
2. 由于和后续的 dnsmasq 冲突,需要关掉系统自带的 systemd-resolved 服务
- systemctl stop systemd-resolved
- systemctl disable systemd-resolved
复制代码
3. 安装要用的 dnsmasq 和 net-tools 组件
- apt install dnsmasq net-tools
复制代码
4. 下载并安装 create_ap 工具
- git clone https://github.com/oblique/create_ap
- cd create_ap/
- make install
复制代码
5. 将以下内容保存至 /usr/bin/startap 。注意别忘了修改 YourSSIDHere YourPasswordHere 两个参数。如果有需要使用 2.4GHz 网络的,请去掉 --freq-band 5 --ieee80211ac 参数
- #!/bin/bash
- nohup /usr/bin/create_ap wlan0 eth0 YourSSIDHere YourPasswordHere --freq-band 5 --ieee80211ac --no-virt > /dev/null 2>&1 &
复制代码
随后执行
- chmod +x /usr/bin/startap
复制代码
6. 最后添加开机自启动项,将以下内容保存至 /usr/lib/systemd/system/ap.service
这是在 5GHz 下的测速结果
2.4GHz
有线
由于日常开发使用 .test 域名进行测试,所以需要在 N1 上做个劫持,有需要的可以看看
1. 清空 /etc/resolv.conf 内容
2. 编辑 /etc/resolvconf/resolv.conf.d/head 文件,修改为
3. 编辑 /etc/dnsmasq.conf 文件,在最后插入
- strict-order
- listen-address=127.0.0.1,192.168.12.1
- address=/.test/192.168.12.1
- resolv-file=/etc/resolv.dnsmasq.conf
复制代码
4. 将以下内容保存至 /etc/resolv.dnsmasq.conf
5. 编辑 /etc/default/dnsmasq,将 IGNORE_RESOLVCONF=yes 前的注释去掉
6. 重载 dnsmasq
- /etc/init.d/dnsmasq reload
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
评分
-
查看全部评分
|