找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2448|回复: 3

[openwrt(x86)] PVE LXC安装官方官方openwrt教程

[复制链接]
一直用的梅林的固件路由,这次终于下定决心花点时间整整软路由了。因为弱电箱太小了,所以里面放不下路由,放了光猫+网管交换机,然后划分vlan,现在打算用软路由替代梅林路由。
pve版本为7.2,openwrt版本为22.03.3,建议使用22版本,使用21版本dhcp有问题,其他lan口设备无法访问外网(看论坛有人说是防火墙不兼容),22这个版本也有一个问题就是dnsmaq无法正常运行,导致dhcp无法启动,其他设备无法获取ip,后面找到国外论坛一个网友的方案解决了。
下图为网络架构图

openwrt 22.03.3下载地址(支持LXC):https://downloads.openwrt.org/releases/22.03.3/targets/x86/64/openwrt-22.03.3-x86-64-rootfs.tar.gz
下面开始安装openwrt
  • 先下载openwrt文件到CT模板
  • 然后安装
    1. pct create 108 local:vztmpl/openwrt-22.03.3-x86-64-rootfs.tar.gz --rootfs local:8 --ostype unmanaged --hostname OpenWrt --arch amd64 --cores 2 --memory 1024 --swap 0 -net0 bridge=vmbr0,name=eth0
    2. mkdir /var/lib/vz/snippets
    3. cp /usr/share/pve-docs/examples/guest-example-hookscript.pl /var/lib/vz/snippets/hookscript.pl
    复制代码
    修改hookscript.pl内容
    1.         在第36行可以找到以下内容
    2.         # Second phase 'post-start' will be executed after the guest
    3.         # successfully started.

    4.         print "$vmid started successfully.\n";

    5. 修改为
    6.         # Second phase 'post-start' will be executed after the guest
    7.         # successfully started.
    8.         system("lxc-device add -n $vmid /dev/ppp");
    9.         system("lxc-device add -n $vmid /dev/net/tun");
    10.         print "$vmid started successfully.\n";
    复制代码




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
遇到同样的问题,看看国外的网友怎么解决的?

点评

这个帖子发布系统出了问题,看这个完整的 https://www.right.com.cn/forum/thread-8276823-1-1.html  详情 回复 发表于 2023-2-20 00:10
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
kinkit 发表于 2023-2-19 23:46
遇到同样的问题,看看国外的网友怎么解决的?

这个帖子发布系统出了问题,看这个完整的
https://www.right.com.cn/forum/thread-8276823-1-1.html
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我学习!我骄傲!恩山论坛你我的家园!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 01:33

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表