From 2c73a8af03c247896ae98f02d7a60b73808a41c8 Mon Sep 17 00:00:00 2001 From: ppom <> Date: Sat, 28 Oct 2023 12:00:00 +0200 Subject: [PATCH] update confs --- app/example.yml | 3 +-- config/server.jsonnet | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/example.yml b/app/example.yml index 2c00f23..5671dec 100644 --- a/app/example.yml +++ b/app/example.yml @@ -21,8 +21,7 @@ patterns: # Those commands will be executed in order at start, before everything else start: - [ 'ip46tables', '-w', '-N', 'reaction' ] - - [ 'ip46tables', '-w', '-A', 'reaction', '-j', 'ACCEPT' ] - - [ 'ip46tables', '-w', '-I', 'reaction', '1', '-s', '127.0.0.1', '-j', 'ACCEPT' ] + - [ 'ip46tables', '-w', '-A', 'reaction', '-j', 'RETURN' ] - [ 'ip46tables', '-w', '-I', 'INPUT', '-p', 'all', '-j', 'reaction' ] # Those commands will be executed in order at stop, after everything else diff --git a/config/server.jsonnet b/config/server.jsonnet index 71ecd3d..8766e2c 100644 --- a/config/server.jsonnet +++ b/config/server.jsonnet @@ -19,6 +19,16 @@ local banFor(time) = { }, }, + start: [ + ['ip46tables', '-w', '-N', 'reaction'], + ['ip46tables', '-w', '-I', 'INPUT', '-p', 'all', '-j', 'reaction'], + ], + stop: [ + ['ip46tables', '-w', '-D', 'INPUT', '-p', 'all', '-j', 'reaction'], + ['ip46tables', '-w', '-F', 'reaction'], + ['ip46tables', '-w', '-X', 'reaction'], + ], + streams: { // Ban hosts failing to connect via ssh ssh: {