File tree Expand file tree Collapse file tree 4 files changed +38
-1
lines changed
Expand file tree Collapse file tree 4 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ install:
1616 -t $(DESTDIR ) /etc/opensnitchd/
1717 @install -Dm644 network_aliases.json \
1818 -t $(DESTDIR ) /etc/opensnitchd/
19+ @install -Dm600 data/rules/* $(DESTDIR ) /etc/opensnitchd/rules/
1920 @systemctl daemon-reload
2021
2122opensnitchd : $(SRC )
Original file line number Diff line number Diff line change 150150 "Hook" : " output" ,
151151 "Policy" : " accept" ,
152152 "Rules" : [
153+ {
154+ "Enabled" : false ,
155+ "Position" : " 0" ,
156+ "Description" : " allow localhost connections" ,
157+ "Parameters" : " " ,
158+ "Expressions" : [
159+ {
160+ "Statement" : {
161+ "Op" : " ==" ,
162+ "Name" : " ip" ,
163+ "Values" : [
164+ {
165+ "Key" : " daddr" ,
166+ "Value" : " 127.0.0.0-127.255.255.255"
167+ }
168+ ]
169+ }
170+ }
171+ ],
172+ "Target" : " accept" ,
173+ "TargetParameters" : " "
174+ },
153175 {
154176 "Enabled" : true ,
155177 "Position" : " 0" ,
Original file line number Diff line number Diff line change 11daemon/default-config.json etc/opensnitchd/
22daemon/system-fw.json etc/opensnitchd/
3- daemon//network_aliases.json etc/opensnitchd/
3+ daemon/network_aliases.json etc/opensnitchd/
4+ daemon/data/rules/* etc/opensnitchd/rules/
45ebpf_prog/opensnitch.o usr/lib/opensnitchd/ebpf/
56ebpf_prog/opensnitch-dns.o usr/lib/opensnitchd/ebpf/
67ebpf_prog/opensnitch-procs.o usr/lib/opensnitchd/ebpf/
Original file line number Diff line number Diff line change @@ -69,6 +69,19 @@ install -m 644 ebpf_prog/opensnitch.o %{buildroot}/usr/lib/opensnitchd/ebpf/open
6969install -m 644 ebpf_prog/opensnitch-dns.o %{buildroot }/usr/lib/opensnitchd/ebpf/opensnitch-dns.o
7070install -m 644 ebpf_prog/opensnitch-procs.o %{buildroot }/usr/lib/opensnitchd/ebpf/opensnitch-procs.o
7171
72+ B= ""
73+ r= "/etc/opensnitchd/rules/000-allow-localhost.json"
74+ if [ -f $r ]; then
75+ B= "-b"
76+ fi
77+ install -m 600 $B daemon/data/rules/000-allow-localhost.json %{buildroot }$r
78+ B= ""
79+ r= "/etc/opensnitchd/rules/000-allow-localhost6.json"
80+ if [ -f $r ]; then
81+ B= "-b"
82+ fi
83+ install -m 600 $B daemon/data/rules/000-allow-localhost6.json %{buildroot }$r
84+
7285# upgrade, uninstall
7386%preun
7487systemctl stop opensnitch.service || true
You can’t perform that action at this time.
0 commit comments