From 5c5fc171626178cc9a3820d3ff5274cf9f837502 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Sat, 22 Apr 2023 21:00:28 +0800 Subject: [PATCH] Update buildct.sh --- back/buildct.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/back/buildct.sh b/back/buildct.sh index 4cfb408..959eb74 100644 --- a/back/buildct.sh +++ b/back/buildct.sh @@ -34,12 +34,11 @@ else num=$((first_digit - 2))$second_digit$third_digit fi user_ip="172.16.1.${num}" -pct create $CTID local:vztmpl/$system --cores $core --cpuunits 1024 --memory $memory --swap 128 --rootfs local:${disk} --onboot 1 +pct create $CTID local:vztmpl/$system --cores $core --cpuunits 1024 --memory $memory --swap 128 --rootfs local:${disk} --onboot 1 -password $password pct start $CTID pct set $CTID --hostname $CTID pct set $CTID --net0 name=eth0,ip=${user_ip}/24,bridge=vmbr1,gw=172.16.1.1 pct set $CTID --nameserver 8.8.8.8 --nameserver 8.8.4.4 -pct set $CTID --password $password iptables -t nat -A PREROUTING -p tcp --dport ${sshn} -j DNAT --to-destination ${user_ip}:22 iptables -t nat -A PREROUTING -p tcp -m tcp --dport ${web1_port} -j DNAT --to-destination ${user_ip}:80