1 |
jpp |
1.1 |
diff -Nur e-smith-packetfilter-2.6.0.old/createlinks e-smith-packetfilter-2.6.0/createlinks |
2 |
|
|
--- e-smith-packetfilter-2.6.0.old/createlinks 2021-03-04 16:01:39.921000000 -0500 |
3 |
jpp |
1.5 |
+++ e-smith-packetfilter-2.6.0/createlinks 2021-03-05 01:25:40.537000000 -0500 |
4 |
|
|
@@ -21,18 +21,12 @@ |
5 |
jpp |
1.1 |
safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq"); |
6 |
|
|
} |
7 |
|
|
|
8 |
|
|
-my %service2order = |
9 |
|
|
-( |
10 |
|
|
- # Set up the packet filter rules before bringing up networks. |
11 |
|
|
- # But, after the bootstrap-console has had a chance to configure masq |
12 |
|
|
- masq => "36", |
13 |
|
|
-); |
14 |
jpp |
1.5 |
+my $event ="e-smith-packetfilter-update"; |
15 |
|
|
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ulogd"); |
16 |
|
|
+event_link("systemd-reload", $event, "89"); |
17 |
|
|
+event_link("systemd-default", $event, "88"); |
18 |
|
|
+templates2events("/etc/logrotate.d/ulogd", $event); |
19 |
|
|
|
20 |
jpp |
1.1 |
-foreach my $service (keys %service2order) |
21 |
|
|
-{ |
22 |
|
|
-# removed for systemd |
23 |
|
|
-# service_link_enhanced($service, $service2order{$service}, 7); |
24 |
|
|
-} |
25 |
|
|
|
26 |
|
|
#systemd |
27 |
|
|
foreach my $target (qw(multi-user sme-server)) |
28 |
jpp |
1.5 |
@@ -41,6 +35,7 @@ |
29 |
jpp |
1.1 |
|
30 |
|
|
foreach my $unit (qw( |
31 |
|
|
masq.service |
32 |
|
|
+ ulogd.service |
33 |
|
|
)) |
34 |
|
|
{ |
35 |
|
|
symlink("../$unit", |
36 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/status e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/status |
37 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/status 1969-12-31 19:00:00.000000000 -0500 |
38 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/status 2021-03-04 16:38:38.292000000 -0500 |
39 |
|
|
@@ -0,0 +1 @@ |
40 |
|
|
+enabled |
41 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/type e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/type |
42 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/defaults/ulogd/type 1969-12-31 19:00:00.000000000 -0500 |
43 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/defaults/ulogd/type 2021-03-04 16:38:26.949000000 -0500 |
44 |
|
|
@@ -0,0 +1 @@ |
45 |
|
|
+service |
46 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/force/ulogd/status e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status |
47 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/db/configuration/force/ulogd/status 1969-12-31 19:00:00.000000000 -0500 |
48 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/db/configuration/force/ulogd/status 2021-03-04 16:39:04.280000000 -0500 |
49 |
|
|
@@ -0,0 +1 @@ |
50 |
|
|
+enabled |
51 |
jpp |
1.5 |
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log |
52 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log 1969-12-31 19:00:00.000000000 -0500 |
53 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/ulogd/50log 2021-03-05 01:22:20.009000000 -0500 |
54 |
|
|
@@ -0,0 +1,23 @@ |
55 |
|
|
+/var/log/ulogd/ulogd.log { |
56 |
|
|
+ missingok |
57 |
|
|
+ notifempty |
58 |
|
|
+ weekly |
59 |
|
|
+ compress |
60 |
|
|
+ sharedscripts |
61 |
|
|
+ postrotate |
62 |
|
|
+ /usr/bin/systemctl reload ulogd > /dev/null 2>&1 |
63 |
|
|
+ endscript |
64 |
|
|
+} |
65 |
|
|
+ |
66 |
|
|
+/var/log/iptables/*.log { |
67 |
|
|
+ missingok |
68 |
|
|
+ notifempty |
69 |
|
|
+ daily |
70 |
|
|
+ compress |
71 |
|
|
+ sharedscripts |
72 |
|
|
+ postrotate |
73 |
|
|
+ /usr/bin/systemctl reload ulogd > /dev/null 2>&1 |
74 |
|
|
+ endscript |
75 |
|
|
+} |
76 |
|
|
+ |
77 |
|
|
+ |
78 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/10global e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/10global |
79 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/10global 1969-12-31 19:00:00.000000000 -0500 |
80 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/10global 2021-03-05 00:42:31.135000000 -0500 |
81 |
|
|
@@ -0,0 +1,7 @@ |
82 |
|
|
+[global] |
83 |
|
|
+nlgroup=1 |
84 |
jpp |
1.4 |
+logfile=/var/log/ulogd/ulogd.log |
85 |
jpp |
1.5 |
+loglevel=5 |
86 |
|
|
+rmem=131071 |
87 |
|
|
+bufsize=150000 |
88 |
|
|
+ |
89 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/20plugins e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/20plugins |
90 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/20plugins 1969-12-31 19:00:00.000000000 -0500 |
91 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/20plugins 2021-03-05 00:46:44.053000000 -0500 |
92 |
|
|
@@ -0,0 +1,38 @@ |
93 |
jpp |
1.1 |
+ |
94 |
|
|
+###################################################################### |
95 |
|
|
+# PLUGIN OPTIONS |
96 |
|
|
+###################################################################### |
97 |
|
|
+# We have to configure and load all the plugins we want to use |
98 |
|
|
+# general rules: |
99 |
|
|
+# |
100 |
|
|
+# 0. don't specify any plugin for ulogd to load them all |
101 |
|
|
+# 1. load the plugins _first_ from the global section |
102 |
|
|
+# 2. options for each plugin in seperate section below |
103 |
jpp |
1.5 |
+ |
104 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_inppkt_NFLOG.so" |
105 |
jpp |
1.5 |
+plugin="/usr/lib64/ulogd/ulogd_inppkt_ULOG.so" |
106 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_inppkt_UNIXSOCK.so" |
107 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFCT.so" |
108 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_filter_IFINDEX.so" |
109 |
jpp |
1.5 |
+plugin="/usr/lib64/ulogd/ulogd_filter_IP2STR.so" |
110 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_filter_IP2BIN.so" |
111 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_filter_IP2HBIN.so" |
112 |
jpp |
1.5 |
+plugin="/usr/lib64/ulogd/ulogd_filter_PRINTPKT.so" |
113 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_filter_HWHDR.so" |
114 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_filter_PRINTFLOW.so" |
115 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_filter_MARK.so" |
116 |
jpp |
1.5 |
+plugin="/usr/lib64/ulogd/ulogd_output_LOGEMU.so" |
117 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_output_SYSLOG.so" |
118 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_XML.so" |
119 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_SQLITE3.so" |
120 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_GPRINT.so" |
121 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_NACCT.so" |
122 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_PCAP.so" |
123 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_PGSQL.so" |
124 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_MYSQL.so" |
125 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_DBI.so" |
126 |
jpp |
1.5 |
+plugin="/usr/lib64/ulogd/ulogd_raw2packet_BASE.so" |
127 |
jpp |
1.1 |
+#plugin="/usr/lib64/ulogd/ulogd_inpflow_NFACCT.so" |
128 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_GRAPHITE.so" |
129 |
|
|
+#plugin="/usr/lib64/ulogd/ulogd_output_JSON.so" |
130 |
|
|
+ |
131 |
jpp |
1.5 |
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/30stacks e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/30stacks |
132 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/30stacks 1969-12-31 19:00:00.000000000 -0500 |
133 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/30stacks 2021-03-05 00:47:14.410000000 -0500 |
134 |
|
|
@@ -0,0 +1,4 @@ |
135 |
|
|
+ |
136 |
|
|
+#our base stack ULOG to LOGEMU |
137 |
|
|
+stack=ulog1:ULOG,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU |
138 |
|
|
+ |
139 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/40configs e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/40configs |
140 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/40configs 1969-12-31 19:00:00.000000000 -0500 |
141 |
jpp |
1.6 |
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/40configs 2021-03-05 01:29:19.297000000 -0500 |
142 |
jpp |
1.5 |
@@ -0,0 +1,10 @@ |
143 |
|
|
+[ulog1] |
144 |
|
|
+# denylog: |
145 |
|
|
+# netlink multicast group (the same as the iptables --ulog-nlgroup param) |
146 |
|
|
+nlgroup=1 |
147 |
jpp |
1.1 |
+ |
148 |
|
|
+ |
149 |
jpp |
1.5 |
+[emu1] |
150 |
jpp |
1.6 |
+file="/var/log/iptables/denylog.log" |
151 |
jpp |
1.5 |
+sync=1 |
152 |
jpp |
1.1 |
+ |
153 |
jpp |
1.5 |
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic |
154 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/e-smith/templates/etc/ulogd.conf/basic 2008-10-07 13:36:41.000000000 -0400 |
155 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/e-smith/templates/etc/ulogd.conf/basic 1969-12-31 19:00:00.000000000 -0500 |
156 |
|
|
@@ -1,12 +0,0 @@ |
157 |
|
|
-[global] |
158 |
|
|
-nlgroup=1 |
159 |
|
|
-logfile=/dev/stdout |
160 |
|
|
-loglevel=5 |
161 |
|
|
-rmem=131071 |
162 |
|
|
-bufsize=150000 |
163 |
|
|
-plugin={ -f "/usr/lib64/ulogd/ulogd_BASE.so" ? "/usr/lib64/ulogd/ulogd_BASE.so" : "/usr/lib/ulogd/ulogd_BASE.so" } |
164 |
|
|
-plugin={ -f "/usr/lib64/ulogd/ulogd_LOGEMU.so" ? "/usr/lib64/ulogd/ulogd_LOGEMU.so" : "/usr/lib/ulogd/ulogd_LOGEMU.so" } |
165 |
|
|
- |
166 |
|
|
-[LOGEMU] |
167 |
jpp |
1.1 |
-file="/dev/stdout" |
168 |
jpp |
1.5 |
-sync=1 |
169 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/etc/yum/post-actions/ulogd.action e-smith-packetfilter-2.6.0/root/etc/yum/post-actions/ulogd.action |
170 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/etc/yum/post-actions/ulogd.action 1969-12-31 19:00:00.000000000 -0500 |
171 |
|
|
+++ e-smith-packetfilter-2.6.0/root/etc/yum/post-actions/ulogd.action 2021-03-05 01:28:09.563000000 -0500 |
172 |
|
|
@@ -0,0 +1 @@ |
173 |
|
|
+ulogd:any:/sbin/e-smith/expand-template /etc/logrotate.d/ulogd |
174 |
jpp |
1.1 |
diff -Nur e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf |
175 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf 1969-12-31 19:00:00.000000000 -0500 |
176 |
|
|
+++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/sme-server.target.d/53koozali.conf 2021-03-04 16:36:47.274000000 -0500 |
177 |
|
|
@@ -0,0 +1,3 @@ |
178 |
|
|
+[Unit] |
179 |
|
|
+Wants=ulogd.service |
180 |
|
|
+ |
181 |
|
|
diff -Nur e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service |
182 |
|
|
--- e-smith-packetfilter-2.6.0.old/root/usr/lib/systemd/system/ulogd.service 1969-12-31 19:00:00.000000000 -0500 |
183 |
jpp |
1.7 |
+++ e-smith-packetfilter-2.6.0/root/usr/lib/systemd/system/ulogd.service 2021-03-05 01:49:07.788000000 -0500 |
184 |
jpp |
1.5 |
@@ -0,0 +1,17 @@ |
185 |
jpp |
1.1 |
+[Unit] |
186 |
|
|
+Description=Netfilter Userspace Logging Daemon |
187 |
|
|
+Before=masq.service |
188 |
|
|
+ |
189 |
|
|
+[Service] |
190 |
jpp |
1.2 |
+User=root |
191 |
|
|
+Group=root |
192 |
|
|
+Restart=always |
193 |
|
|
+TimeoutSec=0 |
194 |
jpp |
1.1 |
+Type=forking |
195 |
jpp |
1.2 |
+ |
196 |
jpp |
1.7 |
+PIDFile=/var/run/ulog/ulogd.pid |
197 |
|
|
+ExecStart=/usr/sbin/ulogd --daemon --uid ulog --pidfile /var/run/ulog/ulogd.pid |
198 |
jpp |
1.5 |
+ExecReload=/bin/kill -HUP $MAINPID |
199 |
jpp |
1.1 |
+ |
200 |
|
|
+[Install] |
201 |
|
|
+WantedBy=sme-server.target multi-user.target |