2023.10.03

This commit is contained in:
spiritlhl 2023-10-03 12:11:06 +00:00
parent 99c24ef54a
commit cbf797e87f
6 changed files with 25 additions and 17 deletions

View file

@ -1,5 +1,11 @@
# 更新日志
2023.09.16
- 修复DNS修补过程中可能存在的判断漏洞
- 修复可能存在的ndp的sysctl设置问题
- 修复可能存在的网关的路由缓存问题,增加自动修复的守护进程
2023.09.15
- 迁移了KVM镜像中Centos8-Stream的所在地址

View file

@ -13,11 +13,9 @@
## 更新
2023.09.16
2023.10.03
- 修复DNS修补过程中可能存在的判断漏洞
- 修复可能存在的ndp的sysctl设置问题
- 修复可能存在的网关的路由缓存问题,增加自动修复的守护进程
- 修复开设带IPV6地址的虚拟机时网关顺序错配的问题
[更新日志](CHANGELOG.md)

View file

@ -1,7 +1,7 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.08.23
# 2023.10.03
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
# ./buildvm.sh 102 test1 1234567 1 512 5 40001 40002 40003 50000 50025 debian11 local N
@ -279,8 +279,8 @@ if [ "$independent_ipv6" == "y" ]; then
if [ "$ipv6_prefixlen" -le 64 ]; then
if [ ! -z "$ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gateway" ] && [ ! -z "$ipv6_address_without_last_segment" ]; then
if grep -q "vmbr2" /etc/network/interfaces; then
qm set $vm_num --ipconfig0 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --ipconfig1 ip=${user_ip}/24,gw=172.16.1.1
qm set $vm_num --ipconfig0 ip=${user_ip}/24,gw=172.16.1.1
qm set $vm_num --ipconfig1 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888
qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844
independent_ipv6_status="Y"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.08.23
# 2023.10.03
# 自动选择要绑定的IPV4地址
# ./buildvm_extraip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 是否附加IPV6(默认为N)
# ./buildvm_extraip.sh 152 test1 1234567 1 512 5 debian11 local N
@ -297,7 +297,11 @@ fi
_green "The current IP to which the VM will be bound is: ${user_ip}"
_green "当前虚拟机将绑定的IP为${user_ip}"
qm create $vm_num --agent 1 --scsihw virtio-scsi-single --serial0 socket --cores $core --sockets 1 --cpu host --net0 virtio,bridge=vmbr0,firewall=0
if [ "$independent_ipv6" == "n" ]; then
qm create $vm_num --agent 1 --scsihw virtio-scsi-single --serial0 socket --cores $core --sockets 1 --cpu host --net0 virtio,bridge=vmbr0,firewall=0
else
qm create $vm_num --agent 1 --scsihw virtio-scsi-single --serial0 socket --cores $core --sockets 1 --cpu host --net0 virtio,bridge=vmbr0,firewall=0 --net1 virtio,bridge=vmbr2,firewall=0
fi
if [ "$system_arch" = "x86" ]; then
qm importdisk $vm_num /root/qcow/${system}.qcow2 ${storage}
else
@ -320,8 +324,8 @@ if [ "$independent_ipv6" == "y" ]; then
if [ "$ipv6_prefixlen" -le 64 ]; then
if [ ! -z "$ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gateway" ] && [ ! -z "$ipv6_address_without_last_segment" ]; then
if grep -q "vmbr2" /etc/network/interfaces; then
qm set $vm_num --ipconfig0 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --ipconfig1 ip=${user_ip}/${user_ip_range},gw=${gateway}
qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway}
qm set $vm_num --ipconfig1 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888
qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844
independent_ipv6_status="Y"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.08.23
# 2023.10.03
# 手动指定要绑定的IPV4地址
# ./buildvm_manual_ip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 IPV4地址 是否附加IPV6(默认为N)
@ -327,8 +327,8 @@ if [ "$independent_ipv6" == "y" ]; then
if [ "$ipv6_prefixlen" -le 64 ]; then
if [ ! -z "$ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gateway" ] && [ ! -z "$ipv6_address_without_last_segment" ]; then
if grep -q "vmbr2" /etc/network/interfaces; then
qm set $vm_num --ipconfig0 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --ipconfig1 ip=${user_ip}/${user_ip_range},gw=${gateway}
qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway}
qm set $vm_num --ipconfig1 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888
qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844
independent_ipv6_status="Y"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# from
# https://github.com/spiritLHLS/pve
# 2023.08.23
# 2023.10.03
# 自动选择要绑定的IPV6地址
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘
# ./buildvm_onlyv6.sh 152 test1 1234567 1 512 5 debian11 local
@ -246,8 +246,8 @@ qm set $vm_num --ide2 ${storage}:cloudinit
qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888
qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844
user_ip="172.16.1.${num}"
qm set $vm_num --ipconfig0 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --ipconfig1 ip=${user_ip}/24,gw=172.16.1.1
qm set $vm_num --ipconfig0 ip=${user_ip}/24,gw=172.16.1.1
qm set $vm_num --ipconfig1 ip6="${ipv6_address_without_last_segment}${vm_num}/128",gw6="${ipv6_address_without_last_segment}1"
qm set $vm_num --cipassword $password --ciuser $user
sleep 5
qm resize $vm_num scsi0 ${disk}G