下载适用于您设备的 OpenWrt 固件
https://downloads.openwrt.org/releases/22.03.2/targets/x86/64/openwrt-22.03.2-x86-64-generic-ext4-combined-efi.img.gz
到 pve 主机执行,102 是 pve vm id
1
2
3
| wget https://downloads.openwrt.org/releases/22.03.2/targets/x86/64/openwrt-22.03.2-x86-64-generic-ext4-combined.img.gz
gunzip openwrt-22.03.2-x86-64-generic-ext4-combined.img.gz
qm importdisk 102 openwrt-22.03.2-x86-64-generic-ext4-combined.img local-lvm
|
网络配置#
vim /etc/config/network
1
2
3
4
5
6
7
8
| config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.50.64'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.50.1'
list dns '192.168.50.1'
|
service network restart
扩容分区#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| opkg update
opkg install block-mount e2fsprogs
opkg update
opkg install fdisk blkid vim
# fdisk add partation sda3
mkfs.ext4 /dev/sda3
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot
reboot
|
第三方仓库#
src/gz openwrt_kiddin9 https://op.supes.top/packages/x86_64
删除 opkg 配置中的 option check_signature
安装软件#
openclash adguardhome
配置接口 lan:关闭 DHCP
界面报错#
luci-compat
tailscale#
https://github.com/adyanth/openwrt-tailscale-enabler
1
2
3
4
5
6
| wget https://github.com/adyanth/openwrt-tailscale-enabler/releases/download/v1.32.2-98e126e-autoupdate/openwrt-tailscale-enabler-v1.32.2-98e126e-autoupdate.tgz
tar x -zvC / -f openwrt-tailscale-enabler-<tag>.tgz
opkg update
opkg install libustream-openssl ca-bundle kmod-tun iptables-nft
/etc/init.d/tailscale start
tailscale up --accept-dns=false --advertise-routes=192.168.50.0/24
|
subnet router 无效
添加防火墙 NAT 规则,防火墙 开启转发 accept