From 660ab4c40f7763031b2f5be4d8d794dd8f9ee440 Mon Sep 17 00:00:00 2001 From: Dustyn Blackmore Date: Tue, 8 May 2018 08:13:03 +1000 Subject: [PATCH] Minor Restructure Configuration of tool now stored in project root ./config. Updated 'src/config/*.json with property to describe this. Updated .gitignore to now hide these files (So they are not commited) --- .gitignore | 2 ++ src/config/interfaces.json | 2 +- src/config/rules.json | 17 +++++++++++++++++ src/index.js | 6 +++--- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 00cbbdf..32b1511 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,5 @@ typings/ # dotenv environment variables file .env +# Configuration (Interfaces, and Rules) +config/*.json diff --git a/src/config/interfaces.json b/src/config/interfaces.json index d02c421..134ab62 100644 --- a/src/config/interfaces.json +++ b/src/config/interfaces.json @@ -10,7 +10,7 @@ "zone": "trusted" }, "wlp3s0b1": { - "zone": "untrusted" + "zone": "trusted" } } } diff --git a/src/config/rules.json b/src/config/rules.json index 163e87d..11a1fc7 100644 --- a/src/config/rules.json +++ b/src/config/rules.json @@ -1,4 +1,5 @@ { + "detail": "This file should be copied into './config/' and setup as necessary.", "rules": { "incoming": { "_1": "ICMP", @@ -161,6 +162,22 @@ "acceptAction": null, "rejectAction": null }, + "2083": { + "acceptAction": null, + "rejectAction": null + }, + "2087": { + "acceptAction": null, + "rejectAction": null + }, + "2096": { + "acceptAction": null, + "rejectAction": null + }, + "3142": { + "acceptAction": null, + "rejectAction": null + }, "9092": { "acceptAction": null, "rejectAction": null diff --git a/src/index.js b/src/index.js index 619cfda..a0c170e 100644 --- a/src/index.js +++ b/src/index.js @@ -25,10 +25,10 @@ const buffer = 131070; process.stdout.write('\x1Bc'); -let rules = require('./config/rules.json').rules; -let systemInterfaces = require('./config/interfaces.json').interfaces; +let rules = require('./../config/rules.json').rules; +let systemInterfaces = require('./../config/interfaces.json').interfaces; -let configWatch = fs.watch('./src/config', checkConfig); +let configWatch = fs.watch('./config', checkConfig); function checkConfig (err, filename) { setTimeout(() => {