feat: add logic to disable DHCP when enabling the firewall in Proxmox component for improved configuration management

This commit is contained in:
2025-12-02 07:26:27 -05:00
parent bc2171511c
commit 538084ef60

View File

@@ -148,6 +148,11 @@ class Firewall extends Component
$newState = $currentState ? 0 : 1;
$payload = ['enable' => $newState];
// If enabling firewall, also disable DHCP
if ($newState === 1) {
$payload['dhcp'] = 0;
}
$response = $this->firewallRequest(
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/firewall/options',
'put',