From a04028c7cc438a70ae1eee915476764c8700fd66 Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 17 Jul 2023 21:44:09 -0400 Subject: [PATCH] fix syntax of ufw command --- src/methods/Deny.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/methods/Deny.ts b/src/methods/Deny.ts index 4abafa9..6cc8e35 100644 --- a/src/methods/Deny.ts +++ b/src/methods/Deny.ts @@ -32,7 +32,7 @@ async function address(address: string, port?: number, protocol?: PortProtocol) if (!checkPort) return false; }; - let command = await runCommand(`echo "y" | sudo ufw ${shouldDryRunDuringTesting} ufw insert 1 deny from ${address} ${port ? `to any port ${port}` : ""} ${protocol ? `proto ${protocol}` : ""}`); + let command = await runCommand(`echo "y" | sudo ufw ${shouldDryRunDuringTesting} insert 1 deny from ${address} ${port ? `to any port ${port}` : ""} ${protocol ? `proto ${protocol}` : ""}`); return command ? isAddedOrUpdated(command) : false; } catch (err) { throw err;