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.
|
3 years ago | |
---|---|---|
src | 3 years ago | |
.gitignore | 3 years ago | |
.npmrc | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
index.d.ts | 3 years ago | |
package.json | 3 years ago | |
test.js | 3 years ago |
README.md
Node UFW
Manipulate UFW (Linux distribution only, works best on Ubuntu) via Node.js.
System Requirements
Only supported on Node.js version 14 or above, and Ubuntu version 18 or above.
Installation
# npm user
$ npm install node-ufw
# yarn user
$ 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();
LICENSE
MIT