fix confs iptables

This commit is contained in:
ppom
2023-11-05 12:00:00 +01:00
parent 611fa80385
commit 6ee78f45f2
2 changed files with 5 additions and 13 deletions

View File

@ -5,7 +5,7 @@
// JSONNET functions
local iptables(args) = ['ip46tables', '-w'] + args;
// ip46tables is a minimal C program (only POSIX dependencies) present as a subdirectory.
// ip46tables is a minimal C program (only POSIX dependencies) present in a subdirectory of this repo.
// it permits to handle both ipv4/iptables and ipv6/ip6tables commands
{
@ -24,12 +24,6 @@ local iptables(args) = ['ip46tables', '-w'] + args;
start: [
// Create an iptables chain for reaction
iptables(['-N', 'reaction']),
// Set its default to ACCEPT
iptables(['-A', 'reaction', '-j', 'ACCEPT']),
// Always accept 127.0.0.1
iptables(['-I', 'reaction', '1', '-s', '127.0.0.1', '-j', 'ACCEPT']),
// Always accept ::1
iptables(['-I', 'reaction', '1', '-s', '::1', '-j', 'ACCEPT']),
// Insert this chain as the first item of the INPUT chain (for incoming connections)
iptables(['-I', 'INPUT', '-p', 'all', '-j', 'reaction']),
],
@ -85,7 +79,7 @@ local iptables(args) = ['ip46tables', '-w'] + args;
// if you want reaction to run those pending commands before exiting, you can set this:
onexit: true,
// (defaults to false)
// here it is not useful because we will flush the chain containing the bans anyway
// here it is not useful because we will flush and delete the chain containing the bans anyway
// (with the stop commands)
},
},