instance($run); $node = (string) $run->context('node'); $vmid = (int) $run->context('vmid'); $pve = $this->pve->forHost($instance->host); $this->guest($pve, $run, 'hostnamectl set-hostname '.escapeshellarg($instance->subdomain)); // Allow HTTP/HTTPS, deny everything else (management stays on the tunnel). $pve->applyFirewall($node, $vmid, [ ['type' => 'in', 'action' => 'ACCEPT', 'proto' => 'tcp', 'dport' => '80'], ['type' => 'in', 'action' => 'ACCEPT', 'proto' => 'tcp', 'dport' => '443'], ]); return StepResult::advance(); } }