用incus 开 NAT 小鸡
开小鸡条件
1、公网ipv4 vps一台做母鸡。注意:不能是NAT(必须) 2、ipv6(非必须):如果你的母鸡支持ipv6 /64,可以给小小鸡直接分配ipv6 如果没有,可以注册 he.net 账号,利用 he.net 的ipv6 隧道服务实现小小鸡ipv6 公网的支持
步骤:
1、通过ssh连接你的vps 2、DD 重装系统(非必须)系统最好是debian 12, 也可以在主机商后台直接重装为debian12 我喜欢自己DD,命令如下: 没有安装wget curl的可以先安装一下
1 | apt update && apt install wget curl -y |
国外
1 | curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh wget -O ${_##*/} $_ |
国内
1 | curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh wget -O ${_##*/} $_ |
执行命令
1 | bash reinstall.sh debian 11 --ssh-port SSH端口 --password 密码 |
执行完输入 reboot 重启 等待重装完成 3、swap(可选)
1 | curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh |
默认 选1 一直回车就行
检测环境
使用后续脚本的务必执行本命令检测宿主机是否符合要求
1 | bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh) |
incus 安装
1 | curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh |
自定义批量生成版本
1 | curl -L https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh |
按提示生成即可 开完容器后,具体信息会生成在当前目录下的log文件中 使用 cat log查看已开容器 文章来源:https://www.nodeloc.com/t/topic/61325
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 畅想生活!
