forked from extern/shorewall_code
Compare commits
525 Commits
5.1.10-Bet
...
5.2.6-base
Author | SHA1 | Date | |
---|---|---|---|
|
418f96082e | ||
|
b761a6eaa0 | ||
|
d643f57bc1 | ||
|
d1c7b3d9da | ||
|
d399fd0815 | ||
|
3dc14e3575 | ||
|
7ba6ac71e3 | ||
|
10aef23ab1 | ||
|
e3f139bbdb | ||
|
e4f24f41fd | ||
|
d0e4c53bd0 | ||
|
43ac903085 | ||
|
28b92dae32 | ||
|
bac493c2c5 | ||
|
3ed1cdec94 | ||
|
3f5bdfd705 | ||
|
c9512dfaf8 | ||
|
5cc626fa1d | ||
|
a39ecf5b2b | ||
|
631bec2762 | ||
|
aa126270b7 | ||
|
af2b7e6fc1 | ||
|
01bfdabd5a | ||
|
c234a1a0ec | ||
|
4c50f3b9bf | ||
|
3390897a45 | ||
|
7ca18c410b | ||
|
e2aeed898d | ||
|
2eb1c88555 | ||
|
117e9ba5bd | ||
|
3ce04a8ef3 | ||
|
737aca6a3d | ||
|
d89d35a9f0 | ||
|
220e89755e | ||
|
1d875b2909 | ||
|
011638ad7d | ||
|
3f5c47695e | ||
|
fb14b0aafc | ||
|
54ab7cdeb5 | ||
|
aa47554604 | ||
|
07160c5ed1 | ||
|
527533ecb6 | ||
|
4ac64a545c | ||
|
6612ea6b8c | ||
|
2646ec79a5 | ||
|
023437a0e0 | ||
|
ffb6ac178e | ||
|
726d7cde65 | ||
|
c061d87919 | ||
|
5af7dce96b | ||
|
eb5bc3d8a4 | ||
|
b34474df11 | ||
|
16a3384a70 | ||
|
67b421dc00 | ||
|
c518887a19 | ||
|
5493a7e4a6 | ||
|
1093f1ac32 | ||
|
7882c87afe | ||
|
7343b19abc | ||
|
f27ab4704c | ||
|
e5e8e6fbc0 | ||
|
c11b647b1b | ||
|
5706c5a860 | ||
|
fd1d4a3f35 | ||
|
2bf9048057 | ||
|
d618fd5812 | ||
|
177cdb1b98 | ||
|
dddde56454 | ||
|
9b196e87e9 | ||
|
c30a4fd080 | ||
|
0a9d2d9a33 | ||
|
39de88563f | ||
|
e14798b4a2 | ||
|
3042ae815e | ||
|
86ebb22dd3 | ||
|
18360471ab | ||
|
086f7a0e6d | ||
|
057a2dec70 | ||
|
16af9ee2de | ||
|
cabadd4846 | ||
|
3c06be28be | ||
|
7d4d409799 | ||
|
32ca53706c | ||
|
0adb9c8f87 | ||
|
381d55760b | ||
|
88a799b860 | ||
|
5101a6be4a | ||
|
15ca726c49 | ||
|
27510d9ed6 | ||
|
f832846a8d | ||
|
64bf5882db | ||
|
6841fc9eb2 | ||
|
caa0290cb2 | ||
|
4e1262ec7e | ||
|
53b05aa5fb | ||
|
072053995c | ||
|
1be78f8f15 | ||
|
b6f5b6ba98 | ||
|
3c36d638a5 | ||
|
9d3da44dad | ||
|
a5d4cbd76c | ||
|
4e83d0788e | ||
|
a49a9f9f9d | ||
|
6dc99e77ae | ||
|
92b25d88b0 | ||
|
42a505c99d | ||
|
5e648a9379 | ||
|
ed2fa863c3 | ||
|
386dff4c33 | ||
|
e49f31fb42 | ||
|
3f0e4959a1 | ||
|
112c4dc38a | ||
|
137cc48779 | ||
|
f9003fab43 | ||
|
78da975989 | ||
|
be924ff765 | ||
|
6f484da821 | ||
|
82d2863b29 | ||
|
e855d03332 | ||
|
09712254e8 | ||
|
de39f7d3aa | ||
|
54a70e4632 | ||
|
c80462c283 | ||
|
a2e56492df | ||
|
3222a380c3 | ||
|
e82307f61e | ||
|
ae4f86a1e5 | ||
|
c33a72594c | ||
|
8496bf0ff3 | ||
|
a6c1cd6d7b | ||
|
2604378646 | ||
|
d24179173f | ||
|
803853c719 | ||
|
57f1f8658f | ||
|
0a34e4e685 | ||
|
b52a330f41 | ||
|
de761ac657 | ||
|
d3de75dd12 | ||
|
ca59556d44 | ||
|
639dc86e1b | ||
|
fa1aa4b481 | ||
|
3e2d7cf990 | ||
|
95d3486788 | ||
|
657673927c | ||
|
a345be20fb | ||
|
9f3534dc1f | ||
|
f63f0bb2f1 | ||
|
646f01a3a4 | ||
|
65e101f306 | ||
|
000f120c61 | ||
|
f221ca290f | ||
|
8b99f8caac | ||
|
8b2c79e5ce | ||
|
dcde2bfa4a | ||
|
1ec81b7d7b | ||
|
387b861759 | ||
|
f4e6d2fa56 | ||
|
6798c2f2b0 | ||
|
caa7475483 | ||
|
3f5e1b5b60 | ||
|
e8f49bc9c7 | ||
|
5021154867 | ||
|
f831d9a988 | ||
|
31b558b7f9 | ||
|
367a5f7d97 | ||
|
4efac2fda1 | ||
|
5f50b70618 | ||
|
b437f609e5 | ||
|
b897fe2b9d | ||
|
802ff1da4e | ||
|
f05bd969af | ||
|
7aaa04149e | ||
|
093e55083c | ||
|
c9eb443574 | ||
|
0aabb81c03 | ||
|
c763525e78 | ||
|
533e2472da | ||
|
08da235896 | ||
|
77cad81ba7 | ||
|
9213d7e707 | ||
|
157abcbd37 | ||
|
6da498510c | ||
|
2b7a37e42a | ||
|
84a220a651 | ||
|
51b9589c48 | ||
|
762df5e18c | ||
|
cb56991fee | ||
|
54c7e1a607 | ||
|
c4d5bb904b | ||
|
40f6192e19 | ||
|
7051daeb08 | ||
|
a9c42e1eaa | ||
|
8df70406df | ||
|
8b0cfdf779 | ||
|
c127cec76c | ||
|
6b21135ade | ||
|
2f66381a4a | ||
|
aa97b1b283 | ||
|
53495ec0a8 | ||
|
2f3f6ffa15 | ||
|
60f2f3b0d0 | ||
|
e626b77097 | ||
|
15dd14e167 | ||
|
83b586c192 | ||
|
d3fcb29f0d | ||
|
a4ed419aba | ||
|
e548043e96 | ||
|
443a4223c2 | ||
|
8f42a6a72b | ||
|
0982fec513 | ||
|
f5262dd050 | ||
|
8dcfd86f3a | ||
|
edc9e25f25 | ||
|
ef11ae834d | ||
|
9f423412d8 | ||
|
7f7fef3a4e | ||
|
b9d0821acb | ||
|
857539c8b1 | ||
|
429070d107 | ||
|
89725c530f | ||
|
8e5f67797a | ||
|
0eb0bace9a | ||
|
fab8cc055b | ||
|
bef8ec09b3 | ||
|
cf330afbd9 | ||
|
49731da807 | ||
|
f3ecbc185c | ||
|
a71a44346e | ||
|
4d278f4c20 | ||
|
45ec24ea42 | ||
|
bf3880ae59 | ||
|
9e838e6d04 | ||
|
d096db6a94 | ||
|
636d82414f | ||
|
cb3273b13b | ||
|
f0c75b5119 | ||
|
23bc6f1ab5 | ||
|
54e6412c49 | ||
|
1465035aa4 | ||
|
8473bf2200 | ||
|
0fe45b8f46 | ||
|
a4c87149c9 | ||
|
83359b098d | ||
|
3239fb3eb9 | ||
|
096f59b5bc | ||
|
9260be402b | ||
|
7bf7000941 | ||
|
840f8b904d | ||
|
61ac08dc7f | ||
|
f65b10c375 | ||
|
35c7f304f7 | ||
|
467544801e | ||
|
7cfe9ec272 | ||
|
6908a4bcf7 | ||
|
be2110b47e | ||
|
ad6401da8c | ||
|
2b6d657fb0 | ||
|
668cb6deda | ||
|
ddd8576ced | ||
|
98aad094fb | ||
|
8ed644a0ec | ||
|
86b82c53cf | ||
|
061ce3d781 | ||
|
45f8d31021 | ||
|
03d2088cf7 | ||
|
6534201284 | ||
|
282ca14182 | ||
|
4b7d346911 | ||
|
131a2cd40d | ||
|
ae90ab1f68 | ||
|
5e57c895b3 | ||
|
aab1df7421 | ||
|
9f3cc88cf0 | ||
|
aaa80882a0 | ||
|
1b6de901e0 | ||
|
56780a5d1f | ||
|
22c1bc2e9c | ||
|
5048e68cb5 | ||
|
1897794dbf | ||
|
4fca96f10e | ||
|
2d2ded7efc | ||
|
e5e427f278 | ||
|
5e8fd570d1 | ||
|
e8428cc298 | ||
|
aa94772fc6 | ||
|
732ae3ce19 | ||
|
9cbcb328af | ||
|
82e84f724d | ||
|
23cf8328d5 | ||
|
7c31f70dc8 | ||
|
f1eafdc314 | ||
|
69745caa41 | ||
|
0b49477e0d | ||
|
c195bab01d | ||
|
1b550baf7e | ||
|
d829093caa | ||
|
1fa77ac470 | ||
|
5083246266 | ||
|
c0d6c9e7c0 | ||
|
0d682fe78b | ||
|
410a20dda3 | ||
|
0685d0edfd | ||
|
474604b1fe | ||
|
6fef1f34ba | ||
|
93f0183550 | ||
|
5a599552f2 | ||
|
a42972644c | ||
|
b271c52603 | ||
|
49514e2d58 | ||
|
a265685e20 | ||
|
442e6ac152 | ||
|
14e5a2d5ca | ||
|
6e32f052c8 | ||
|
780eb0402c | ||
|
bfb9852eb6 | ||
|
a8b6a301f2 | ||
|
150f7ab798 | ||
|
b11d63a7bd | ||
|
84b283533b | ||
|
e36547f8be | ||
|
0632723a6c | ||
|
43543b5c32 | ||
|
ffc5a3c7df | ||
|
b6d1293b2e | ||
|
ec21b03c5b | ||
|
25dcf8c5d6 | ||
|
c02b71b530 | ||
|
78269d57bc | ||
|
fc91648315 | ||
|
067f435ac5 | ||
|
2039f38faf | ||
|
07654d8f8d | ||
|
b5e8f9bd50 | ||
|
f9995a9515 | ||
|
9c950082f6 | ||
|
defdd320cf | ||
|
fc44eb7516 | ||
|
bb89d509ea | ||
|
c2fe389da8 | ||
|
45d1ef3978 | ||
|
65e174a073 | ||
|
6822803802 | ||
|
66edd76b10 | ||
|
99be0ce970 | ||
|
98d5bf8f55 | ||
|
370901e873 | ||
|
c59ff50de4 | ||
|
3df5c032da | ||
|
b997bfcd97 | ||
|
7630d3cdb1 | ||
|
90df607d79 | ||
|
f012244acd | ||
|
5e2f1f573d | ||
|
011322992e | ||
|
16bb41db15 | ||
|
47a96e9ff9 | ||
|
4a1d8ba0f9 | ||
|
7c99059a66 | ||
|
609ee8dea2 | ||
|
299ea2b41f | ||
|
224400833a | ||
|
32f1ae1992 | ||
|
9b5468cd4a | ||
|
47a59cdd7c | ||
|
676ca872d6 | ||
|
ef28208c0e | ||
|
cdeb82bdab | ||
|
3be071ca3d | ||
|
6f6abfc8cd | ||
|
f99f3539d1 | ||
|
e08e239c00 | ||
|
02ed6f26a9 | ||
|
9e002a7689 | ||
|
34c5441768 | ||
|
c3d8cba042 | ||
|
8bc97bcd35 | ||
|
c1a74b54fc | ||
|
88547f5140 | ||
|
4a714b3ab9 | ||
|
7ad7598d5b | ||
|
4dfc6d90b9 | ||
|
0cb4a5c202 | ||
|
9a83365986 | ||
|
bc65d29650 | ||
|
9d3e8d6f6c | ||
|
8056b6fd85 | ||
|
db4a26cfa9 | ||
|
95e956c913 | ||
|
5e3795b5a4 | ||
|
3402b1efb6 | ||
|
24e21e730e | ||
|
421edccd3f | ||
|
cf8a48f110 | ||
|
12bbbbfa2a | ||
|
422911f06b | ||
|
2a12e0950a | ||
|
9869dd25d7 | ||
|
e47b57fd4a | ||
|
3cbe0e7a1c | ||
|
221753c3c0 | ||
|
b14924bd64 | ||
|
c0a608ef84 | ||
|
c518e85215 | ||
|
34fd10df41 | ||
|
e7004da47c | ||
|
1fc97c50f1 | ||
|
440d404780 | ||
|
91c76f7559 | ||
|
eb224e653f | ||
|
73b39abd62 | ||
|
3903fe5fd9 | ||
|
a3e10157de | ||
|
2e4af68b98 | ||
|
de9f29d7d4 | ||
|
99ddb17c9e | ||
|
8ea9d0bbef | ||
|
ebe09a95b8 | ||
|
f32b304eb6 | ||
|
7bdd69d151 | ||
|
a08f0cfe10 | ||
|
09a81ae574 | ||
|
7042d586b2 | ||
|
e17c4ac8af | ||
|
a6000ee963 | ||
|
0ab1464f51 | ||
|
789854adce | ||
|
37101a2031 | ||
|
40bcfd15e5 | ||
|
230ab06e5d | ||
|
09cda21dd4 | ||
|
9253f90ac5 | ||
|
f4cae55c1e | ||
|
fbee4a91fd | ||
|
cb7071a213 | ||
|
cdf5ad45d5 | ||
|
070a67d665 | ||
|
9796c58eb2 | ||
|
cabc20957f | ||
|
a9a379c5a5 | ||
|
3bf5066f82 | ||
|
b2c33a0f9a | ||
|
64f704a964 | ||
|
416224ee05 | ||
|
92ce1beddc | ||
|
4d6bf8564e | ||
|
fb4b362724 | ||
|
97de2be778 | ||
|
85cae3c7f8 | ||
|
acd425a3c2 | ||
|
4e6949f996 | ||
|
5d7dcc3122 | ||
|
23d498146b | ||
|
422d0b216a | ||
|
37ecbff23a | ||
|
491309a78a | ||
|
bc993c384c | ||
|
0e4c1cdac1 | ||
|
27a0f0f7a0 | ||
|
9ac075fd56 | ||
|
b2604583af | ||
|
62c6411cb0 | ||
|
6badf3ce1a | ||
|
1bc90beb01 | ||
|
eaccf033c6 | ||
|
056711d304 | ||
|
0aa0bebe07 | ||
|
1a68d87c94 | ||
|
c518cfaa4a | ||
|
196a56ea3c | ||
|
2c3f121835 | ||
|
18ba5c7311 | ||
|
c8774110c6 | ||
|
1479e955d4 | ||
|
09980cc75e | ||
|
e0a757ea03 | ||
|
550003f0f4 | ||
|
4f50303318 | ||
|
5053999442 | ||
|
6b5889177b | ||
|
71f8bad300 | ||
|
377c9f5708 | ||
|
45a164733b | ||
|
6f82bfe7d1 | ||
|
4e5b98d3d9 | ||
|
078c781dfa | ||
|
46f68c6dcb | ||
|
b42678269c | ||
|
9bd10c0c00 | ||
|
f861f8da35 | ||
|
9e3cb27d0a | ||
|
5b97800901 | ||
|
d8a22d13dd | ||
|
675e41e6a6 | ||
|
28f6379956 | ||
|
c9b58e203b | ||
|
9afe8daae0 | ||
|
43adcd26a1 | ||
|
65371437b5 | ||
|
cc2022e172 | ||
|
f2a565729f | ||
|
ea8b2a803a | ||
|
16832149ca | ||
|
7edf4918d7 | ||
|
d3a1dc1e2a | ||
|
f68f47d01b | ||
|
b1d1fa862a | ||
|
24acf25451 | ||
|
229c47ac6c | ||
|
38de9c1732 | ||
|
17f4fd7cd2 | ||
|
cfd02c1bb6 | ||
|
02caeb5aa0 | ||
|
19b7601c72 | ||
|
5a8e9cd0a3 | ||
|
b5a6067588 | ||
|
45468af2d2 | ||
|
6c018f478c | ||
|
dec3cacb2a | ||
|
4ab8e1f0a2 | ||
|
821d72093a | ||
|
42d5d13780 | ||
|
7121a0f1b1 | ||
|
ab12d63a4f | ||
|
6ba1d5413b | ||
|
4fc572f664 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*targetname export-ignore
|
@@ -18,7 +18,7 @@ Shoreline Firewall (Shorewall) Version 5
|
|||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Please see http://www.shorewall.net/Install.htm for installation
|
Please see https://shorewall.org/Install.htm for installation
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
|
||||||
|
1
Shorewall-core/Shorewall-core-targetname
Normal file
1
Shorewall-core/Shorewall-core-targetname
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5.2.6-base
|
11
Shorewall-core/configure
vendored
11
Shorewall-core/configure
vendored
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Shorewall Packet Filtering Firewall RPM configuration program - V4.6
|
# Shorewall Packet Filtering Firewall configuration program - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2012,2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2012,2014,2017 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://www.shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -109,6 +109,9 @@ if [ -z "$vendor" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
vendor=suse
|
vendor=suse
|
||||||
;;
|
;;
|
||||||
|
alt|basealt|altlinux)
|
||||||
|
vendor=alt
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
vendor="$ID"
|
vendor="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -132,6 +135,8 @@ if [ -z "$vendor" ]; then
|
|||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
params[HOST]=debian
|
params[HOST]=debian
|
||||||
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
||||||
|
elif [ -f /etc/altlinux-release ] ; then
|
||||||
|
params[HOST]=alt
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
params[HOST]=redhat
|
params[HOST]=redhat
|
||||||
rcfile=shorewallrc.redhat
|
rcfile=shorewallrc.redhat
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#! /usr/bin/perl -w
|
#! /usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# Shorewall Packet Filtering Firewall RPM configuration program - V4.5
|
# Shorewall Packet Filtering Firewall configuration program - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://www.shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -74,6 +74,8 @@ unless ( defined $vendor ) {
|
|||||||
} elsif ( $id eq 'ubuntu' || $id eq 'debian' ) {
|
} elsif ( $id eq 'ubuntu' || $id eq 'debian' ) {
|
||||||
my $init = `ls -l /sbin/init`;
|
my $init = `ls -l /sbin/init`;
|
||||||
$vendor = $init =~ /systemd/ ? 'debian.systemd' : 'debian.sysvinit';
|
$vendor = $init =~ /systemd/ ? 'debian.systemd' : 'debian.sysvinit';
|
||||||
|
} elsif ( $id eq 'alt' || $id eq 'basealt' || $id eq 'altlinux' ) {
|
||||||
|
$vendor = 'alt';
|
||||||
} else {
|
} else {
|
||||||
$vendor = $id;
|
$vendor = $id;
|
||||||
}
|
}
|
||||||
@@ -117,6 +119,9 @@ if ( defined $vendor ) {
|
|||||||
} else {
|
} else {
|
||||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||||
}
|
}
|
||||||
|
} elsif ( -f '/etc/altlinux-release' ){
|
||||||
|
$vendor = 'alt';
|
||||||
|
$rcfilename = 'shorewallrc.alt';
|
||||||
} elsif ( -f '/etc/redhat-release' ){
|
} elsif ( -f '/etc/redhat-release' ){
|
||||||
$vendor = 'redhat';
|
$vendor = 'redhat';
|
||||||
$rcfilename = 'shorewallrc.redhat';
|
$rcfilename = 'shorewallrc.redhat';
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
#
|
#
|
||||||
# Script to install Shoreline Firewall Core Modules
|
# Script to install Shoreline Firewall Core Modules
|
||||||
#
|
#
|
||||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2000-2018 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -172,6 +172,9 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
|
alt|basealt|altlinux)
|
||||||
|
BUILD=alt
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -180,6 +183,8 @@ if [ -z "$BUILD" ]; then
|
|||||||
BUILD=debian
|
BUILD=debian
|
||||||
elif [ -f /etc/gentoo-release ]; then
|
elif [ -f /etc/gentoo-release ]; then
|
||||||
BUILD=gentoo
|
BUILD=gentoo
|
||||||
|
elif [ -f /etc/altlinux-release ]; then
|
||||||
|
BUILD=alt
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
BUILD=redhat
|
BUILD=redhat
|
||||||
elif [ -f /etc/slackware-version ] ; then
|
elif [ -f /etc/slackware-version ] ; then
|
||||||
@@ -238,7 +243,7 @@ case "$HOST" in
|
|||||||
apple)
|
apple)
|
||||||
echo "Installing Mac-specific configuration...";
|
echo "Installing Mac-specific configuration...";
|
||||||
;;
|
;;
|
||||||
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt)
|
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt|alt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
fatal_error "Unknown HOST \"$HOST\""
|
fatal_error "Unknown HOST \"$HOST\""
|
||||||
@@ -335,9 +340,8 @@ for f in lib.* ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ $SHAREDIR != /usr/share ]; then
|
if [ $SHAREDIR != /usr/share ]; then
|
||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.base
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.base
|
||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.core
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.cli
|
||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.cli
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.base
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.base
|
||||||
#
|
#
|
||||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.common.
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.common
|
||||||
#
|
#
|
||||||
# (c) 2010-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010-2018 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -55,13 +55,13 @@ startup_error() # $* = Error Message
|
|||||||
|
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
start)
|
start)
|
||||||
mylogger kern.err "ERROR:$g_product start failed:Firewall state not changed"
|
mylogger daemon.err "ERROR:$g_product start failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
mylogger kern.err "ERROR:$g_product restart failed:Firewall state not changed"
|
mylogger daemon.err "ERROR:$g_product restart failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
restore)
|
restore)
|
||||||
mylogger kern.err "ERROR:$g_product restore failed:Firewall state not changed"
|
mylogger daemon.err "ERROR:$g_product restore failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -92,18 +92,20 @@ startup_error() # $* = Error Message
|
|||||||
#
|
#
|
||||||
run_it() {
|
run_it() {
|
||||||
local script
|
local script
|
||||||
local options
|
local options='-'
|
||||||
|
|
||||||
export VARDIR
|
export VARDIR
|
||||||
|
|
||||||
script=$1
|
script=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if [ x$1 = xtrace -o x$1 = xdebug ]; then
|
|
||||||
options="$1 -"
|
if [ "$g_debugging" = debug ]; then
|
||||||
shift;
|
options='-D'
|
||||||
|
elif [ "$g_debugging" = trace ]; then
|
||||||
|
options='-T'
|
||||||
else
|
else
|
||||||
options='-'
|
options='-';
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$g_noroutes" ] && options=${options}n
|
[ -n "$g_noroutes" ] && options=${options}n
|
||||||
@@ -411,7 +413,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
|||||||
[ -d $directory ] && moduledirectories="$moduledirectories $directory"
|
[ -d $directory ] && moduledirectories="$moduledirectories $directory"
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$LOAD_HELPERS_ONLY" ] && modules=$(find_file helpers) || modules=$(find_file modules)
|
modules=$(find_file helpers)
|
||||||
|
|
||||||
if [ -f $modules -a -n "$moduledirectories" ]; then
|
if [ -f $modules -a -n "$moduledirectories" ]; then
|
||||||
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
|
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
|
||||||
@@ -419,7 +421,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
|||||||
. $modules
|
. $modules
|
||||||
if [ $savemoduleinfo = Yes ]; then
|
if [ $savemoduleinfo = Yes ]; then
|
||||||
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
||||||
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir
|
echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir
|
||||||
cp -f $modules ${VARDIR}/.modules
|
cp -f $modules ${VARDIR}/.modules
|
||||||
fi
|
fi
|
||||||
elif [ $savemoduleinfo = Yes ]; then
|
elif [ $savemoduleinfo = Yes ]; then
|
||||||
@@ -501,7 +503,7 @@ ip_network() {
|
|||||||
|
|
||||||
#
|
#
|
||||||
# The following hack is supplied to compensate for the fact that many of
|
# The following hack is supplied to compensate for the fact that many of
|
||||||
# the popular light-weight Bourne shell derivatives don't support XOR ("^").
|
# the popular light-weight Bourne shell derivatives do not support XOR ("^").
|
||||||
#
|
#
|
||||||
ip_broadcast() {
|
ip_broadcast() {
|
||||||
local x
|
local x
|
||||||
@@ -736,8 +738,8 @@ truncate() # $1 = length
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Call this function to assert mutual exclusion with Shorewall. If you invoke the
|
# Call this function to assert mutual exclusion with Shorewall. If you invoke the
|
||||||
# /sbin/shorewall program while holding mutual exclusion, you should pass "nolock" as
|
# /sbin/shorewall program while holding mutual exclusion, you should pass -N as
|
||||||
# the first argument. Example "shorewall nolock refresh"
|
# the first argument. Example "shorewall -N refresh"
|
||||||
#
|
#
|
||||||
# This function uses the lockfile utility from procmail if it exists.
|
# This function uses the lockfile utility from procmail if it exists.
|
||||||
# Otherwise, it uses a somewhat race-prone algorithm to attempt to simulate the
|
# Otherwise, it uses a somewhat race-prone algorithm to attempt to simulate the
|
||||||
@@ -751,36 +753,44 @@ mutex_on()
|
|||||||
lockf=${LOCKFILE:=${VARDIR}/lock}
|
lockf=${LOCKFILE:=${VARDIR}/lock}
|
||||||
local lockpid
|
local lockpid
|
||||||
local lockd
|
local lockd
|
||||||
|
local lockbin
|
||||||
|
local openwrt
|
||||||
|
|
||||||
MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60}
|
MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60}
|
||||||
|
|
||||||
if [ $MUTEX_TIMEOUT -gt 0 ]; then
|
if [ -z "$g_havemutex" -a $MUTEX_TIMEOUT -gt 0 ]; then
|
||||||
|
|
||||||
lockd=$(dirname $LOCKFILE)
|
lockd=$(dirname $LOCKFILE)
|
||||||
|
|
||||||
[ -d "$lockd" ] || mkdir -p "$lockd"
|
[ -d "$lockd" ] || mkdir -p "$lockd"
|
||||||
|
|
||||||
|
lockbin=$(mywhich lock)
|
||||||
|
[ -n "$lockbin" -a -h "$lockbin" ] && openwrt=Yes
|
||||||
|
|
||||||
if [ -f $lockf ]; then
|
if [ -f $lockf ]; then
|
||||||
lockpid=`cat ${lockf} 2> /dev/null`
|
lockpid=`cat ${lockf} 2> /dev/null`
|
||||||
if [ -z "$lockpid" -o $lockpid = 0 ]; then
|
if [ -z "$lockpid" ] || [ $lockpid = 0 ]; then
|
||||||
rm -f ${lockf}
|
rm -f ${lockf}
|
||||||
error_message "WARNING: Stale lockfile ${lockf} removed"
|
error_message "WARNING: Stale lockfile ${lockf} removed"
|
||||||
elif [ $lockpid -eq $$ ]; then
|
elif [ -z "$openwrt" ]; then
|
||||||
return 0
|
if [ $lockpid -eq $$ ]; then
|
||||||
elif ! ps | grep -v grep | qt grep ${lockpid}; then
|
fatal_error "Mutex_on confusion"
|
||||||
rm -f ${lockf}
|
elif ! qt ps --pid ${lockpid}; then
|
||||||
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed"
|
rm -f ${lockf}
|
||||||
|
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if qt mywhich lockfile; then
|
if [ -n "$openwrt" ]; then
|
||||||
lockfile -${MUTEX_TIMEOUT} -r1 ${lockf}
|
lock ${lockf} || fatal_error "Can't lock ${lockf}"
|
||||||
|
g_havemutex="lock -u ${lockf}"
|
||||||
|
elif qt mywhich lockfile; then
|
||||||
|
lockfile -${MUTEX_TIMEOUT} -r1 ${lockf} || fatal_error "Can't lock ${lockf}"
|
||||||
|
g_havemutex="rm -f ${lockf}"
|
||||||
chmod u+w ${lockf}
|
chmod u+w ${lockf}
|
||||||
echo $$ > ${lockf}
|
echo $$ > ${lockf}
|
||||||
chmod u-w ${lockf}
|
chmod u-w ${lockf}
|
||||||
elif qt mywhich lock; then
|
|
||||||
lock ${lockf}
|
|
||||||
chmod u=r ${lockf}
|
|
||||||
else
|
else
|
||||||
while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do
|
while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -790,10 +800,15 @@ mutex_on()
|
|||||||
if [ ${try} -lt ${MUTEX_TIMEOUT} ] ; then
|
if [ ${try} -lt ${MUTEX_TIMEOUT} ] ; then
|
||||||
# Create the lockfile
|
# Create the lockfile
|
||||||
echo $$ > ${lockf}
|
echo $$ > ${lockf}
|
||||||
|
g_havemutex="rm -f ${lockf}"
|
||||||
else
|
else
|
||||||
echo "Giving up on lock file ${lockf}" >&2
|
echo "Giving up on lock file ${lockf}" >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$g_havemutex" ]; then
|
||||||
|
trap mutex_off EXIT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +817,10 @@ mutex_on()
|
|||||||
#
|
#
|
||||||
mutex_off()
|
mutex_off()
|
||||||
{
|
{
|
||||||
[ -f ${CONFDIR}/rc.common ] && lock -u ${LOCKFILE:=${VARDIR}/lock}
|
if [ -n "$g_havemutex" ]; then
|
||||||
rm -f ${LOCKFILE:=${VARDIR}/lock}
|
eval $g_havemutex
|
||||||
|
g_havemutex=
|
||||||
|
trap '' exit
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.core
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.core
|
||||||
#
|
#
|
||||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
#
|
#
|
||||||
#
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.installer
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.installer.
|
|
||||||
#
|
#
|
||||||
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
#
|
#
|
||||||
#
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.installer
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.installer.
|
|
||||||
#
|
#
|
||||||
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -61,7 +60,7 @@ mywhich() {
|
|||||||
remove_file() # $1 = file to remove
|
remove_file() # $1 = file to remove
|
||||||
{
|
{
|
||||||
if [ -n "$1" ] ; then
|
if [ -n "$1" ] ; then
|
||||||
if [ -f $1 -o -L $1 ] ; then
|
if [ -f $1 -o -h $1 ] ; then
|
||||||
rm -f $1
|
rm -f $1
|
||||||
echo "$1 Removed"
|
echo "$1 Removed"
|
||||||
fi
|
fi
|
||||||
@@ -85,7 +84,7 @@ remove_file_with_wildcard() # $1 = file with wildcard to remove
|
|||||||
if [ -d $f ] ; then
|
if [ -d $f ] ; then
|
||||||
rm -rf $f
|
rm -rf $f
|
||||||
echo "$f Removed"
|
echo "$f Removed"
|
||||||
elif [ -f $f -o -L $f ] ; then
|
elif [ -f $f -o -h $f ] ; then
|
||||||
rm -f $f
|
rm -f $f
|
||||||
echo "$f Removed"
|
echo "$f Removed"
|
||||||
fi
|
fi
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Shorewall Packet Filtering Firewall Control Program - V5.1
|
# Shorewall Packet Filtering Firewall Control Program - V5.2
|
||||||
#
|
#
|
||||||
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2014,2015-2017
|
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2014,2015-2017
|
||||||
# Tom Eastep (teastep@shorewall.net)
|
# Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://www.shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
25
Shorewall-core/shorewallrc.alt
Normal file
25
Shorewall-core/shorewallrc.alt
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# ALT/BaseALT/ALTLinux Shorewall 5.2 rc file
|
||||||
|
#
|
||||||
|
BUILD= #Default is to detect the build system
|
||||||
|
HOST=alt
|
||||||
|
PREFIX=/usr #Top-level directory for shared files, libraries, etc.
|
||||||
|
SHAREDIR=${PREFIX}/share #Directory for arch-neutral files.
|
||||||
|
LIBEXECDIR=${PREFIX}/libexec #Directory for executable scripts.
|
||||||
|
PERLLIBDIR=${SHAREDIR}/perl5 #Directory to install Shorewall Perl module directory
|
||||||
|
CONFDIR=/etc #Directory where subsystem configurations are installed
|
||||||
|
SBINDIR=/sbin #Directory where system administration programs are installed
|
||||||
|
MANDIR=${SHAREDIR}/man #Directory where manpages are installed.
|
||||||
|
INITDIR=${CONFDIR}/rc.d/init.d #Directory where SysV init scripts are installed.
|
||||||
|
INITFILE=$PRODUCT #Name of the product's installed SysV init script
|
||||||
|
INITSOURCE=init.alt.sh #Name of the distributed file to be installed as the SysV init script
|
||||||
|
ANNOTATED= #If non-zero, annotated configuration files are installed
|
||||||
|
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
|
||||||
|
SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT
|
||||||
|
SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
|
||||||
|
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
|
||||||
|
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
|
||||||
|
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
|
VARLIB=/var/lib #Directory where product variable data is stored.
|
||||||
|
VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored.
|
||||||
|
DEFAULT_PAGER=/usr/bin/less #Pager to use if none specified in shorewall[6].conf
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Apple OS X Shorewall 5.0 rc file
|
# Apple OS X Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD=apple
|
BUILD=apple
|
||||||
HOST=apple
|
HOST=apple
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Arch Linux Shorewall 5.0 rc file
|
# Arch Linux Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=archlinux
|
HOST=archlinux
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Cygwin Shorewall 5.0 rc file
|
# Cygwin Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD=cygwin
|
BUILD=cygwin
|
||||||
HOST=cygwin
|
HOST=cygwin
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Debian Shorewall 5.0 rc file
|
# Debian Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=debian
|
HOST=debian
|
||||||
@@ -13,9 +13,9 @@ MANDIR=${PREFIX}/share/man #Directory where manpages are installed.
|
|||||||
INITDIR= #Directory where SysV init scripts are installed.
|
INITDIR= #Directory where SysV init scripts are installed.
|
||||||
INITFILE= #Name of the product's installed SysV init script
|
INITFILE= #Name of the product's installed SysV init script
|
||||||
INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script
|
INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script
|
||||||
ANNOTATED= #If non-zero, annotated configuration files are installed
|
ANNOTATED= #If non-empty, annotated configuration files are installed
|
||||||
SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR
|
SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR
|
||||||
SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
|
SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
|
||||||
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
||||||
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
|
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
|
||||||
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Debian Shorewall 5.0 rc file
|
# Debian Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=debian
|
HOST=debian
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Default Shorewall 5.0 rc file
|
# Default Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=linux #Generic Linux
|
HOST=linux #Generic Linux
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# OpenWRT Shorewall 5.0 rc file
|
# OpenWRT/LEDE Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=openwrt
|
HOST=openwrt
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# RedHat/FedoraShorewall 5.0 rc file
|
# RedHat/FedoraShorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=redhat
|
HOST=redhat
|
||||||
|
28
Shorewall-core/shorewallrc.sandbox
Normal file
28
Shorewall-core/shorewallrc.sandbox
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# Shorewall 5.2 rc file for installing into a Sandbox
|
||||||
|
#
|
||||||
|
BUILD= # Default is to detect the build system
|
||||||
|
HOST=linux
|
||||||
|
INSTALLDIR= # Set this to the directory where you want Shorewall installed
|
||||||
|
PREFIX=${INSTALLDIR}/usr # Top-level directory for shared files, libraries, etc.
|
||||||
|
SHAREDIR=${PREFIX}/share # Directory for arch-neutral files.
|
||||||
|
LIBEXECDIR=${PREFIX}/share # Directory for executable scripts.
|
||||||
|
PERLLIBDIR=${PREFIX}/share/shorewall # Directory to install Shorewall Perl module directory
|
||||||
|
CONFDIR=${INSTALLDIR}/etc # Directory where subsystem configurations are installed
|
||||||
|
SBINDIR=${INSTALLDIR}/sbin # Directory where system administration programs are installed
|
||||||
|
MANDIR= # Leave empty
|
||||||
|
INITDIR= # Leave empty
|
||||||
|
INITSOURCE= # Leave empty
|
||||||
|
INITFILE= # Leave empty
|
||||||
|
AUXINITSOURCE= # Leave empty
|
||||||
|
AUXINITFILE= # Leave empty
|
||||||
|
SERVICEDIR= # Leave empty
|
||||||
|
SERVICEFILE= # Leave empty
|
||||||
|
SYSCONFFILE= # Leave empty
|
||||||
|
SYSCONFDIR= # Leave empty
|
||||||
|
SPARSE= # Leave empty
|
||||||
|
ANNOTATED= # If non-empty, annotated configuration files are installed
|
||||||
|
VARLIB=${INSTALLDIR}/var/lib # Directory where product variable data is stored.
|
||||||
|
VARDIR=${VARLIB}/$PRODUCT # Directory where product variable data is stored.
|
||||||
|
DEFAULT_PAGER=/usr/bin/less # Pager to use if none specified in shorewall[6].conf
|
||||||
|
SANDBOX=Yes # Indicates SANDBOX installation
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Slackware Shorewall 5.0 rc file
|
# Slackware Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD=slackware
|
BUILD=slackware
|
||||||
HOST=slackware
|
HOST=slackware
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SuSE Shorewall 5.0 rc file
|
# SuSE Shorewall 5.2 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=suse
|
HOST=suse
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://www.shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Shorewall interface helper utility - V4.2
|
# Shorewall interface helper utility - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2007,2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2007,2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# This file is installed in /usr/share/shorewall/wait4ifup
|
# This file is installed in /usr/share/shorewall/wait4ifup
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://www.shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -110,7 +110,7 @@ case $0 in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
#
|
#
|
||||||
# Debian ifupdown system
|
# Debian ifupdown system - MODE and INTERFACE inherited from the environment
|
||||||
#
|
#
|
||||||
INTERFACE="$IFACE"
|
INTERFACE="$IFACE"
|
||||||
|
|
||||||
@@ -127,6 +127,17 @@ esac
|
|||||||
[ -n "$LOGFILE" ] || LOGFILE=/dev/null
|
[ -n "$LOGFILE" ] || LOGFILE=/dev/null
|
||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if [ -n "$ADDRFAM" -a ${COMMAND} = up ]; then
|
||||||
|
case $PRODUCT in
|
||||||
|
*6*)
|
||||||
|
[ ${ADDRFAM} = inet6 ] || continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
[ ${ADDRFAM} = inet ] || continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
setstatedir
|
setstatedir
|
||||||
|
|
||||||
if [ -x $VARLIB/$PRODUCT/firewall ]; then
|
if [ -x $VARLIB/$PRODUCT/firewall ]; then
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -90,7 +90,14 @@ case $0 in
|
|||||||
COMMAND=down
|
COMMAND=down
|
||||||
;;
|
;;
|
||||||
*dispatcher.d*)
|
*dispatcher.d*)
|
||||||
COMMAND="$2"
|
case "$2" in
|
||||||
|
up|down)
|
||||||
|
COMMAND="$2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -120,7 +120,14 @@ case $0 in
|
|||||||
case $0 in
|
case $0 in
|
||||||
*dispatcher.d*)
|
*dispatcher.d*)
|
||||||
INTERFACE="$1"
|
INTERFACE="$1"
|
||||||
COMMAND="$2"
|
case "$2" in
|
||||||
|
up|down)
|
||||||
|
COMMAND="$2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
*if-up.d*)
|
*if-up.d*)
|
||||||
COMMAND=up
|
COMMAND=up
|
||||||
|
150
Shorewall-init/init.alt.sh
Executable file
150
Shorewall-init/init.alt.sh
Executable file
@@ -0,0 +1,150 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Shorewall init script
|
||||||
|
#
|
||||||
|
# chkconfig: - 09 91
|
||||||
|
# description: Initialize the shorewall firewall at boot time
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: shorewall-init
|
||||||
|
# Required-Start: $local_fs
|
||||||
|
# Required-Stop: $local_fs
|
||||||
|
# Default-Start: 3 4 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Short-Description: Initialize the shorewall firewall at boot time
|
||||||
|
# Description: Place the firewall in a safe state at boot time
|
||||||
|
# prior to bringing up the network.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Do not load RH compatibility interface.
|
||||||
|
WITHOUT_RC_COMPAT=1
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/init.d/functions
|
||||||
|
|
||||||
|
#
|
||||||
|
# The installer may alter this
|
||||||
|
#
|
||||||
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
NAME="Shorewall-init firewall"
|
||||||
|
PROG="shorewall-init"
|
||||||
|
SHOREWALL="$SBINDIR/$PROG"
|
||||||
|
LOGGER="logger -i -t $PROG"
|
||||||
|
|
||||||
|
# Get startup options (override default)
|
||||||
|
OPTIONS=
|
||||||
|
|
||||||
|
LOCKFILE=/var/lock/subsys/shorewall-init
|
||||||
|
|
||||||
|
# check if shorewall-init is configured or not
|
||||||
|
if [ -f "/etc/sysconfig/shorewall-init" ]; then
|
||||||
|
. /etc/sysconfig/shorewall-init
|
||||||
|
if [ -z "$PRODUCTS" ]; then
|
||||||
|
echo "No PRODUCTS configured"
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "/etc/sysconfig/shorewall-init not found"
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
|
||||||
|
# set the STATEDIR variable
|
||||||
|
setstatedir() {
|
||||||
|
local statedir
|
||||||
|
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
|
||||||
|
statedir=$( . /${CONFDIR}/${PRODUCT}/vardir && echo $VARDIR )
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall ]; then
|
||||||
|
${SBINDIR}/shorewall compile
|
||||||
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
|
${SBINDIR}/shorewall -6 compile
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
else
|
||||||
|
RETVAL=6
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
|
ipset -R < "$SAVE_IPSETS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
else
|
||||||
|
RETVAL=6
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
|
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
||||||
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
|
||||||
|
else
|
||||||
|
rm -f "${SAVE_IPSETS}.tmp"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
# See how we were called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart|reload|condrestart|condreload)
|
||||||
|
# "Not implemented"
|
||||||
|
;;
|
||||||
|
condstop)
|
||||||
|
if [ -e "$LOCKFILE" ]; then
|
||||||
|
stop
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status "$PROG"
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: ${0##*/} {start|stop|restart|reload|condrestart|condstop|status}"
|
||||||
|
RETVAL=1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -73,12 +73,16 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
return 0
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
|
||||||
${SBINDIR}/shorewall -6 compile
|
|
||||||
else
|
else
|
||||||
return 0
|
if [ $PRODUCT = shorewall ]; then
|
||||||
|
${SBINDIR}/shorewall compile
|
||||||
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
|
${SBINDIR}/shorewall -6 compile
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,16 +112,14 @@ shorewall_start () {
|
|||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
#
|
||||||
#
|
# Run in a sub-shell to avoid name collisions
|
||||||
# Run in a sub-shell to avoid name collisions
|
#
|
||||||
#
|
(
|
||||||
(
|
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
||||||
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
fi
|
||||||
fi
|
)
|
||||||
)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -145,9 +147,7 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -44,12 +44,14 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,15 +77,11 @@ start () {
|
|||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
if [ -x "${STATEDIR}/firewall" ]; then
|
${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger
|
retval=${PIPESTATUS[0]}
|
||||||
retval=${PIPESTATUS[0]}
|
[ $retval -ne 0 ] && break
|
||||||
[ $retval -ne 0 ] && break
|
|
||||||
else
|
|
||||||
retval=6 #Product not configured
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
|
retval=6 #Product not configured
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -110,15 +108,11 @@ stop () {
|
|||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
if [ -x "${STATEDIR}/firewall" ]; then
|
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger
|
retval=${PIPESTATUS[0]}
|
||||||
retval=${PIPESTATUS[0]}
|
[ $retval -ne 0 ] && break
|
||||||
[ $retval -ne 0 ] && break
|
|
||||||
else
|
|
||||||
retval=6 #Product not configured
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
|
retval=6 #Product not configured
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
22
Shorewall-init/init.openwrt.sh
Normal file → Executable file
22
Shorewall-init/init.openwrt.sh
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
|
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
|
||||||
@@ -75,12 +75,14 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,10 +94,8 @@ start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -103,6 +103,8 @@ start () {
|
|||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
ipset -R < "$SAVE_IPSETS"
|
ipset -R < "$SAVE_IPSETS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
boot () {
|
boot () {
|
||||||
@@ -117,9 +119,7 @@ stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -131,5 +131,7 @@ stop () {
|
|||||||
rm -f "${SAVE_IPSETS}.tmp"
|
rm -f "${SAVE_IPSETS}.tmp"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
@@ -69,10 +69,12 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
|
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
|
||||||
else
|
else
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,10 +86,8 @@ shorewall_start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -107,9 +107,7 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -79,12 +79,14 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 0
|
return 6
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,10 +98,8 @@ shorewall_start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x $STATEDIR/firewall ]; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
|
||||||
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -117,9 +117,7 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2010 - Roberto C. Sanchez (roberto@connexer.com)
|
# (c) 2010 - Roberto C. Sanchez (roberto@connexer.com)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -169,7 +169,7 @@ if [ -z "$BUILD" ]; then
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
eval $(cat /etc/os-release | grep ^ID=)
|
ID=$(grep '^ID=' /etc/os-release | sed 's/ID=//; s/"//g;')
|
||||||
|
|
||||||
case $ID in
|
case $ID in
|
||||||
fedora|rhel|centos|foobar)
|
fedora|rhel|centos|foobar)
|
||||||
@@ -181,6 +181,9 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
|
alt|basealt|altlinux)
|
||||||
|
BUILD=alt
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -191,6 +194,8 @@ if [ -z "$BUILD" ]; then
|
|||||||
BUILD=debian
|
BUILD=debian
|
||||||
elif [ -f /etc/gentoo-release ]; then
|
elif [ -f /etc/gentoo-release ]; then
|
||||||
BUILD=gentoo
|
BUILD=gentoo
|
||||||
|
elif [ -f /etc/altlinux-release ]; then
|
||||||
|
BUILD=alt
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
BUILD=redhat
|
BUILD=redhat
|
||||||
elif [ -f /etc/SuSE-release ]; then
|
elif [ -f /etc/SuSE-release ]; then
|
||||||
@@ -253,6 +258,9 @@ case "$HOST" in
|
|||||||
openwrt)
|
openwrt)
|
||||||
echo "Installing Openwrt-specific configuration..."
|
echo "Installing Openwrt-specific configuration..."
|
||||||
;;
|
;;
|
||||||
|
alt)
|
||||||
|
echo "Installing ALT-specific configuration...";
|
||||||
|
;;
|
||||||
linux)
|
linux)
|
||||||
fatal_error "Shorewall-init is not supported on this system"
|
fatal_error "Shorewall-init is not supported on this system"
|
||||||
;;
|
;;
|
||||||
@@ -349,12 +357,11 @@ fi
|
|||||||
if [ $HOST = debian ]; then
|
if [ $HOST = debian ]; then
|
||||||
if [ -n "${DESTDIR}" ]; then
|
if [ -n "${DESTDIR}" ]; then
|
||||||
make_parent_directory ${DESTDIR}${ETC}/network/if-up.d 0755
|
make_parent_directory ${DESTDIR}${ETC}/network/if-up.d 0755
|
||||||
make_parent_directory ${DESTDIR}${ETC}/network/if-down.d 0755
|
|
||||||
make_parent_directory ${DESTDIR}${ETC}/network/if-post-down.d 0755
|
make_parent_directory ${DESTDIR}${ETC}/network/if-post-down.d 0755
|
||||||
elif [ $configure -eq 0 ]; then
|
elif [ $configure -eq 0 ]; then
|
||||||
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-up.d 0755
|
make_parent_directory ${CONFDIR}/network/if-up.d 0755
|
||||||
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-down.d 0755
|
make_parent_directory ${CONFDIR}/network/if-post-down.d 0755
|
||||||
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-post-down.d 0755
|
rm -f ${CONFDIR}/network/if-down.d/shorewall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${DESTDIR}${CONFDIR}/default/$PRODUCT ]; then
|
if [ ! -f ${DESTDIR}${CONFDIR}/default/$PRODUCT ]; then
|
||||||
@@ -380,7 +387,7 @@ else
|
|||||||
elif [ $HOST = openwrt ]; then
|
elif [ $HOST = openwrt ]; then
|
||||||
# Not implemented on OpenWRT
|
# Not implemented on OpenWRT
|
||||||
/bin/true
|
/bin/true
|
||||||
else
|
elif [ "$HOST" != debian ]; then
|
||||||
make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755
|
make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -409,19 +416,22 @@ if [ $HOST != openwrt ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
|
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
|
||||||
[ $configure -eq 1 ] || make_parent_directory ${DESTDIR}${CONFDIR}/NetworkManager/dispatcher.d 0755
|
if [ "$HOST" = debian ]; then
|
||||||
install_file ifupdown ${DESTDIR}${ETC}/NetworkManager/dispatcher.d/01-shorewall 0544
|
rm -f ${DESTDIR}${ETC}/NetworkManager/dispatcher.d/01-shorewall
|
||||||
|
else
|
||||||
|
[ $configure -eq 1 ] || make_parent_directory ${DESTDIR}${CONFDIR}/NetworkManager/dispatcher.d 0755
|
||||||
|
install_file ifupdown ${DESTDIR}${ETC}/NetworkManager/dispatcher.d/01-shorewall 0544
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $HOST in
|
case $HOST in
|
||||||
debian)
|
debian)
|
||||||
if [ $configure -eq 1 ]; then
|
if [ $configure -eq 1 ]; then
|
||||||
install_file ifupdown ${DESTDIR}/etc/network/if-up.d/shorewall 0544
|
install_file ifupdown ${DESTDIR}/etc/network/if-up.d/shorewall 0544
|
||||||
install_file ifupdown ${DESTDIR}/etc/network/if-down.d/shorewall 0544
|
|
||||||
install_file ifupdown ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544
|
install_file ifupdown ${DESTDIR}/etc/network/if-post-down.d/shorewall 0544
|
||||||
|
rm -f ${DESTDIR}/etc/network/if-down.d/shorewall
|
||||||
else
|
else
|
||||||
install_file ifupdown ${DESTDIR}${CONFDIR}/network/if-up.d/shorewall 0544
|
install_file ifupdown ${DESTDIR}${CONFDIR}/network/if-up.d/shorewall 0544
|
||||||
install_file ifupdown ${DESTDIR}${CONFDIR}/network/if-down.d/shorewall 0544
|
|
||||||
install_file ifupdown ${DESTDIR}${CONFDIR}/network/if-post-down.d/shorewall 0544
|
install_file ifupdown ${DESTDIR}${CONFDIR}/network/if-post-down.d/shorewall 0544
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# (c) 2012-2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# On most distributions, this file should be called
|
# On most distributions, this file should be called
|
||||||
# /etc/init.d/shorewall.
|
# /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# set the STATEDIR variable
|
# set the STATEDIR variable
|
||||||
|
|
||||||
setstatedir() {
|
setstatedir() {
|
||||||
local statedir
|
local statedir
|
||||||
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
|
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
|
||||||
@@ -33,15 +34,76 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
return 0
|
||||||
|
elif [ $PRODUCT = shorewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Initialize the firewalls
|
||||||
|
|
||||||
|
shorewall_init_start () {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
|
ipset -R < "$SAVE_IPSETS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
#
|
||||||
|
# Run in a sub-shell to avoid name collisions
|
||||||
|
#
|
||||||
|
(
|
||||||
|
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
||||||
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the firewalls
|
||||||
|
|
||||||
|
shorewall_init_stop () {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
#
|
||||||
|
# Run in sub-shell to avoid name collisions
|
||||||
|
#
|
||||||
|
(
|
||||||
|
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
||||||
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
|
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
||||||
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
|
||||||
|
else
|
||||||
|
rm -f "${SAVE_IPSETS}.tmp"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is modified by the installer when ${SHAREDIR} <> /usr/share
|
# This is modified by the installer when ${SHAREDIR} <> /usr/share
|
||||||
#
|
#
|
||||||
@@ -59,66 +121,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize the firewall
|
|
||||||
shorewall_start () {
|
|
||||||
local PRODUCT
|
|
||||||
local STATEDIR
|
|
||||||
|
|
||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
|
||||||
if setstatedir; then
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
|
||||||
#
|
|
||||||
# Run in a sub-shell to avoid name collisions
|
|
||||||
#
|
|
||||||
(
|
|
||||||
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
|
||||||
ipset -R < "$SAVE_IPSETS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Clear the firewall
|
|
||||||
shorewall_stop () {
|
|
||||||
local PRODUCT
|
|
||||||
local STATEDIR
|
|
||||||
|
|
||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
|
||||||
if setstatedir; then
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" ]; then
|
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
|
||||||
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
else
|
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_start
|
shorewall_init_start
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
shorewall_stop
|
shorewall_init_stop
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop}"
|
echo "Usage: $0 {start|stop}"
|
||||||
|
1
Shorewall-lite/Shorewall-lite-targetname
Normal file
1
Shorewall-lite/Shorewall-lite-targetname
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5.2.4.1
|
117
Shorewall-lite/init.alt.sh
Executable file
117
Shorewall-lite/init.alt.sh
Executable file
@@ -0,0 +1,117 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Shorewall-Lite init script
|
||||||
|
#
|
||||||
|
# chkconfig: - 28 90
|
||||||
|
# description: Packet filtering firewall
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: shorewall-lite
|
||||||
|
# Required-Start: $local_fs $remote_fs $syslog $network
|
||||||
|
# Should-Start: $time $named
|
||||||
|
# Required-Stop:
|
||||||
|
# Default-Start: 3 4 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Short-Description: Packet filtering firewall
|
||||||
|
# Description: The Shoreline Firewall, more commonly known as "Shorewall", is a
|
||||||
|
# Netfilter (iptables) based firewall
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Do not load RH compatibility interface.
|
||||||
|
WITHOUT_RC_COMPAT=1
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/init.d/functions
|
||||||
|
|
||||||
|
#
|
||||||
|
# The installer may alter this
|
||||||
|
#
|
||||||
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
|
||||||
|
NAME="Shorewall-Lite firewall"
|
||||||
|
PROG="shorewall"
|
||||||
|
SHOREWALL="$SBINDIR/$PROG -l"
|
||||||
|
LOGGER="logger -i -t $PROG"
|
||||||
|
|
||||||
|
# Get startup options (override default)
|
||||||
|
OPTIONS=
|
||||||
|
|
||||||
|
SourceIfNotEmpty $SYSCONFDIR/${PROG}-lite
|
||||||
|
|
||||||
|
LOCKFILE="/var/lock/subsys/${PROG}-lite"
|
||||||
|
RETVAL=0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
action $"Applying $NAME rules:" "$SHOREWALL" "$OPTIONS" start "$STARTOPTIONS" 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
action $"Stoping $NAME :" "$SHOREWALL" "$OPTIONS" stop "$STOPOPTIONS" 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
action $"Restarting $NAME rules: " "$SHOREWALL" "$OPTIONS" restart "$RESTARTOPTIONS" 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
action $"Reloadinging $NAME rules: " "$SHOREWALL" "$OPTIONS" reload "$RELOADOPTIONS" 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
action $"Clearing $NAME rules: " "$SHOREWALL" "$OPTIONS" clear 2>&1 | "$LOGGER"
|
||||||
|
RETVAL=$?
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
# See how we were called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
reload
|
||||||
|
;;
|
||||||
|
clear)
|
||||||
|
clear
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
if [ -e "$LOCKFILE" ]; then
|
||||||
|
restart
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
condreload)
|
||||||
|
if [ -e "$LOCKFILE" ]; then
|
||||||
|
restart
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
condstop)
|
||||||
|
if [ -e "$LOCKFILE" ]; then
|
||||||
|
stop
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
"$SHOREWALL" status
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: ${0##*/} {start|stop|restart|reload|clear|condrestart|condstop|status}"
|
||||||
|
RETVAL=1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
@@ -1,13 +1,13 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
#
|
#
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2015 - Matt Darfeuille - (matdarf@gmail.com)
|
# (c) 2015 - Matt Darfeuille - (matdarf@gmail.com)
|
||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
RCDLINKS="2,S41 3,S41 6,K41"
|
RCDLINKS="2,S41 3,S41 6,K41"
|
||||||
#
|
#
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at http://shorewall.net
|
# Shorewall documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -190,6 +190,9 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
|
alt|basealt|altlinux)
|
||||||
|
BUILD=alt
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -198,6 +201,8 @@ if [ -z "$BUILD" ]; then
|
|||||||
BUILD=debian
|
BUILD=debian
|
||||||
elif [ -f /etc/gentoo-release ]; then
|
elif [ -f /etc/gentoo-release ]; then
|
||||||
BUILD=gentoo
|
BUILD=gentoo
|
||||||
|
elif [ -f /etc/altlinux-release ]; then
|
||||||
|
BUILD=alt
|
||||||
elif [ -f ${CONFDIR}/redhat-release ]; then
|
elif [ -f ${CONFDIR}/redhat-release ]; then
|
||||||
BUILD=redhat
|
BUILD=redhat
|
||||||
elif [ -f ${CONFDIR}/SuSE-release ]; then
|
elif [ -f ${CONFDIR}/SuSE-release ]; then
|
||||||
@@ -266,6 +271,9 @@ case "$HOST" in
|
|||||||
openwrt)
|
openwrt)
|
||||||
echo "Installing OpenWRT-specific configuration..."
|
echo "Installing OpenWRT-specific configuration..."
|
||||||
;;
|
;;
|
||||||
|
alt)
|
||||||
|
echo "Installing ALT-specific configuration...";
|
||||||
|
;;
|
||||||
linux)
|
linux)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -418,6 +426,11 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
|
|||||||
if [ -f modules ]; then
|
if [ -f modules ]; then
|
||||||
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
|
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
|
||||||
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
|
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
|
||||||
|
|
||||||
|
for f in modules.*; do
|
||||||
|
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
|
||||||
|
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f helpers ]; then
|
if [ -f helpers ]; then
|
||||||
@@ -425,11 +438,6 @@ if [ -f helpers ]; then
|
|||||||
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
|
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in modules.*; do
|
|
||||||
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
|
|
||||||
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the Man Pages
|
# Install the Man Pages
|
||||||
#
|
#
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 4.4 -- /usr/share/shorewall-lite/lib.base
|
# Shorewall 5.2 -- /usr/share/shorewall-lite/lib.base
|
||||||
#
|
#
|
||||||
# (c) 2011,2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2011,2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -183,7 +183,7 @@
|
|||||||
<title>See ALSO</title>
|
<title>See ALSO</title>
|
||||||
|
|
||||||
<para><ulink
|
<para><ulink
|
||||||
url="http://www.shorewall.net/Documentation_Index.html">http://www.shorewall.net/Documentation_Index.html</ulink></para>
|
url="https://shorewall.org/Documentation_Index.html">https://shorewall.org/Documentation_Index.html</ulink></para>
|
||||||
|
|
||||||
<para>shorewall-lite(8), shorewall-accounting(5), shorewall-actions(5),
|
<para>shorewall-lite(8), shorewall-accounting(5), shorewall-actions(5),
|
||||||
shorewall-blacklist(5), shorewall-hosts(5), shorewall-interfaces(5),
|
shorewall-blacklist(5), shorewall-hosts(5), shorewall-interfaces(5),
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
# "man shorewall-lite.conf"
|
# "man shorewall-lite.conf"
|
||||||
#
|
#
|
||||||
# Manpage also online at
|
# Manpage also online at
|
||||||
# http://www.shorewall.net/manpages/shorewall-lite.conf.html
|
# https://shorewall.org/manpages/shorewall-lite.conf.html
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# N 0 T E
|
# N 0 T E
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@@ -151,7 +151,7 @@ fi
|
|||||||
|
|
||||||
remove_file ${SBINDIR}/$PRODUCT
|
remove_file ${SBINDIR}/$PRODUCT
|
||||||
|
|
||||||
if [ -L ${SHAREDIR}/$PRODUCT/init ]; then
|
if [ -h ${SHAREDIR}/$PRODUCT/init ]; then
|
||||||
if [ $HOST = openwrt ]; then
|
if [ $HOST = openwrt ]; then
|
||||||
if [ $configure -eq 1 ] && /etc/init.d/$PRODUCT enabled; then
|
if [ $configure -eq 1 ] && /etc/init.d/$PRODUCT enabled; then
|
||||||
/etc/init.d/$PRODUCT disable
|
/etc/init.d/$PRODUCT disable
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall6 -- /usr/share/shorewall/action.A_AllowICMPs
|
|
||||||
#
|
|
||||||
# This action A_ACCEPTs needed ICMP types
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT
|
|
||||||
|
|
||||||
AllowICMPs(A_ACCEPT)
|
|
@@ -1,57 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.A_Drop
|
|
||||||
#
|
|
||||||
# The audited default DROP common rules
|
|
||||||
#
|
|
||||||
# This action is invoked before a DROP policy is enforced. The purpose
|
|
||||||
# of the action is:
|
|
||||||
#
|
|
||||||
# a) Avoid logging lots of useless cruft.
|
|
||||||
# b) Ensure that certain ICMP packets that are necessary for successful
|
|
||||||
# internet operation are always ACCEPTed.
|
|
||||||
#
|
|
||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
|
||||||
#
|
|
||||||
?require AUDIT_TARGET
|
|
||||||
?warning "You are using the deprecated A_Drop default action. Please see http://www.shorewall.net/Actions.html
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT
|
|
||||||
#
|
|
||||||
# Count packets that come through here
|
|
||||||
#
|
|
||||||
COUNT
|
|
||||||
#
|
|
||||||
# Special Handling for Auth
|
|
||||||
#
|
|
||||||
Auth(A_DROP)
|
|
||||||
#
|
|
||||||
# ACCEPT critical ICMP types
|
|
||||||
#
|
|
||||||
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
|
||||||
# AllowICMPs must be before broadcast Drop.
|
|
||||||
#
|
|
||||||
A_AllowICMPs - - icmp
|
|
||||||
#
|
|
||||||
# Don't log broadcasts and multicasts
|
|
||||||
#
|
|
||||||
dropBcast(audit)
|
|
||||||
dropMcast(audit)
|
|
||||||
#
|
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
|
||||||
# and just confuse people when they appear in the log.
|
|
||||||
#
|
|
||||||
dropInvalid(audit)
|
|
||||||
#
|
|
||||||
# Drop Microsoft noise so that it doesn't clutter up the log.
|
|
||||||
#
|
|
||||||
SMB(A_DROP)
|
|
||||||
A_DropUPnP
|
|
||||||
#
|
|
||||||
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
|
||||||
#
|
|
||||||
dropNotSyn(audit) - - tcp
|
|
||||||
#
|
|
||||||
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
|
||||||
# the log.
|
|
||||||
#
|
|
||||||
A_DropDNSrep
|
|
@@ -1,13 +1,13 @@
|
|||||||
#
|
#
|
||||||
# Shorewall -- /usr/share/shorewall/action.A_REJECTWITH
|
# Shorewall -- /usr/share/shorewall/action.A_REJECT
|
||||||
#
|
#
|
||||||
# A_REJECT Action.
|
# A_REJECT Action.
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -1,54 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.A_Reject
|
|
||||||
#
|
|
||||||
# The audited default REJECT action common rules
|
|
||||||
#
|
|
||||||
# This action is invoked before a REJECT policy is enforced. The purpose
|
|
||||||
# of the action is:
|
|
||||||
#
|
|
||||||
# a) Avoid logging lots of useless cruft.
|
|
||||||
# b) Ensure that certain ICMP packets that are necessary for successful
|
|
||||||
# internet operation are always ACCEPTed.
|
|
||||||
#
|
|
||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
|
||||||
?require AUDIT_TARGET
|
|
||||||
?warning "You are using the deprecated A_REJECT default action. Please see http://www.shorewall.net/Actions.html
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO
|
|
||||||
#
|
|
||||||
# Count packets that come through here
|
|
||||||
#
|
|
||||||
COUNT
|
|
||||||
#
|
|
||||||
# ACCEPT critical ICMP types
|
|
||||||
#
|
|
||||||
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
|
||||||
# AllowICMPs must be before broadcast Drop.
|
|
||||||
#
|
|
||||||
A_AllowICMPs - - icmp
|
|
||||||
#
|
|
||||||
# Drop Broadcasts and multicasts so they don't clutter up the log
|
|
||||||
# (these must *not* be rejected).
|
|
||||||
#
|
|
||||||
dropBcast(audit)
|
|
||||||
dropMcast(audit)
|
|
||||||
#
|
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
|
||||||
# and just confuse people when they appear in the log (these ICMPs cannot be
|
|
||||||
# rejected).
|
|
||||||
#
|
|
||||||
dropInvalid(audit)
|
|
||||||
#
|
|
||||||
# Reject Microsoft noise so that it doesn't clutter up the log.
|
|
||||||
#
|
|
||||||
SMB(A_REJECT)
|
|
||||||
A_DropUPnP
|
|
||||||
#
|
|
||||||
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
|
||||||
#
|
|
||||||
dropNotSyn(audit) - - tcp
|
|
||||||
#
|
|
||||||
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
|
||||||
# the log.
|
|
||||||
#
|
|
||||||
A_DropDNSrep
|
|
@@ -13,7 +13,6 @@ DEFAULTS ACCEPT
|
|||||||
@1 - - icmp time-exceeded {comment="Needed ICMP types"}
|
@1 - - icmp time-exceeded {comment="Needed ICMP types"}
|
||||||
?else
|
?else
|
||||||
?COMMENT Needed ICMP types (RFC4890)
|
?COMMENT Needed ICMP types (RFC4890)
|
||||||
|
|
||||||
@1 - - ipv6-icmp destination-unreachable
|
@1 - - ipv6-icmp destination-unreachable
|
||||||
@1 - - ipv6-icmp packet-too-big
|
@1 - - ipv6-icmp packet-too-big
|
||||||
@1 - - ipv6-icmp time-exceeded
|
@1 - - ipv6-icmp time-exceeded
|
||||||
@@ -38,7 +37,7 @@ DEFAULTS ACCEPT
|
|||||||
@1 - - ipv6-icmp 148 # Certificate path solicitation
|
@1 - - ipv6-icmp 148 # Certificate path solicitation
|
||||||
@1 - - ipv6-icmp 149 # Certificate path advertisement
|
@1 - - ipv6-icmp 149 # Certificate path advertisement
|
||||||
|
|
||||||
# The following should have a link local source address and a ttl of 1 and must be allowed to transit abridge
|
# The following should have a link local source address and a ttl of 1 and must be allowed to transit a bridge
|
||||||
@1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
@1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
||||||
@1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
@1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
||||||
@1 fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
@1 fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -1,84 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.Drop
|
|
||||||
#
|
|
||||||
# The former default DROP common rules. Use of this action is now deprecated
|
|
||||||
#
|
|
||||||
# This action is invoked before a DROP policy is enforced. The purpose
|
|
||||||
# of the action is:
|
|
||||||
#
|
|
||||||
# a) Avoid logging lots of useless cruft.
|
|
||||||
# b) Ensure that certain ICMP packets that are necessary for successful
|
|
||||||
# internet operation are always ACCEPTed.
|
|
||||||
#
|
|
||||||
# The action accepts six optional parameters:
|
|
||||||
#
|
|
||||||
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
|
|
||||||
# actions.
|
|
||||||
# 2 - Action to take with Auth requests. Default is to do nothing special
|
|
||||||
# with them.
|
|
||||||
# 3 - Action to take with SMB requests. Default is DROP or A_DROP,
|
|
||||||
# depending on the setting of the first parameter.
|
|
||||||
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
|
|
||||||
# A_ACCEPT depending on the first parameter.
|
|
||||||
# 5 - Action to take with late DNS replies (UDP source port 53). Default
|
|
||||||
# is DROP or A_DROP depending on the first parameter.
|
|
||||||
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
|
|
||||||
# depending on the first parameter.
|
|
||||||
#
|
|
||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
?warning "You are using the deprecated Drop default action. Please see http://www.shorewall.net/Actions.html#Default"
|
|
||||||
|
|
||||||
?if passed(@1)
|
|
||||||
?if @1 eq 'audit'
|
|
||||||
DEFAULTS -,-,A_DROP,A_ACCEPT,A_DROP,A_DROP
|
|
||||||
?else
|
|
||||||
?error The first parameter to Drop must be 'audit' or '-'
|
|
||||||
?endif
|
|
||||||
?else
|
|
||||||
DEFAULTS -,-,DROP,ACCEPT,DROP,DROP
|
|
||||||
?endif
|
|
||||||
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT
|
|
||||||
#
|
|
||||||
# Count packets that come through here
|
|
||||||
#
|
|
||||||
COUNT
|
|
||||||
#
|
|
||||||
# Special Handling for Auth
|
|
||||||
#
|
|
||||||
?if passed(@2)
|
|
||||||
Auth(@2)
|
|
||||||
?endif
|
|
||||||
#
|
|
||||||
# ACCEPT critical ICMP types
|
|
||||||
#
|
|
||||||
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
|
||||||
# AllowICMPs must be before silent broadcast Drop.
|
|
||||||
#
|
|
||||||
AllowICMPs(@4) - - icmp
|
|
||||||
#
|
|
||||||
# Don't log broadcasts or multicasts
|
|
||||||
#
|
|
||||||
Broadcast(DROP,@1)
|
|
||||||
Multicast(DROP,@1)
|
|
||||||
#
|
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
|
||||||
# and just confuse people when they appear in the log.
|
|
||||||
#
|
|
||||||
Invalid(DROP,@1)
|
|
||||||
#
|
|
||||||
# Drop Microsoft noise so that it doesn't clutter up the log.
|
|
||||||
#
|
|
||||||
SMB(@3)
|
|
||||||
DropUPnP(@6)
|
|
||||||
#
|
|
||||||
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
|
||||||
#
|
|
||||||
NotSyn(DROP,@1) - - tcp
|
|
||||||
#
|
|
||||||
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
|
||||||
# the log.
|
|
||||||
#
|
|
||||||
DropDNSrep(@5)
|
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -30,4 +30,4 @@
|
|||||||
|
|
||||||
DEFAULTS ACCEPT,-
|
DEFAULTS ACCEPT,-
|
||||||
|
|
||||||
@1 - - ;;+ -p 6 --tcp-flags ACK,FIN,PSH ACK,FIN,PSH
|
@1 - - ;;+ -p 6 --tcp-flags ACK,FIN ACK,FIN
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
# the IP address that are older than <duration> seconds.
|
# the IP address that are older than <duration> seconds.
|
||||||
# Disposition - Disposition for any event generated.
|
# Disposition - Disposition for any event generated.
|
||||||
#
|
#
|
||||||
# For additional information, see http://www.shorewall.net/Events.html
|
# For additional information, see https://shorewall.org/Events.html
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# DO NOT REMOVE THE FOLLOWING LINE
|
# DO NOT REMOVE THE FOLLOWING LINE
|
||||||
@@ -114,8 +114,6 @@ if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
|||||||
|
|
||||||
if ( $command & $RESET_CMD ) {
|
if ( $command & $RESET_CMD ) {
|
||||||
require_capability 'MARK_ANYWHERE', '"reset"', 's';
|
require_capability 'MARK_ANYWHERE', '"reset"', 's';
|
||||||
|
|
||||||
print "Resetting....\n";
|
|
||||||
|
|
||||||
my $mark = $globals{EVENT_MARK};
|
my $mark = $globals{EVENT_MARK};
|
||||||
#
|
#
|
||||||
@@ -135,7 +133,7 @@ if ( $command & $RESET_CMD ) {
|
|||||||
#
|
#
|
||||||
# if the event is armed, remove it and perform the action
|
# if the event is armed, remove it and perform the action
|
||||||
#
|
#
|
||||||
perl_action_helper( $action , "-m mark --mark $mark/$mark -m recent --remove --name $event" );
|
perl_action_helper( $action , "-m mark --mark $mark/$mark -m recent --remove --name $event $srcdst" );
|
||||||
} elsif ( $command & $UPDATE_CMD ) {
|
} elsif ( $command & $UPDATE_CMD ) {
|
||||||
perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" );
|
perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" );
|
||||||
} else {
|
} else {
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
# Invalid Action
|
# Invalid Action
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -1,85 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.Reject
|
|
||||||
#
|
|
||||||
# The former default REJECT action common rules. Use of this action is deprecated.
|
|
||||||
#
|
|
||||||
# This action is invoked before a REJECT policy is enforced. The purpose
|
|
||||||
# of the action is:
|
|
||||||
#
|
|
||||||
# a) Avoid logging lots of useless cruft.
|
|
||||||
# b) Ensure that certain ICMP packets that are necessary for successful
|
|
||||||
# internet operation are always ACCEPTed.
|
|
||||||
#
|
|
||||||
# The action accepts six optional parameters:
|
|
||||||
#
|
|
||||||
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
|
|
||||||
# actions.
|
|
||||||
# 2 - Action to take with Auth requests. Default is to do nothing
|
|
||||||
# special with them.
|
|
||||||
# 3 - Action to take with SMB requests. Default is REJECT or A_REJECT,
|
|
||||||
# depending on the setting of the first parameter.
|
|
||||||
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
|
|
||||||
# A_ACCEPT depending on the first parameter.
|
|
||||||
# 5 - Action to take with late DNS replies (UDP source port 53). Default
|
|
||||||
# is DROP or A_DROP depending on the first parameter.
|
|
||||||
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
|
|
||||||
# depending on the first parameter.
|
|
||||||
#
|
|
||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
|
||||||
###############################################################################
|
|
||||||
?warning "You are using the deprecated Reject default action. Please see http://www.shorewall.net/Actions.html#Default"
|
|
||||||
|
|
||||||
?if passed(@1)
|
|
||||||
?if @1 eq 'audit'
|
|
||||||
DEFAULTS -,-,A_REJECT,A_ACCEPT,A_DROP,A_DROP
|
|
||||||
?else
|
|
||||||
?error The first parameter to Reject must be 'audit' or '-'
|
|
||||||
?endif
|
|
||||||
?else
|
|
||||||
DEFAULTS -,-,REJECT,ACCEPT,DROP,DROP
|
|
||||||
?endif
|
|
||||||
|
|
||||||
#ACTION SOURCE DEST PROTO
|
|
||||||
#
|
|
||||||
# Count packets that come through here
|
|
||||||
#
|
|
||||||
COUNT
|
|
||||||
#
|
|
||||||
# Special handling for Auth
|
|
||||||
#
|
|
||||||
?if passed(@2)
|
|
||||||
Auth(@2)
|
|
||||||
?endif
|
|
||||||
#
|
|
||||||
# ACCEPT critical ICMP types
|
|
||||||
#
|
|
||||||
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
|
||||||
# AllowICMPs must be before silent broadcast Drop.
|
|
||||||
#
|
|
||||||
AllowICMPs(@4) - - icmp
|
|
||||||
#
|
|
||||||
# Drop Broadcasts so they don't clutter up the log
|
|
||||||
# (broadcasts must *not* be rejected).
|
|
||||||
#
|
|
||||||
Broadcast(DROP,@1)
|
|
||||||
Multicast(DROP,@1)
|
|
||||||
#
|
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
|
||||||
# and just confuse people when they appear in the log (these ICMPs cannot be
|
|
||||||
# rejected).
|
|
||||||
#
|
|
||||||
Invalid(DROP,@1)
|
|
||||||
#
|
|
||||||
# Reject Microsoft noise so that it doesn't clutter up the log.
|
|
||||||
#
|
|
||||||
SMB(@3)
|
|
||||||
DropUPnP(@6)
|
|
||||||
#
|
|
||||||
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
|
||||||
#
|
|
||||||
NotSyn(DROP,@1) - - tcp
|
|
||||||
#
|
|
||||||
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
|
||||||
# the log.
|
|
||||||
#
|
|
||||||
DropDNSrep(@5)
|
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# address (dst)
|
# address (dst)
|
||||||
# Disposition - Disposition for any rule generated.
|
# Disposition - Disposition for any rule generated.
|
||||||
#
|
#
|
||||||
# For additional information, see http://www.shorewall.net/Events.html
|
# For additional information, see https://shorewall.org/Events.html
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# DO NOT REMOVE THE FOLLOWING LINE
|
# DO NOT REMOVE THE FOLLOWING LINE
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# address (dst)
|
# address (dst)
|
||||||
# Disposition - Disposition for any event generated.
|
# Disposition - Disposition for any event generated.
|
||||||
#
|
#
|
||||||
# For additional information, see http://www.shorewall.net/Events.html
|
# For additional information, see https://shorewall.org/Events.html
|
||||||
#
|
#
|
||||||
|
|
||||||
DEFAULTS -,ACCEPT,src
|
DEFAULTS -,ACCEPT,src
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# 2. Copy this file to /etc/shorewall/action.<action name>
|
# 2. Copy this file to /etc/shorewall/action.<action name>
|
||||||
# 3. Add the desired rules to that file.
|
# 3. Add the desired rules to that file.
|
||||||
#
|
#
|
||||||
# Please see http://shorewall.net/Actions.html for additional
|
# Please see https://shorewall.org/Actions.html for additional
|
||||||
# information.
|
# information.
|
||||||
#
|
#
|
||||||
# Columns are the same as in /etc/shorewall/mangle.
|
# Columns are the same as in /etc/shorewall/mangle.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# 2. Copy this file to /etc/shorewall/action.<action name>
|
# 2. Copy this file to /etc/shorewall/action.<action name>
|
||||||
# 3. Add the desired rules to that file.
|
# 3. Add the desired rules to that file.
|
||||||
#
|
#
|
||||||
# Please see http://shorewall.net/Actions.html for additional
|
# Please see https://shorewall.org/Actions.html for additional
|
||||||
# information.
|
# information.
|
||||||
#
|
#
|
||||||
# Columns are the same as in /etc/shorewall/rules.
|
# Columns are the same as in /etc/shorewall/rules.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Shorewall WAN Interface monitor - V4.4
|
# Shorewall WAN Interface monitor - V5.2
|
||||||
#
|
#
|
||||||
# Inspired by Angsuman Chakraborty's gwping script.
|
# Inspired by Angsuman Chakraborty's gwping script.
|
||||||
#
|
#
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
# For information about this script, see http://www.shorewall.net/MultiISP.html#swping.
|
# For information about this script, see https://shorewall.org/MultiISP.html#swping.
|
||||||
#
|
#
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
#
|
#
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shorewall WAN Interface monitor - V4.4
|
# Shorewall WAN Interface monitor - V5.2
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at https://shorewall.org
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -18,7 +18,7 @@ Shoreline Firewall (Shorewall) Version 5
|
|||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Please see http://www.shorewall.net/Install.htm for installation
|
Please see https://shorewall.org/Install.htm for installation
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
|
||||||
|
9
Shorewall/Macros/IPFS-swarm
Normal file
9
Shorewall/Macros/IPFS-swarm
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.IPFS-swarm
|
||||||
|
#
|
||||||
|
# This macro handles IPFS data traffic (the connection to IPFS swarm).
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 4001
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall - /usr/share/shorewall/macro.SNMPtrap
|
# Shorewall -- /usr/share/shorewall/macro.Apcupsd
|
||||||
#
|
#
|
||||||
# This macro deprecated by SNMPtrap.
|
# This macro handles apcupsd traffic.
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
SNMPtrap
|
PARAM - - tcp 3551
|
8
Shorewall/Macros/macro.Bitcoin
Normal file
8
Shorewall/Macros/macro.Bitcoin
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.Bitcoin
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin P2P traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 8333
|
8
Shorewall/Macros/macro.BitcoinRPC
Normal file
8
Shorewall/Macros/macro.BitcoinRPC
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.BitcoinRPC
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin RPC traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 8332
|
8
Shorewall/Macros/macro.BitcoinRegtest
Normal file
8
Shorewall/Macros/macro.BitcoinRegtest
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.BitcoinRegtest
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin P2P traffic (Regtest mode)
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 18444
|
8
Shorewall/Macros/macro.BitcoinTestnet
Normal file
8
Shorewall/Macros/macro.BitcoinTestnet
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.BitcoinTestnet
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin P2P traffic (Testnet mode)
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 18333
|
8
Shorewall/Macros/macro.BitcoinTestnetRPC
Normal file
8
Shorewall/Macros/macro.BitcoinTestnetRPC
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.BitcoinTestnetRPC
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin RPC traffic (Testnet and Regtest mode)
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 18332
|
9
Shorewall/Macros/macro.BitcoinZMQ
Normal file
9
Shorewall/Macros/macro.BitcoinZMQ
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.BitcoinZMQ
|
||||||
|
#
|
||||||
|
# Macro for handling Bitcoin ZMQ traffic
|
||||||
|
# See https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 28332
|
12
Shorewall/Macros/macro.Cockpit
Normal file
12
Shorewall/Macros/macro.Cockpit
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.Cockpit
|
||||||
|
#
|
||||||
|
# This macro handles Time protocol (RFC868).
|
||||||
|
# Unless you are supporting extremely old hardware or software,
|
||||||
|
# you shouldn't be using this. NTP is a superior alternative.
|
||||||
|
#
|
||||||
|
# By Eric Teeter
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 9090
|
16
Shorewall/Macros/macro.FreeIPA
Normal file
16
Shorewall/Macros/macro.FreeIPA
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.FreeIPA
|
||||||
|
#
|
||||||
|
# This macro handles FreeIPA server traffic.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
DNS
|
||||||
|
HTTP
|
||||||
|
HTTPS
|
||||||
|
Kerberos
|
||||||
|
Kpasswd
|
||||||
|
LDAP
|
||||||
|
LDAPS
|
||||||
|
NTP
|
9
Shorewall/Macros/macro.IPFS-API
Normal file
9
Shorewall/Macros/macro.IPFS-API
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.IPFS-API
|
||||||
|
#
|
||||||
|
# This macro handles IPFS API port (commands for the IPFS daemon).
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 5001
|
9
Shorewall/Macros/macro.IPFS-gateway
Normal file
9
Shorewall/Macros/macro.IPFS-gateway
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.IPFS-gateway
|
||||||
|
#
|
||||||
|
# This macro handles the IPFS gateway to HTTP.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 8080
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user