====== host2.shackspace.de ====== {{tag> infrastructure computing }} Proxmox VE Server für Internetdinge. **LXCs Stand 2023-02-04**\\ [Quelle: pct list] ^ ID ^ name ^ status ^ (keine) Management der LXCs entweder über Webfrontend https://host2.shackspace.de:8006, oder über Kommandozeile, Tool `pct`. lxc-* ist nicht anzuraten. Die LXC-Configuration wird dynamisch erzeugt. ===== Grundinstallation ===== * Proxmox 7.1 ISO gebootet * Alles ZFS, dann Datenteil verschlüsseln zfs destroy rpool/data zfs create -o encryption=on -o keylocation=prompt -o keyformat=passphrase rpool/data # passphrase im passbolt reboot # Proxmox Community Repositories apt install extrepo extrepo enable proxmox-pve sed -i 's/^/#/' /etc/apt/sources.list.d/pve-enterprise.list apt install apt-dater # rpcbind disable, wird nicht verwendet und ist public erreichbar systemctl stop rpcbind.socket rpcbind.service systemctl disable rpcbind.socket rpcbind.service systemctl mask rpcbind.socket rpcbind.service ==== tinc zur Migration host1/host2 ==== apt install tinc mkdir -p /etc/tinc/inetpriv/hosts cat <<'EOF' >/etc/tinc/inetpriv/tinc.conf Name = $HOST Mode = switch BindToAddress = * 656 Hostnames = yes GraphDumpFile = /tmp/inetpriv.gv ConnectTo = tom #ConnectTo = host2.shackspace.de EOF cat <<'EOF' >/etc/tinc/inetpriv/tinc-up #!/bin/sh brctl addif vmbr000 $INTERFACE ip link set dev $INTERFACE up EOF chmod +x /etc/tinc/inetpriv/tinc-up tincd -n inetpriv -K mv /etc/tinc/inetpriv/hosts/inetpriv /etc/tinc/inetpriv/hosts/host2 cat <<'EOF' >/etc/tinc/inetpriv/hosts/tom Address = host1.shackspace.de Port 656 -----BEGIN RSA PUBLIC KEY----- ... EOF ufw allow 656 comment 'tinc/656 inetpriv' systemctl enable tinc@inetpriv systemctl start tinc@inetpriv ==== Firewall Regeln extra ==== Basis kommt über ansible # IP Forwarding cat <<'EOF' >/etc/sysctl.d/99-local.conf net.ipv4.ip_forward=1 EOF sysctl --system ufw route allow in on vmbr999 out on vmbr000 to 192.168.146.101 port 25 proto tcp ===== ZFS unlock nach Boot ===== zfs load-key -a zfs mount -a # eventuell, falls der Timeout schon abgelaufen ist und die Gäste nicht laufen: zfs restart zfs-volume-wait.service # nur wegen der Optik pvenode startall ===== Aktuelles Debian Template holen ===== pveam update TEMPLATE=$(pveam available --section system | grep ' debian-11' | tail -n1 | cut -d' ' -f2- | sed "s/[[:space:]]//g") TEMPLATESTORAGE=local pveam download $TEMPLATESTORAGE $TEMPLATE