阿里云安装openwrt
注意:EFI 镜像成功,其他镜像失败
server1
wget -c https://mirrors.aliyun.com/openwrt/releases/23.05.5/targets/x86/64/openwrt-23.05.5-x86-64-generic-ext4-combined-efi.img.gzgunzip openwrt-23.05.5-x86-64-generic-ext4-combined-efi.img.gz
server2
apt install -y sshfs -ymkdir /tmp/isosshfs -p 22 root@10.2.0.33:/root /tmp/isolsblk
dd if=/tmp/iso/openwrt-23.05.5-x86-64-generic-ext4-combined-efi.img of=/dev/vda
阿里云控制台远程连接,重启,成功
配置网络
vi /etc/config/network"config interface 'lan' option device 'br-lan' option proto 'dhcp'"/etc/init.d/network restart
禁用 IPV6
echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.confsysctl -p /etc/sysctl.conf
国内源
sed -i 's_downloads.openwrt.org_mirrors.aliyun.com/openwrt_' /etc/opkg/distfeeds.conf
磁盘扩容 (https://openwrt.org/docs/guide-user/advanced/expand_root)
wget -U "" -O expand-root.sh "https://openwrt.org/_export/code/docs/guide-user/advanced/expand_root?codeblock=0". ./expand-root.shopkg updateopkg install parted losetup resize2fssh /etc/uci-defaults/70-rootpt-resize
VPN SITE TO SITE
- WireGuard
- strongSwan:复杂,性能好
- Libreswan:简单,兼容性好
opkg updateopkg install libreswan iptables