u盘启动盘制作
从官网下载combined-squashfs.img.gz镜像,为何不使用ext4镜像,因为squashfs镜像可以恢复,ext4改就改了,没有Overlay机制。
启动盘制作工具,使用etcher工具进行制作u盘启动盘。
配置访问luc地址
手动修改远程电脑IP,主要是使用192.168.1网段的ip:
zhangyalin@zylMBP ~ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is SHA256:nQtJsw1hyqjQbsiAi1MfBRpj1FoNM9YrxR4khhrgh0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
BusyBox v1.30.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 19.07.2, r10947-65030d81f3
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# passwd
Changing password for root
New password:
Retype password:
passwd: password for root changed by root
root@OpenWrt:~# uci set network.lan.ipaddr=192.168.2.1
root@OpenWrt:~# uci commit network
root@OpenWrt:~# ifup lan
再次修改远端电脑IP地址为192.168.2.的网段:
再次远程验证:
✘ zhangyalin@zylMBP ~ ssh root@192.168.2.1
The authenticity of host '192.168.2.1 (192.168.2.1)' can't be established.
RSA key fingerprint is SHA256:nQtJsw1hyqjQbsiAi1MfBRpj1FoNM9YrxR4khhrgh0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.1' (RSA) to the list of known hosts.
root@192.168.2.1's password:
BusyBox v1.30.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 19.07.2, r10947-65030d81f3
-----------------------------------------------------
root@OpenWrt:~#
并且在web页面看看luc:
看到这个web界面,说明ip修改成功。
配置opkg代理
假设远程电脑,能够正常连接互联网,也有代理服务器,找到如下web界面,修改opkg配置文件:
在配置文件加入一行,远程电脑ip地址和对应代理端口,例如:
option http_proxy http://192.168.2.8:7890/
点击保存生效,然后验证代理是否生效,点击“Update lists…”如下图:
等待一段时间看到如下图即可:
配置绿联usb千兆网口驱动
安装usbutils包和kmod-usb-net-asix-ax88179包,即可。usbutils确定OpenWrt连接USB网卡型号,根据网卡型号来下载需要驱动包,这里我需要kmod-usb-net-asix-ax88179包来驱动绿联千兆网卡。安装好usb网卡驱动之后,就可以在网卡界面对这个USB网卡进行使用来。根据自身不同的网络结构来进行不同的设置,这里每个人情况不同有不同的使用方式。这里不写了。
配好lan和wan的设置后,到这一步OpenWrt最基础的配置就完成了,现在的OpenWrt可以正常上网。