Hyper-v建lede软路由随笔

win10 hyper-v启用-单物理网卡
本机通过虚拟机网络上网
http://firmware.koolshare.cn/LEDE_X64_fw867/
下载链接
虚拟机转盘或PE下写盘专用
http://firmware.koolshare.cn/LEDE_X64_fw867/虚拟机转盘或PE下写盘专用/openwrt-koolshare-mod-v2.31-r10822-50aa0525d1-x86-64-uefi-gpt-squashfs.vmdk

openwrt-koolshare-mod-v2.31-r10822-50aa0525d1-x86-64-uefi-gpt-squashfs.vmdk

这个版本是第二代

StarWind V2V Converter 用这个软件把vmdk转换成vhdx格式
https://www.starwindsoftware.com/starwind-v2v-converter#download

在D盘新建文件夹hyper-v/owrtx86,转换好的vhdx放在这里
转换步骤
Local file
选择从koolshare下载的文件
Local file
VHD/VHDX
这一步比较关键VHDX growable image和VHDX pre-allocated image这两个选项都是可以的
选动态或预分配硬盘都可以

然后先配置虚拟交换机
新建一个内部网络和一个外部网络,名字随便取,或者internalonly内部和bridge外部
bridge外部,选一个可以上网的物理网卡,
Allow management operating system to share this network adapter
允许管理操作系统共享此网络适配器
前面的勾一定要去掉,
原因:如果不去掉,你软路由开不开机,宿主机都只是通过原来的这个物理网卡上网。
如果关掉了,那么,他就只能选用internalonly内部通过软路由上网

接下来新建虚拟机
第三步选第二代
选择已有硬盘,选刚转换的vhdx路径
新建完成,先不要启用,右击打开虚拟机设置,安全,把 启用安全启动 勾去掉
配置默认的网卡为内部internalonly
然后新建一个硬件设备,选网络,网络选外部bridge

然后启动虚拟机

启动以后,本机修改internalonly虚拟网卡信息
192.168.1.2
255.255.255.0
192.168.1.1
223.5.5.5
223.6.6.6

然后同意此网络,然后浏览器输入192.168.1.1进入软路由设置
默认密码koolshare

然后进阶修改为192.168.32.1

https://github.com/kuoruan/openwrt-v2ray/releases
https://github.com/ntop/n2n

hyperv的网络
外部: 内网机器可以连接宿主机和虚拟机
内部: 虚拟机和宿主机之间连接
专用: 虚拟机与虚拟机之间连接

域名解析解决网络
echo "nameserver 114.114.114.114">/tmp/resolv.conf
rm -f /var/lock/opkg.lock
opkg update

然后安装xl2tpd
https://www.bbsmax.com/A/A7zgAXmP54/
https://blog.csdn.net/ypbsyy/article/details/81325906
https://www.right.com.cn/forum/thread-2899028-1-1.html

opkg update
opkg install xl2tpd
opkg install l2tpd
vi /etc/xl2tpd/xl2tpd.conf
vi /etc/ppp/options.xl2tpd

后面加强制执行参数 --force-depends

例如:

opkg install libffmpeg-full --force-depends

其它lede版本
https://downloads.openwrt.org/releases/19.07.4/targets/x86/64/

https://netflixcn.com/miji/46.htmlhttps://netflixcn.com/miji/id-46.html__page-2路由器IP:192.168.2.1账号:root密码:netflixcn.comhttps://github.com/Lienol/openwrthttps://itcao.com/2018/10271925.htmlhttps://github.com/felix-fly/v2ray-openwrthttps://github.com/teddysun/v2ray-plugin
https://github.com/IvanSolis1989/OpenWrt-DIY
https://github.com/coolsnowwolf/lede/releaseshttps://github.com/AlexZhuo/luci-app-redsocks2
https://drive.google.com/drive/folders/1o6tJA7aE_TkBRcQmEBlD1twObe0DKBSe

src/gz openwrt_core https://mirror.0x.sg/openwrt/snapshots/targets/x86/64/packages
src/gz openwrt_base https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/base
src/gz openwrt_luci https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/luci
src/gz openwrt_packages https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/packages
src/gz openwrt_routing https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/routing

src/gz openwrt_core https://mirror.0x.sg/openwrt/snapshots/targets/x86/64/packages
src/gz openwrt_base https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/base
src/gz openwrt_helloworld https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/helloworld
src/gz openwrt_lienol https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/lienol
src/gz openwrt_luci https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/luci
src/gz openwrt_packages https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/packages
src/gz openwrt_passwall https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/passwall
src/gz openwrt_routing https://mirror.0x.sg/openwrt/snapshots/packages/x86_64/routing

KCPTUN ss-redir ipset haproxy
redsock
https://wgjstc.com/blog/2013/11/09/openwrt-shi-xian-socket5dai-li-tou-ming-hua-yi-ji-ke-lu-you/
https://blog.csdn.net/zyb418/article/details/84673413

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注