summaryrefslogtreecommitdiff
path: root/sentinel-fwlogs/files
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-11-05 11:08:59 +0100
committerKarel Kočí <cynerd@email.cz>2020-11-05 11:08:59 +0100
commit59cbf758e1965f7127e337983a4f3e38f8233e4d (patch)
tree213424910c603e85788518d9ec6b34de00623225 /sentinel-fwlogs/files
parent9aa4f21cf22502060841830300d5d02907e3f5a4 (diff)
downloadopenwrt-personal-pkgs-59cbf758e1965f7127e337983a4f3e38f8233e4d.tar.gz
openwrt-personal-pkgs-59cbf758e1965f7127e337983a4f3e38f8233e4d.tar.bz2
openwrt-personal-pkgs-59cbf758e1965f7127e337983a4f3e38f8233e4d.zip
Remove packages merged to turris-os-packages
Diffstat (limited to 'sentinel-fwlogs/files')
-rw-r--r--sentinel-fwlogs/files/defaults.sh2
-rwxr-xr-xsentinel-fwlogs/files/init25
-rwxr-xr-xsentinel-fwlogs/files/restart-proxy-hook.sh5
-rwxr-xr-xsentinel-fwlogs/files/sentinel-firewall.sh37
-rwxr-xr-xsentinel-fwlogs/files/uci-defaults19
5 files changed, 0 insertions, 88 deletions
diff --git a/sentinel-fwlogs/files/defaults.sh b/sentinel-fwlogs/files/defaults.sh
deleted file mode 100644
index 78345b4..0000000
--- a/sentinel-fwlogs/files/defaults.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-DEFAULT_NFLOG_GROUP="1914"
-DEFAULT_NFLOG_THRESHOLD="32"
diff --git a/sentinel-fwlogs/files/init b/sentinel-fwlogs/files/init
deleted file mode 100755
index 955b333..0000000
--- a/sentinel-fwlogs/files/init
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-USE_PROCD=1
-START=99
-STOP=10
-
-
-start_service() {
- source /lib/functions/sentinel.sh
- source /usr/libexec/sentinel/fwlogs-defaults.sh
- allowed_to_run "fwlogs" || return 1
-
- config_load sentinel
- local nflog_group nflog_threshold
- config_get nflog_group fwlogs nflog_group "$DEFAULT_NFLOG_GROUP"
-
- procd_open_instance
- procd_set_param command /usr/bin/sentinel-fwlogs
- procd_append_param command --nflog-group="$nflog_group"
- procd_set_param respawn 3600 5 5
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_set_param file /etc/config/sentinel
- procd_close_instance
-}
diff --git a/sentinel-fwlogs/files/restart-proxy-hook.sh b/sentinel-fwlogs/files/restart-proxy-hook.sh
deleted file mode 100755
index 938adf4..0000000
--- a/sentinel-fwlogs/files/restart-proxy-hook.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# restart Sentinel:FWLogs service
-/etc/init.d/sentinel-fwlogs restart
-# Apply logging rules
-/etc/init.d/firewall reload
diff --git a/sentinel-fwlogs/files/sentinel-firewall.sh b/sentinel-fwlogs/files/sentinel-firewall.sh
deleted file mode 100755
index e066b16..0000000
--- a/sentinel-fwlogs/files/sentinel-firewall.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-set -e
-. "${0%/*}/common.sh"
-. /lib/functions.sh
-. /lib/functions/sentinel.sh
-. /usr/libexec/sentinel/fwlogs-defaults.sh
-
-allowed_to_run "fwlogs" 2>/dev/null || return 0
-
-
-config_load "sentinel"
-config_get nflog_group fwlogs nflog_group "$DEFAULT_NFLOG_GROUP"
-config_get nflog_threshold fwlogs nflog_threshold "$DEFAULT_NFLOG_THRESHOLD"
-
-
-fwlogs_logging() {
- local config_section="$1"
- local zone enabled
- config_get zone "$config_section" "name"
- config_get_bool enabled "$config_section" "sentinel_fwlogs" "0"
- [ "$enabled" = "1" ] || return 0
-
- report_operation "Logging of zone '$zone'"
- for fate in DROP REJECT; do
- local chain="zone_${zone}_src_${fate}"
- iptables_chain_exists "$chain" || continue
- report_info "$fate"
- iptables -I "$chain" 1 \
- -m comment --comment "!sentinel: fwlogs" \
- -j NFLOG \
- --nflog-group "$nflog_group" \
- --nflog-threshold "$nflog_threshold"
- done
-}
-
-config_load "firewall"
-config_foreach fwlogs_logging "zone"
diff --git a/sentinel-fwlogs/files/uci-defaults b/sentinel-fwlogs/files/uci-defaults
deleted file mode 100755
index c3c2644..0000000
--- a/sentinel-fwlogs/files/uci-defaults
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-set -e
-. /lib/functions/sentinel-firewall.sh
-
-# fwlogs entry in sentinel config
-if [ "$(uci -q get sentinel.fwlogs)" != "fwlogs" ]; then
- uci -q batch <<EOT
- delete sentinel.fwlogs
- set sentinel.fwlogs='fwlogs'
- commit sentinel.fwlogs
-EOT
-fi
-
-
-# Enable for default interface
-config_firewall_default_enable "sentinel_fwlogs"
-
-# Always reload firewall to use latest version of sentinel-firewall script
-/etc/init.d/firewall reload