下载 img镜像 https://downloads.openwrt.org/releases/22.03.2/targets/x86/generic/openwrt-22.03.2-x86-generic-generic-squashfs
https://downloads.openwrt.org/releases/22.03.2/targets/x86/generic/openwrt-22.03.2-x86-generic-generic-squashfs-combined-efi.img.gz
# 解压gzip -d openwrt-22.03.2-x86-generic-generic-squashfs-combined-efi.img.gz #vmware虚拟机# img转化vmdkqemu-img convert -f raw -O vmdk openwrt-22.03.2-x86-generic-generic-squashfs-combined-efi.img openwrt.vmdk#如果是VirtualBox虚拟机使用以下方法转化VBoxManage convertfromraw --fORMat VDI openwrt-22.03.2-x86-generic-generic-squashfs-combined-efi.img openwrt.vdi
链接:Https://pan.xunlei.com/s/VNJGzGHyiZXCALkz6UN7vWYoA1#提取码:z9n8
# vim /etc/config/networkconfig interface 'lan'option device 'br-lan'option proto 'static'option ipaddr '192.168.10.18'option netmask '255.255.255.0'. option gateway '192.168.10.1' <<<<<<---添加option dns '114.114.114.114 8.8.8.8' <<<<<<---添加option ip6assign '60'#重启网卡生效 /etc/init.d/network restart #顺便修改一下密码root@OpenWrt:~# passwd Changing passWord for rootNew password: Bad password: too weakRetype password: passwd: password for root changed by root
安装以下步骤安装中文包和其他软件包
搜索 (luci-i18n-base-zh-cn)包
重启OpenWrt生效
opkg updateopkg install luci-i18n-base-zh-cn#wireguard软件一起装opkg install wireguard luci-app-wireguard luci-i18n-wireguard-zh-cn wireguard-tools
为 wg 接口配置“私钥”、“公钥”、“监听端口”、“IP 地址”。
如果你已经有准备好的“私钥”、“公钥”,则直接粘贴进去即可。
如果没有,则可以点击界面上的“生成新的密钥对”按钮,会自动随机生成密钥并填充。
监听端口:按需自定义一个公网能访问的端口号。
IP 地址:按需自定义一个 IP 地址,这个 IP 是路由器自身作为一个 WireGuard 节点所使用的 IP,不可与路由器上的其它网段相同,书写格式需要附带 IP 掩码位,例如:10.13.13.168/32
##如下图即可
测试机192.168.10.17
登录路由器把原来的网关改成 OpenWrt的ip 即可
来源地址:https://blog.csdn.net/weixin_42562106/article/details/128324109
--结束END--
本文标题: OpenWrt 安装 WireGuard
本文链接: https://www.lsjlt.com/news/374358.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
2024-06-11
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0