export declare function isValidPort(port: number): boolean;
export interface FirewallPortsInput {
    configText: string;
    /** The desired extra ports (SSH/80/443 stripped, deduped, sorted). */
    ports: number[];
}
/** Normalize a port list: integers in range, minus the always-open set, unique + sorted. */
export declare function normalizePorts(ports: number[]): number[];
export declare function addFirewallPort(configText: string, port: number, existing?: number[]): string;
export declare function removeFirewallPort(configText: string, port: number, existing?: number[]): string;
/**
 * Rewrite `compute.firewall.allowedPorts` to exactly `ports`. Creates the
 * `firewall` object and/or the `allowedPorts` array if missing.
 */
export declare function setFirewallPorts(input: FirewallPortsInput): string;
