forked from extern/shorewall_code
Compare commits
450 Commits
5.2.0-Beta
...
5.2.8-base
Author | SHA1 | Date | |
---|---|---|---|
|
97165ed41e | ||
|
5b0cacd9c4 | ||
|
eeec6f2396 | ||
|
34c59dca32 | ||
|
9aa2a4b704 | ||
|
d363809859 | ||
|
6c4383b5ce | ||
|
877807943d | ||
|
378df2861a | ||
|
f84be9faa4 | ||
|
c6dea1525f | ||
|
a7505f3ecb | ||
|
8c10c96844 | ||
|
126c5ccd53 | ||
|
1ca886abd7 | ||
|
ca78c0221c | ||
|
e4c2122532 | ||
|
f16e666858 | ||
|
b5f3294adb | ||
|
8d4e79650e | ||
|
b253be8a69 | ||
|
4385264dc3 | ||
|
6cab1c3c8c | ||
|
fe7bb4abca | ||
|
63b477a4de | ||
|
2166251b97 | ||
|
9e6aec7687 | ||
|
b154803f22 | ||
|
09449d4c67 | ||
|
774be17a32 | ||
|
6120eba8f9 | ||
|
6e8b25f126 | ||
|
1dca860425 | ||
|
bb9d574bf8 | ||
|
4253f23d6b | ||
|
1e90a52b31 | ||
|
b11bea1d4d | ||
|
130b3e16e5 | ||
|
11aa92c5fc | ||
|
68c0897352 | ||
|
344bbeacb7 | ||
|
3073185b39 | ||
|
ef9c153dd5 | ||
|
fa010dc020 | ||
|
770637902f | ||
|
2f56edc1ed | ||
|
bc4c6637c3 | ||
|
0b80856eb6 | ||
|
92689b12bd | ||
|
070efee47a | ||
|
d03146491b | ||
|
995a939a37 | ||
|
ca19feae69 | ||
|
bc7082fb2a | ||
|
109ae7e038 | ||
|
b3ebcc8025 | ||
|
954c0185fa | ||
|
8d025e3821 | ||
|
49ba75252e | ||
|
c835fead34 | ||
|
ac221348c0 | ||
|
381a0ad8aa | ||
|
4b3f9ae1e7 | ||
|
89201bd294 | ||
|
b617c8d224 | ||
|
d1d8371eb8 | ||
|
5d58b5da72 | ||
|
4469ddb861 | ||
|
cd5409d633 | ||
|
2f58d4e368 | ||
|
31844d22cd | ||
|
628f5f0903 | ||
|
ce73c783dc | ||
|
e7318459f1 | ||
|
467d41f0cc | ||
|
ff64539de3 | ||
|
418f96082e | ||
|
b761a6eaa0 | ||
|
f8b7815375 | ||
|
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 |
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.8-RC1
|
9
Shorewall-core/configure
vendored
9
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,2017 - 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';
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2000-2018 - 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\""
|
||||||
|
@@ -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.
|
||||||
#
|
#
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.1 -- /usr/share/shorewall/lib.cli.
|
# Shorewall 5.2 -- /usr/share/shorewall/lib.cli
|
||||||
#
|
#
|
||||||
# (c) 1999-2018 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999-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.
|
||||||
#
|
#
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
# loaded after this one and replaces some of the functions declared here.
|
# loaded after this one and replaces some of the functions declared here.
|
||||||
#
|
#
|
||||||
|
|
||||||
SHOREWALL_CAPVERSION=50200
|
SHOREWALL_CAPVERSION=50207
|
||||||
|
|
||||||
if [ -z "$g_basedir" ]; then
|
if [ -z "$g_basedir" ]; then
|
||||||
#
|
#
|
||||||
@@ -247,10 +247,39 @@ search_log() # $1 = IP address to search for
|
|||||||
#
|
#
|
||||||
# Show traffic control information
|
# Show traffic control information
|
||||||
#
|
#
|
||||||
show_tc1() {
|
show_one_classifier() {
|
||||||
|
local class
|
||||||
|
|
||||||
|
qt tc -s filter ls root dev $1 && tc -s filter ls root dev $device | grep -v '^$'
|
||||||
|
tc filter show dev $1
|
||||||
|
tc class show dev $1 | fgrep 'leaf ' | fgrep -v ' hfsc' | sed 's/^.*leaf //;s/ .*//' | while read class; do
|
||||||
|
if [ -n "$class" ]; then
|
||||||
|
echo
|
||||||
|
echo Node $class
|
||||||
|
tc filter show dev $device parent $class
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
show_classifier1() {
|
||||||
|
local device
|
||||||
|
local qdisc
|
||||||
|
|
||||||
|
device=${1%@*}
|
||||||
|
qdisc=$(tc qdisc list dev $device)
|
||||||
|
if [ -n "$qdisc" ]; then
|
||||||
|
echo Device $device:
|
||||||
|
show_one_classifier $device
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
show_tc1() {
|
||||||
show_one_tc() {
|
show_one_tc() {
|
||||||
local device
|
local device
|
||||||
|
local qdisc
|
||||||
|
local ingress
|
||||||
|
|
||||||
device=${1%@*}
|
device=${1%@*}
|
||||||
qdisc=$(tc qdisc list dev $device)
|
qdisc=$(tc qdisc list dev $device)
|
||||||
|
|
||||||
@@ -260,6 +289,7 @@ show_tc1() {
|
|||||||
echo
|
echo
|
||||||
tc -s -d class show dev $device
|
tc -s -d class show dev $device
|
||||||
echo
|
echo
|
||||||
|
show_one_classifier $device "$qdisc"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,7 +300,6 @@ show_tc1() {
|
|||||||
show_one_tc ${interface%:}
|
show_one_tc ${interface%:}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
show_tc() {
|
show_tc() {
|
||||||
@@ -291,28 +320,8 @@ show_tc() {
|
|||||||
#
|
#
|
||||||
show_classifiers() {
|
show_classifiers() {
|
||||||
|
|
||||||
show_one_classifier() {
|
|
||||||
local device
|
|
||||||
device=${1%@*}
|
|
||||||
qdisc=$(tc qdisc list dev $device)
|
|
||||||
|
|
||||||
if [ -n "$qdisc" ]; then
|
|
||||||
echo Device $device:
|
|
||||||
qt tc -s filter ls root dev $device && tc -s filter ls root dev $device | grep -v '^$'
|
|
||||||
tc filter show dev $device
|
|
||||||
tc class show dev $device | fgrep 'leaf ' | fgrep -v ' hfsc' | sed 's/^.*leaf //;s/ .*//' | while read class; do
|
|
||||||
if [ -n "$class" ]; then
|
|
||||||
echo
|
|
||||||
echo Node $class
|
|
||||||
tc filter show dev $device parent $class
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
ip -o link list | while read inx interface details; do
|
ip -o link list | while read inx interface details; do
|
||||||
show_one_classifier ${interface%:}
|
show_classifier1 ${interface%:}
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -937,11 +946,28 @@ show_events() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort_actions() {
|
||||||
|
local sep #separates sort keys from the action[.std] record
|
||||||
|
sep="##"
|
||||||
|
|
||||||
|
awk -v sep="$sep" \
|
||||||
|
'BEGIN { action = ""; ifrec = ""; nr = 0; };\
|
||||||
|
/^#/ { next; };\
|
||||||
|
/^\?(if|IF|If)/ { ifrec = $0; nr = NR; next; };\
|
||||||
|
/^( |\t|\?)/ { if ( action != "" ) print action, NR, sep $0; next; };\
|
||||||
|
{ action = $1; };\
|
||||||
|
nr != 0 { print action , nr, sep ifrec; nr = 0; };\
|
||||||
|
{ print action , NR, sep $0; }' | sort -k 1,2 | sed "s/^.*${sep}//"
|
||||||
|
}
|
||||||
|
|
||||||
show_actions() {
|
show_actions() {
|
||||||
if [ -f ${g_confdir}/actions ]; then
|
local actions
|
||||||
cat ${g_sharedir}/actions.std ${g_confdir}/actions | grep -Ev '^[#?[:space:]]|^$'
|
actions=$(find_file actions)
|
||||||
|
|
||||||
|
if [ -f ${actions} ]; then
|
||||||
|
cat ${actions} ${g_sharedir}/actions.std | sort_actions
|
||||||
else
|
else
|
||||||
grep -Ev '^[#?[:space:]]|^$' ${g_sharedir}/actions.std
|
sort_actions < ${g_sharedir}/actions.std
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,6 +1026,8 @@ show_mangle() {
|
|||||||
show_classifiers_command() {
|
show_classifiers_command() {
|
||||||
echo "$g_product $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
|
echo "$g_product $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
|
||||||
echo
|
echo
|
||||||
|
echo "Warning: This command is deprecated in favor of the 'show tc' command"
|
||||||
|
echo
|
||||||
show_classifiers
|
show_classifiers
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1108,10 +1136,6 @@ show_blacklists() {
|
|||||||
show_bl;
|
show_bl;
|
||||||
}
|
}
|
||||||
|
|
||||||
show_actions_sorted() {
|
|
||||||
show_actions | sort
|
|
||||||
}
|
|
||||||
|
|
||||||
show_macros() {
|
show_macros() {
|
||||||
for directory in $(split $CONFIG_PATH); do
|
for directory in $(split $CONFIG_PATH); do
|
||||||
temp=
|
temp=
|
||||||
@@ -1201,11 +1225,17 @@ show_saves_command() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
for f in ${VARDIR}/*-iptables; do
|
for f in ${VARDIR}/*-iptables; do
|
||||||
fn=$(basename $f)
|
case $f in
|
||||||
fn=${fn%-iptables}
|
*\**)
|
||||||
mtime=$(ls -lt $f | tail -n 1 | cut -d ' ' -f '6 7 8' )
|
;;
|
||||||
[ $fn = "$RESTOREFILE" ] && fn="$fn (default)"
|
*)
|
||||||
echo " $mtime ${fn%-iptables}"
|
fn=$(basename $f)
|
||||||
|
fn=${fn%-iptables}
|
||||||
|
mtime=$(ls -lt $f | tail -n 1 | cut -d ' ' -f '6 7 8' )
|
||||||
|
[ $fn = "$RESTOREFILE" ] && fn="$fn (default)"
|
||||||
|
echo " $mtime ${fn%-iptables}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -1432,6 +1462,17 @@ show_command() {
|
|||||||
vardir)
|
vardir)
|
||||||
echo $VARDIR;
|
echo $VARDIR;
|
||||||
;;
|
;;
|
||||||
|
rc)
|
||||||
|
shift
|
||||||
|
[ $# -gt 1 ] && too_many_arguments $2
|
||||||
|
if [ -n "$1" -a -d "$1" ]; then
|
||||||
|
cat $1/shorewallrc
|
||||||
|
elif [ -n "$g_basedir" -a -d "$g_basedir" ]; then
|
||||||
|
cat $g_basedir/shorewallrc
|
||||||
|
else
|
||||||
|
fatal_error "Can not determine the location of the shorewallrc file."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
policies)
|
policies)
|
||||||
only_root
|
only_root
|
||||||
[ $# -gt 1 ] && too_many_arguments $2
|
[ $# -gt 1 ] && too_many_arguments $2
|
||||||
@@ -1526,7 +1567,7 @@ show_command() {
|
|||||||
;;
|
;;
|
||||||
actions)
|
actions)
|
||||||
[ $# -gt 1 ] && too_many_arguments $2
|
[ $# -gt 1 ] && too_many_arguments $2
|
||||||
eval show_actions_sorted $g_pager
|
eval show_actions $g_pager
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
macro)
|
macro)
|
||||||
@@ -1874,8 +1915,6 @@ do_dump_command() {
|
|||||||
if [ -n "$TC_ENABLED" ]; then
|
if [ -n "$TC_ENABLED" ]; then
|
||||||
heading "Traffic Control"
|
heading "Traffic Control"
|
||||||
show_tc1
|
show_tc1
|
||||||
heading "TC Filters"
|
|
||||||
show_classifiers
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2634,6 +2673,7 @@ allow_command() {
|
|||||||
if [ -n "$g_blacklistipset" ]; then
|
if [ -n "$g_blacklistipset" ]; then
|
||||||
if qt $IPSET -D $g_blacklistipset $1; then
|
if qt $IPSET -D $g_blacklistipset $1; then
|
||||||
allowed=Yes
|
allowed=Yes
|
||||||
|
[ -n "$g_dbllog" ] && mylogger daemon.info "$g_product: $1 Allowed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2650,6 +2690,7 @@ allow_command() {
|
|||||||
*)
|
*)
|
||||||
if [ -n "$g_blacklistipset" ]; then
|
if [ -n "$g_blacklistipset" ]; then
|
||||||
if qt $IPSET -D $g_blacklistipset $1; then
|
if qt $IPSET -D $g_blacklistipset $1; then
|
||||||
|
[ -n "$g_dbllog" ] && mylogger daemon.info "$g_product: $1 Allowed"
|
||||||
allowed=Yes
|
allowed=Yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -2749,7 +2790,7 @@ determine_capabilities() {
|
|||||||
g_tool=$(mywhich $tool)
|
g_tool=$(mywhich $tool)
|
||||||
|
|
||||||
if [ -z "$g_tool" ]; then
|
if [ -z "$g_tool" ]; then
|
||||||
fatal-error "No executable $tool binary can be found on your PATH"
|
fatal_error "No executable $tool binary can be found on your PATH"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2846,6 +2887,7 @@ determine_capabilities() {
|
|||||||
NETMAP_TARGET=
|
NETMAP_TARGET=
|
||||||
NFLOG_SIZE=
|
NFLOG_SIZE=
|
||||||
RESTORE_WAIT_OPTION=
|
RESTORE_WAIT_OPTION=
|
||||||
|
CONNMARK_ACTION=
|
||||||
|
|
||||||
AMANDA_HELPER=
|
AMANDA_HELPER=
|
||||||
FTP_HELPER=
|
FTP_HELPER=
|
||||||
@@ -3213,6 +3255,10 @@ determine_capabilities() {
|
|||||||
BASIC_FILTER=Yes
|
BASIC_FILTER=Yes
|
||||||
$TC filter add basic help 2>&1 | egrep -q match && BASIC_EMATCH=Yes
|
$TC filter add basic help 2>&1 | egrep -q match && BASIC_EMATCH=Yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $TC action add connmark help 2>&1 | grep -q ^Usage; then
|
||||||
|
CONNMARK_ACTION=Yes
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
||||||
@@ -3356,6 +3402,7 @@ report_capabilities_unsorted() {
|
|||||||
report_capability "NETMAP Target (NETMAP_TARGET)" $NETMAP_TARGET
|
report_capability "NETMAP Target (NETMAP_TARGET)" $NETMAP_TARGET
|
||||||
report_capability "--nflog-size support (NFLOG_SIZE)" $NFLOG_SIZE
|
report_capability "--nflog-size support (NFLOG_SIZE)" $NFLOG_SIZE
|
||||||
report_capability "INPUT chain in nat table (NAT_INPUT_CHAIN)" $NAT_INPUT_CHAIN
|
report_capability "INPUT chain in nat table (NAT_INPUT_CHAIN)" $NAT_INPUT_CHAIN
|
||||||
|
report_capability "TC connmark support (CONNMARK_ACTION)" $CONNMARK_ACTION
|
||||||
|
|
||||||
echo " Kernel Version (KERNELVERSION): $KERNELVERSION"
|
echo " Kernel Version (KERNELVERSION): $KERNELVERSION"
|
||||||
echo " Capabilities Version (CAPVERSION): $CAPVERSION"
|
echo " Capabilities Version (CAPVERSION): $CAPVERSION"
|
||||||
@@ -3462,6 +3509,7 @@ report_capabilities_unsorted1() {
|
|||||||
report_capability1 NFLOG_SIZE
|
report_capability1 NFLOG_SIZE
|
||||||
report_capability1 RESTORE_WAIT_OPTION
|
report_capability1 RESTORE_WAIT_OPTION
|
||||||
report_capability1 NAT_INPUT_CHAIN
|
report_capability1 NAT_INPUT_CHAIN
|
||||||
|
report_capability1 CONNMARK_ACTION
|
||||||
|
|
||||||
report_capability1 AMANDA_HELPER
|
report_capability1 AMANDA_HELPER
|
||||||
report_capability1 FTP_HELPER
|
report_capability1 FTP_HELPER
|
||||||
@@ -3557,7 +3605,7 @@ status_command() {
|
|||||||
|
|
||||||
[ $# -eq 0 ] || missing_argument
|
[ $# -eq 0 ] || missing_argument
|
||||||
|
|
||||||
[ $VERBOSITY -ge 1 ] && echo "${g_product}-$SHOREWALL_VERSION Status at $g_hostname - $(date)" && echo
|
[ $VERBOSITY -ge 1 ] && echo "${g_product} $SHOREWALL_VERSION Status at $g_hostname - $(date)" && echo
|
||||||
show_status
|
show_status
|
||||||
[ -n "$interfaces" ] && show_interfaces
|
[ -n "$interfaces" ] && show_interfaces
|
||||||
exit $status
|
exit $status
|
||||||
@@ -3605,6 +3653,7 @@ reject_command() {
|
|||||||
|
|
||||||
blacklist_command() {
|
blacklist_command() {
|
||||||
local family
|
local family
|
||||||
|
local timeout
|
||||||
|
|
||||||
[ $# -gt 0 ] || fatal_error "Missing address"
|
[ $# -gt 0 ] || fatal_error "Missing address"
|
||||||
|
|
||||||
@@ -3622,10 +3671,17 @@ blacklist_command() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if $IPSET -A $g_blacklistipset $@ -exist; then
|
if [ $COMMAND = 'blacklist!' ]; then
|
||||||
|
timeout='timeout 0'
|
||||||
|
else
|
||||||
|
echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $IPSET -A $g_blacklistipset $@ $timeout -exist; then
|
||||||
local message
|
local message
|
||||||
|
|
||||||
progress_message2 "$1 Blacklisted"
|
progress_message2 "$1 Blacklisted"
|
||||||
|
[ -n "$g_dbllog" ] && mylogger daemon.info "$g_product: $1 Blacklisted"
|
||||||
|
|
||||||
if [ -n "$g_disconnect" ]; then
|
if [ -n "$g_disconnect" ]; then
|
||||||
message="$(conntrack -D -s $1 2>&1)"
|
message="$(conntrack -D -s $1 2>&1)"
|
||||||
@@ -3758,7 +3814,7 @@ ipcalc_command() {
|
|||||||
elif [ $# -eq 3 ]; then
|
elif [ $# -eq 3 ]; then
|
||||||
address=$2
|
address=$2
|
||||||
vlsm=$(ip_vlsm $3)
|
vlsm=$(ip_vlsm $3)
|
||||||
elif [ $# -eq 0 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
missing_argument
|
missing_argument
|
||||||
else
|
else
|
||||||
too_many_arguments $4
|
too_many_arguments $4
|
||||||
@@ -3804,7 +3860,7 @@ iprange_command() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ipdecimal_command() {
|
ipdecimal_command() {
|
||||||
if [ $# eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
missing_argument
|
missing_argument
|
||||||
else
|
else
|
||||||
[ $# -eq 2 ] || too_many_arguments $3
|
[ $# -eq 2 ] || too_many_arguments $3
|
||||||
@@ -3847,7 +3903,7 @@ noiptrace_command() {
|
|||||||
verify_firewall_script() {
|
verify_firewall_script() {
|
||||||
if [ ! -f $g_firewall ]; then
|
if [ ! -f $g_firewall ]; then
|
||||||
echo " ERROR: $g_product is not properly installed" >&2
|
echo " ERROR: $g_product is not properly installed" >&2
|
||||||
if [ -L $g_firewall ]; then
|
if [ -h $g_firewall ]; then
|
||||||
echo " $g_firewall is a symbolic link to a" >&2
|
echo " $g_firewall is a symbolic link to a" >&2
|
||||||
echo " non-existant file" >&2
|
echo " non-existant file" >&2
|
||||||
else
|
else
|
||||||
@@ -3880,7 +3936,7 @@ setup_dbl() {
|
|||||||
case $DYNAMIC_BLACKLIST in
|
case $DYNAMIC_BLACKLIST in
|
||||||
ipset*,src-dst*)
|
ipset*,src-dst*)
|
||||||
#
|
#
|
||||||
# This utility doesn't need to know about 'src-dst'
|
# Capture 'src-dst'
|
||||||
#
|
#
|
||||||
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed 's/,src-dst//')
|
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed 's/,src-dst//')
|
||||||
|
|
||||||
@@ -3888,11 +3944,49 @@ setup_dbl() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case $DYNAMIC_BLACKLIST in
|
||||||
|
ipset*,log*)
|
||||||
|
#
|
||||||
|
# Capture 'log'
|
||||||
|
#
|
||||||
|
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed 's/,log//')
|
||||||
|
|
||||||
|
g_dbllog=Yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $DYNAMIC_BLACKLIST in
|
||||||
|
ipset*,noupdate*)
|
||||||
|
#
|
||||||
|
# This utility doesn't use this option
|
||||||
|
#
|
||||||
|
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed 's/,noupdate//')
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $DYNAMIC_BLACKLIST in
|
case $DYNAMIC_BLACKLIST in
|
||||||
ipset*,timeout*)
|
ipset*,timeout*)
|
||||||
#
|
#
|
||||||
# This utility doesn't need to know about 'timeout=nnn'
|
# Capture timeout
|
||||||
#
|
#
|
||||||
|
local ifs
|
||||||
|
local f
|
||||||
|
|
||||||
|
ifs=$IFS
|
||||||
|
IFS=','
|
||||||
|
|
||||||
|
for f in $DYNAMIC_BLACKLIST; do
|
||||||
|
case $f in
|
||||||
|
timeout=*)
|
||||||
|
g_dbltimeout=${f#timeout=}
|
||||||
|
g_dbltimeout=${g_dbltimeout%%:*}
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
IFS=$ifs
|
||||||
|
|
||||||
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed -r 's/,timeout=[[:digit:]]+//')
|
DYNAMIC_BLACKLIST=$(echo $DYNAMIC_BLACKLIST | sed -r 's/,timeout=[[:digit:]]+//')
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -3925,9 +4019,15 @@ setup_dbl() {
|
|||||||
# the Standard CLI by loading lib.cli-std
|
# the Standard CLI by loading lib.cli-std
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Set the configuration variables from shorewall[6]-lite.conf.
|
# Set the configuration variables from shorewall[6]-lite.conf. This function
|
||||||
|
# is replaced by the one in lib.cli-std (Shorewall product) when Shorewall or
|
||||||
|
# Shorewall6 is being run.
|
||||||
#
|
#
|
||||||
get_config() {
|
# $1 = Yes: read the params file
|
||||||
|
# $2 = Yes: check for STARTUP_ENABLED
|
||||||
|
# $3 = Yes: Check for LOGFILE
|
||||||
|
#
|
||||||
|
lite_get_config() {
|
||||||
local config
|
local config
|
||||||
local lib
|
local lib
|
||||||
|
|
||||||
@@ -3947,7 +4047,7 @@ get_config() {
|
|||||||
|
|
||||||
ensure_config_path
|
ensure_config_path
|
||||||
|
|
||||||
[ -f $g_firewall.conf ] && . ${VARDIR}/firewall.conf
|
[ -f ${VARDIR}/firewall.conf ] && . ${VARDIR}/firewall.conf
|
||||||
|
|
||||||
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||||
|
|
||||||
@@ -4076,7 +4176,7 @@ get_config() {
|
|||||||
|
|
||||||
[ -x "$g_pager" ] || fatal_error "PAGER $g_pager is not executable"
|
[ -x "$g_pager" ] || fatal_error "PAGER $g_pager is not executable"
|
||||||
|
|
||||||
g_pager="| $g_pager"
|
g_pager="2>&1 | $g_pager"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -4089,10 +4189,22 @@ get_config() {
|
|||||||
[ -f $lib ] && . $lib
|
[ -f $lib ] && . $lib
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# get_config() -- calls the appropriate xxx_get_config()
|
||||||
|
#
|
||||||
|
get_config() {
|
||||||
|
if [ -z "$g_lite" ]; then
|
||||||
|
std_get_config $@
|
||||||
|
else
|
||||||
|
lite_get_config $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start Command Executor
|
# Start Command Executor
|
||||||
#
|
#
|
||||||
start_command() {
|
lite_start_command() {
|
||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
|
|
||||||
@@ -4103,14 +4215,14 @@ start_command() {
|
|||||||
|
|
||||||
if [ -x $g_firewall ]; then
|
if [ -x $g_firewall ]; then
|
||||||
if [ -n "$g_fast" -a -x ${VARDIR}/${RESTOREFILE} -a ! $g_firewall -nt ${VARDIR}/${RESTOREFILE} ]; then
|
if [ -n "$g_fast" -a -x ${VARDIR}/${RESTOREFILE} -a ! $g_firewall -nt ${VARDIR}/${RESTOREFILE} ]; then
|
||||||
run_it ${VARDIR}/${RESTOREFILE} $g_debugging restore
|
run_it ${VARDIR}/${RESTOREFILE} restore
|
||||||
else
|
else
|
||||||
run_it $g_firewall $g_debugging start
|
run_it $g_firewall start
|
||||||
fi
|
fi
|
||||||
rc=$?
|
rc=$?
|
||||||
else
|
else
|
||||||
error_message "$g_firewall is missing or is not executable"
|
error_message "$g_firewall is missing or is not executable"
|
||||||
mylogger kern.err "ERROR:$g_product start failed"
|
mylogger daemon.err "ERROR:$g_product start failed"
|
||||||
rc=6
|
rc=6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -4179,10 +4291,21 @@ start_command() {
|
|||||||
do_it
|
do_it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# start_command() -- calls the appropriate xxx_start_command()
|
||||||
|
#
|
||||||
|
start_command() {
|
||||||
|
if [ -z "$g_lite" ]; then
|
||||||
|
std_start_command $@
|
||||||
|
else
|
||||||
|
lite_start_command $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Reload/Restart Command Executor
|
# Reload/Restart Command Executor
|
||||||
#
|
#
|
||||||
restart_command() {
|
lite_restart_command() {
|
||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
local rc
|
local rc
|
||||||
@@ -4239,11 +4362,11 @@ restart_command() {
|
|||||||
[ -n "$g_nolock" ] || mutex_on
|
[ -n "$g_nolock" ] || mutex_on
|
||||||
|
|
||||||
if [ -x $g_firewall ]; then
|
if [ -x $g_firewall ]; then
|
||||||
run_it $g_firewall $g_debugging $COMMAND
|
run_it $g_firewall $COMMAND
|
||||||
rc=$?
|
rc=$?
|
||||||
else
|
else
|
||||||
error_message "$g_firewall is missing or is not executable"
|
error_message "$g_firewall is missing or is not executable"
|
||||||
mylogger kern.err "ERROR:$g_product $COMMAND failed"
|
mylogger daemon.err "ERROR:$g_product $COMMAND failed"
|
||||||
rc=6
|
rc=6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -4251,9 +4374,20 @@ restart_command() {
|
|||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# restart_command() -- calls the appropriate xxx_restart_command()
|
||||||
|
#
|
||||||
|
restart_command() {
|
||||||
|
if [ -z "$g_lite" ]; then
|
||||||
|
std_restart_command $@
|
||||||
|
else
|
||||||
|
lite_restart_command $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
run_command() {
|
run_command() {
|
||||||
if [ -x $g_firewall ] ; then
|
if [ -x $g_firewall ] ; then
|
||||||
run_it $g_firewall $g_debugging $@
|
run_it $g_firewall $@
|
||||||
else
|
else
|
||||||
fatal_error "$g_firewall does not exist or is not executable"
|
fatal_error "$g_firewall does not exist or is not executable"
|
||||||
fi
|
fi
|
||||||
@@ -4270,14 +4404,20 @@ ecko() {
|
|||||||
#
|
#
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v[-1|{0-2}] ] [ -t ] <command>"
|
echo "Usage: $(basename $0) [ -T ] [ -D ] [ -N ] [ -q ] [ -v[-1|{0-2}] ] [ -t ] <command>"
|
||||||
|
echo " -T : Direct the generated script to produce a shell trace to standard error"
|
||||||
|
echo " -D : Debug iptables commands"
|
||||||
|
echo " -N : Don't take the master shorewall lock"
|
||||||
|
echo " -q : Standard Shorewall verbosity control"
|
||||||
|
echo " -v : Standard Shorewall verbosity control"
|
||||||
|
echo " -t : Timestamp all messages"
|
||||||
echo "where <command> is one of:"
|
echo "where <command> is one of:"
|
||||||
echo " add <interface>[:<host-list>] ... <zone>"
|
echo " add <interface>[:<host-list>] ... <zone>"
|
||||||
echo " allow <address> ..."
|
echo " allow <address> ..."
|
||||||
echo " blacklist <address> [ <option> ... ]"
|
echo " blacklist <address> [ <option> ... ]"
|
||||||
ecko " [ check | ck ] [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ -i ] [ <directory> ]"
|
ecko " [ check | ck ] [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ -i ] [ -D ] [ <directory> ]"
|
||||||
echo " clear"
|
echo " clear"
|
||||||
ecko " [ compile | co ] [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ -i ] [ <directory name> ] [ <path name> ]"
|
ecko " [ compile | co ] [ -e ] [ -p ] [ -t ] [ -c ] [ -d ] [ -T ] [ -i ] [ -D ] [ <directory name> ] [ <path name> ]"
|
||||||
echo " close <source> <dest> [ <protocol> [ <port> ] ]"
|
echo " close <source> <dest> [ <protocol> [ <port> ] ]"
|
||||||
echo " delete <interface>[:<host-list>] ... <zone>"
|
echo " delete <interface>[:<host-list>] ... <zone>"
|
||||||
echo " disable <interface>"
|
echo " disable <interface>"
|
||||||
@@ -4300,7 +4440,6 @@ usage() # $1 = exit status
|
|||||||
echo " iptrace <ip6tables match expression>"
|
echo " iptrace <ip6tables match expression>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ecko " load [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
|
||||||
echo " logdrop <address> ..."
|
echo " logdrop <address> ..."
|
||||||
echo " logreject <address> ..."
|
echo " logreject <address> ..."
|
||||||
echo " logwatch [<refresh interval>]"
|
echo " logwatch [<refresh interval>]"
|
||||||
@@ -4318,13 +4457,15 @@ usage() # $1 = exit status
|
|||||||
if [ -n "$g_lite" ]; then
|
if [ -n "$g_lite" ]; then
|
||||||
echo " reload [ -n ] [ -p ] [ -f ] [ -C ] [ <directory> ]"
|
echo " reload [ -n ] [ -p ] [ -f ] [ -C ] [ <directory> ]"
|
||||||
else
|
else
|
||||||
echo " reload [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ -C ] [ <directory> ]"
|
echo " reload [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ -C ] [ -D ] [ <directory> ]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$g_lite" ]; then
|
if [ -z "$g_lite" ]; then
|
||||||
echo " remote-reload [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-getrc [ -T ] [ -c ] [ -r <root-name> ] [ [ -D ] <directory> ] [ <system> ]"
|
||||||
echo " remote-restart [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-getcaps [ -T ] [ -R ] [ -r <root-name> ] [ [ -D ] <directory> ] [ <system> ]"
|
||||||
echo " remote-start [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-reload [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] [ <system> ]"
|
||||||
|
echo " remote-restart [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] [ <system> ]"
|
||||||
|
echo " remote-start [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] [ <system> ]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " reset [ <chain> ... ]"
|
echo " reset [ <chain> ... ]"
|
||||||
@@ -4332,7 +4473,7 @@ usage() # $1 = exit status
|
|||||||
if [ -n "$g_lite" ]; then
|
if [ -n "$g_lite" ]; then
|
||||||
echo " restart [ -n ] [ -p ] [ -f ] [ -C ] [ <directory> ]"
|
echo " restart [ -n ] [ -p ] [ -f ] [ -C ] [ <directory> ]"
|
||||||
else
|
else
|
||||||
echo " restart [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ -C ] [ <directory> ]"
|
echo " restart [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ -C ] [ -D ] [ <directory> ]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " restore [ -n ] [ -p ] [ -C ] [ <file name> ]"
|
echo " restore [ -n ] [ -p ] [ -C ] [ <file name> ]"
|
||||||
@@ -4347,12 +4488,11 @@ usage() # $1 = exit status
|
|||||||
echo " [ show | list | ls ] arptables"
|
echo " [ show | list | ls ] arptables"
|
||||||
echo " [ show | list | ls ] [ -f ] capabilities"
|
echo " [ show | list | ls ] [ -f ] capabilities"
|
||||||
echo " [ show | list | ls ] [ -x ] {bl|blacklists}"
|
echo " [ show | list | ls ] [ -x ] {bl|blacklists}"
|
||||||
echo " [ show | list | ls ] classifiers"
|
echo " [ show | list | ls ] {classifiers|filters)"
|
||||||
echo " [ show | list | ls ] config"
|
echo " [ show | list | ls ] config"
|
||||||
echo " [ show | list | ls ] connections"
|
echo " [ show | list | ls ] connections"
|
||||||
echo " [ show | list | ls ] event [ <event> ...]"
|
echo " [ show | list | ls ] event [ <event> ...]"
|
||||||
echo " [ show | list | ls ] events"
|
echo " [ show | list | ls ] events"
|
||||||
echo " [ show | list | ls ] filters"
|
|
||||||
echo " [ show | list | ls ] ip"
|
echo " [ show | list | ls ] ip"
|
||||||
|
|
||||||
if [ $g_family -eq 4 ]; then
|
if [ $g_family -eq 4 ]; then
|
||||||
@@ -4367,6 +4507,7 @@ usage() # $1 = exit status
|
|||||||
echo " [ show | list | ls ] nfacct"
|
echo " [ show | list | ls ] nfacct"
|
||||||
echo " [ show | list | ls ] opens"
|
echo " [ show | list | ls ] opens"
|
||||||
echo " [ show | list | ls ] policies"
|
echo " [ show | list | ls ] policies"
|
||||||
|
echo " [ show | list | ls ] rc"
|
||||||
echo " [ show | list | ls ] routing"
|
echo " [ show | list | ls ] routing"
|
||||||
echo " [ show | list | ls ] saves"
|
echo " [ show | list | ls ] saves"
|
||||||
echo " [ show | list | ls ] tc [ device ]"
|
echo " [ show | list | ls ] tc [ device ]"
|
||||||
@@ -4395,20 +4536,16 @@ usage() # $1 = exit status
|
|||||||
# here if that lib is loaded below.
|
# here if that lib is loaded below.
|
||||||
#
|
#
|
||||||
shorewall_cli() {
|
shorewall_cli() {
|
||||||
g_debugging=
|
|
||||||
|
|
||||||
if [ $# -gt 0 ] && [ "x$1" = "xdebug" -o "x$1" = "xtrace" ]; then
|
|
||||||
g_debugging=$1
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
g_nolock=
|
g_nolock=
|
||||||
|
#
|
||||||
|
# We'll keep this around for a while so we don't break people's started scripts
|
||||||
|
#
|
||||||
if [ $# -gt 0 ] && [ "$1" = "nolock" ]; then
|
if [ $# -gt 0 ] && [ "$1" = "nolock" ]; then
|
||||||
g_nolock=nolock
|
g_nolock=nolock
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
g_debugging=
|
||||||
g_noroutes=
|
g_noroutes=
|
||||||
g_purge=
|
g_purge=
|
||||||
g_ipt_options="-nv"
|
g_ipt_options="-nv"
|
||||||
@@ -4435,6 +4572,10 @@ shorewall_cli() {
|
|||||||
g_nopager=
|
g_nopager=
|
||||||
g_blacklistipset=
|
g_blacklistipset=
|
||||||
g_disconnect=
|
g_disconnect=
|
||||||
|
g_havemutex=
|
||||||
|
g_trace=
|
||||||
|
g_dbltimeout=
|
||||||
|
g_dbllog=
|
||||||
|
|
||||||
VERBOSE=
|
VERBOSE=
|
||||||
VERBOSITY=1
|
VERBOSITY=1
|
||||||
@@ -4566,6 +4707,17 @@ shorewall_cli() {
|
|||||||
finished=1
|
finished=1
|
||||||
option=
|
option=
|
||||||
;;
|
;;
|
||||||
|
T*)
|
||||||
|
g_debugging=trace
|
||||||
|
option=${option#T}
|
||||||
|
;;
|
||||||
|
D*)
|
||||||
|
g_debugging=debug
|
||||||
|
option=${option#D}
|
||||||
|
;;
|
||||||
|
N*)
|
||||||
|
g_nolock=nolock
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
option_error $option
|
option_error $option
|
||||||
;;
|
;;
|
||||||
@@ -4601,7 +4753,7 @@ shorewall_cli() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
banner="${g_product}-${SHOREWALL_VERSION} Status at $g_hostname -"
|
banner="${g_product} ${SHOREWALL_VERSION} Status at $g_hostname -"
|
||||||
|
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
|
|
||||||
@@ -4618,7 +4770,7 @@ shorewall_cli() {
|
|||||||
get_config
|
get_config
|
||||||
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
||||||
[ -n "$g_nolock" ] || mutex_on
|
[ -n "$g_nolock" ] || mutex_on
|
||||||
run_it $g_firewall $g_debugging $COMMAND
|
run_it $g_firewall $COMMAND
|
||||||
[ -n "$g_nolock" ] || mutex_off
|
[ -n "$g_nolock" ] || mutex_off
|
||||||
;;
|
;;
|
||||||
reset)
|
reset)
|
||||||
@@ -4627,7 +4779,7 @@ shorewall_cli() {
|
|||||||
shift
|
shift
|
||||||
[ -n "$g_nolock" ] || mutex_on
|
[ -n "$g_nolock" ] || mutex_on
|
||||||
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
||||||
run_it $g_firewall $g_debugging reset $@
|
run_it $g_firewall reset $@
|
||||||
[ -n "$g_nolock" ] || mutex_off
|
[ -n "$g_nolock" ] || mutex_off
|
||||||
;;
|
;;
|
||||||
reload|restart)
|
reload|restart)
|
||||||
@@ -4640,12 +4792,12 @@ shorewall_cli() {
|
|||||||
only_root
|
only_root
|
||||||
get_config Yes
|
get_config Yes
|
||||||
if product_is_started; then
|
if product_is_started; then
|
||||||
run_it $g_firewall $g_debugging $@
|
run_it $g_firewall $@
|
||||||
else
|
else
|
||||||
fatal_error "$g_product is not running"
|
fatal_error "$g_product is not running"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
blacklist)
|
blacklist|blacklist!)
|
||||||
only_root
|
only_root
|
||||||
get_config Yes
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
@@ -4691,7 +4843,7 @@ shorewall_cli() {
|
|||||||
logwatch)
|
logwatch)
|
||||||
only_root
|
only_root
|
||||||
get_config Yes Yes Yes
|
get_config Yes Yes Yes
|
||||||
banner="${g_product}-$SHOREWALL_VERSION Logwatch at $g_hostname -"
|
banner="${g_product} $SHOREWALL_VERSION Logwatch at $g_hostname -"
|
||||||
logwatch_command $@
|
logwatch_command $@
|
||||||
;;
|
;;
|
||||||
drop)
|
drop)
|
||||||
@@ -4723,7 +4875,7 @@ shorewall_cli() {
|
|||||||
;;
|
;;
|
||||||
allow)
|
allow)
|
||||||
only_root
|
only_root
|
||||||
get_config
|
get_config Yes
|
||||||
allow_command $@
|
allow_command $@
|
||||||
;;
|
;;
|
||||||
add)
|
add)
|
||||||
@@ -4795,7 +4947,7 @@ shorewall_cli() {
|
|||||||
# It isn't a function visible to this script -- try
|
# It isn't a function visible to this script -- try
|
||||||
# the compiled firewall
|
# the compiled firewall
|
||||||
#
|
#
|
||||||
run_it $g_firewall $g_debugging call $@
|
run_it $g_firewall call $@
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
missing_argument
|
missing_argument
|
||||||
|
@@ -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.
|
||||||
#
|
#
|
||||||
@@ -337,8 +337,15 @@ ensure_config_path() {
|
|||||||
. $F
|
. $F
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$g_shorewalldir" ]; then
|
if [ -n "$g_shorewalldir" ] && [ "${CONFIG_PATH%%:*}" = "$g_shorewalldir" ];then
|
||||||
[ "${CONFIG_PATH%%:*}" = "$g_shorewalldir" ] || CONFIG_PATH=$g_shorewalldir:$CONFIG_PATH
|
case $CONFIG_PATH in
|
||||||
|
:*)
|
||||||
|
CONFIG_PATH=${g_shorewalldir}${CONFIG_PATH}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CONFIG_PATH=$g_shorewalldir:$CONFIG_PATH
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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.
|
||||||
#
|
#
|
||||||
@@ -134,6 +134,7 @@ fi
|
|||||||
|
|
||||||
remove_directory ${SHAREDIR}/shorewall
|
remove_directory ${SHAREDIR}/shorewall
|
||||||
remove_file ~/.shorewallrc
|
remove_file ~/.shorewallrc
|
||||||
|
remove_file ${SBINDIR}/shorewall
|
||||||
|
|
||||||
#
|
#
|
||||||
# Report Success
|
# Report Success
|
||||||
|
@@ -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
|
||||||
|
@@ -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)
|
||||||
|
@@ -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)
|
||||||
#
|
#
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
@@ -42,6 +43,67 @@ setstatedir() {
|
|||||||
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,62 +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
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
|
|
||||||
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
|
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
|
||||||
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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2012-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2012-2017 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,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,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
|
||||||
|
@@ -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 {
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2012-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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) 2011-2017 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
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# (c) 2011-2017 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
|
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
|
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
|
9
Shorewall/Macros/macro.IPFS-swarm
Normal file
9
Shorewall/Macros/macro.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
|
12
Shorewall/Macros/macro.NFS
Normal file
12
Shorewall/Macros/macro.NFS
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.NFS
|
||||||
|
#
|
||||||
|
# This macro handles NFS v4.1+ traffic with default ports.
|
||||||
|
# You should only allow NFS traffic between hosts you fully trust.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 111 # portmapper, rpcbind
|
||||||
|
PARAM - - tcp 2049 # nfs
|
||||||
|
PARAM - - tcp 20048 # mountd
|
8
Shorewall/Macros/macro.ONCRPC
Normal file
8
Shorewall/Macros/macro.ONCRPC
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.ONCRPC
|
||||||
|
#
|
||||||
|
# This macro handles ONC RCP traffic (for rpcbind on Linux, etc).
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp,udp 111
|
8
Shorewall/Macros/macro.Tor
Normal file
8
Shorewall/Macros/macro.Tor
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.Tor
|
||||||
|
#
|
||||||
|
# Macro for handling Tor Onion Network traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 9001
|
8
Shorewall/Macros/macro.TorBrowserBundle
Normal file
8
Shorewall/Macros/macro.TorBrowserBundle
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.TorBrowserBundle
|
||||||
|
#
|
||||||
|
# Macro for handling Tor Onion Network traffic provided by Tor Browser Bundle
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 9150
|
8
Shorewall/Macros/macro.TorControl
Normal file
8
Shorewall/Macros/macro.TorControl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.TorControl
|
||||||
|
#
|
||||||
|
# Macro for handling Tor Controller Applications traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 9051
|
8
Shorewall/Macros/macro.TorDirectory
Normal file
8
Shorewall/Macros/macro.TorDirectory
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.TorDirectory
|
||||||
|
#
|
||||||
|
# Macro for handling Tor Directory traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 9030
|
8
Shorewall/Macros/macro.TorSocks
Normal file
8
Shorewall/Macros/macro.TorSocks
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Shorewall --/usr/share/shorewall/macro.TorSocks
|
||||||
|
#
|
||||||
|
# Macro for handling Tor Socks Proxy traffic
|
||||||
|
#
|
||||||
|
##############################################################################################################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||||
|
PARAM - - tcp 9050
|
9
Shorewall/Macros/macro.WUDO
Normal file
9
Shorewall/Macros/macro.WUDO
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# Shorewall -- /usr/share/shorewall/macro.WUDO
|
||||||
|
#
|
||||||
|
# This macro handles WUDO (Windows Update Delivery Optimization)
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
PARAM - - tcp 7680
|
@@ -1,11 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.0 -- /usr/share/shorewall/Shorewall/ARP.pm
|
# Shorewall 5.2 -- /usr/share/shorewall/Shorewall/ARP.pm
|
||||||
#
|
#
|
||||||
# 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) 2013 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2013 - 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.
|
||||||
#
|
#
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user