Node.js interface to UFW forked to allow execution of your Node process as non-root user.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ray-1337 1c65695303 only include important files 3 years ago
.github Create FUNDING.yml 3 years ago
docs added logging method 3 years ago
src added logging method 3 years ago
.gitignore first commit + meta tweaks 3 years ago
.npmignore added .npmignore 3 years ago
.npmrc added npmrc 3 years ago
LICENSE added MIT license 3 years ago
README.md Update README.md 3 years ago
index.d.ts remove default from exports 3 years ago
index.js added index.js endpoint 3 years ago
package.json only include important files 3 years ago
test.js platform checking 3 years ago

README.md

Node UFW

Manipulate UFW (Linux distribution only, works best on Ubuntu) via Node.js.

This module is under development. Use with caution.

System Requirements

Only supported on Node.js version 14 or above, and Ubuntu version 18 or above.

This also requires root access, or else you'll get an error from ufw itself/password prompt from Ubuntu.

Installation

# npm
$ npm install node-ufw

# yarn
$ yarn add node-ufw

Usage

const nodeUfw = require("node-ufw");

await nodeUfw.allow.port(6379);
await nodeUfw.deny.port(25565, "udp");

await nodeUfw.allow.address("192.168.0.1");
await nodeUfw.deny.address("192.168.0.1", 80);
await nodeUfw.allow.address("192.168.0.1", 6379, "udp");

await nodeUfw.enable();

Documentations

See DOCS.

LICENSE

See LICENSE.