forked from extern/shorewall_code
Compare commits
97 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e7e62b951c | ||
|
7a6f975af4 | ||
|
1a762c20da | ||
|
c9f57ad9c9 | ||
|
694dc64900 | ||
|
54b6488113 | ||
|
fc426923b1 | ||
|
af6fc399e5 | ||
|
5bc471ff03 | ||
|
532d5c7e50 | ||
|
8429f68897 | ||
|
3ddc2a8f8b | ||
|
0bc250ba11 | ||
|
1d79cbc54e | ||
|
4b893b2fd6 | ||
|
09af9130df | ||
|
4139c932a4 | ||
|
8e7f001f7e | ||
|
98b4ab5ceb | ||
|
592de3e6fc | ||
|
46434e45b6 | ||
|
f4fef3a931 | ||
|
2c1786422e | ||
|
b087cee7f0 | ||
|
948175124b | ||
|
7b479d3569 | ||
|
178a7f83bc | ||
|
42db58c4d6 | ||
|
211a00da86 | ||
|
dab780368f | ||
|
b25a8e4b2d | ||
|
7b54e5e1a6 | ||
|
355d3e2dec | ||
|
d0d34568d1 | ||
|
9460458fd5 | ||
|
2994808e83 | ||
|
7fb00e0dfe | ||
|
27c1cd3d6e | ||
|
e989fa1d49 | ||
|
f095e6f31d | ||
|
8aefb3a998 | ||
|
65a0c62b0d | ||
|
8ae6e3ff57 | ||
|
ec1c9bd991 | ||
|
6f560bda38 | ||
|
d2d3748af9 | ||
|
e75c88219f | ||
|
7cce2e4ed5 | ||
|
3d4cde76aa | ||
|
ca0ac0473c | ||
|
3890a5c1fd | ||
|
e74ff0ecd9 | ||
|
85df53841b | ||
|
1c29240eb9 | ||
|
2b733b610c | ||
|
332f636d29 | ||
|
d1bad364e9 | ||
|
1358ec2d87 | ||
|
5807d44733 | ||
|
209d5d0766 | ||
|
aa680d8472 | ||
|
3d06a75768 | ||
|
073b2992cc | ||
|
27d94c8921 | ||
|
460f4bc5b7 | ||
|
f90567abf1 | ||
|
0c481b4c30 | ||
|
74a839b12e | ||
|
c83536767e | ||
|
6209616766 | ||
|
1848c3fa45 | ||
|
5a3589b9a6 | ||
|
3973cdf0da | ||
|
e39d405e86 | ||
|
239560be8d | ||
|
3873ebe06a | ||
|
31cdd6dbcb | ||
|
e987a11614 | ||
|
081cf30447 | ||
|
8133de1695 | ||
|
74180f83b9 | ||
|
d614081d55 | ||
|
6535bb94c5 | ||
|
38049fd0df | ||
|
4f4358d4db | ||
|
f822afef99 | ||
|
514fe76fa5 | ||
|
6e7fc9bee4 | ||
|
56bf8b1572 | ||
|
2a064c7b7c | ||
|
30682e63d8 | ||
|
69dd7ce0b9 | ||
|
39f6c4e74c | ||
|
46c3db4f32 | ||
|
6e59fd5395 | ||
|
1e2cfcd9a3 | ||
|
87d94ae004 |
31
Shorewall-core/configure
vendored
31
Shorewall-core/configure
vendored
@@ -91,6 +91,8 @@ for p in $@; do
|
||||
fi
|
||||
done
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
vendor=${params[HOST]}
|
||||
|
||||
if [ -z "$vendor" ]; then
|
||||
@@ -102,7 +104,7 @@ if [ -z "$vendor" ]; then
|
||||
vendor=redhat
|
||||
;;
|
||||
debian|ubuntu)
|
||||
ls -l /sbin/init |fgrep -q systemd | vendor=debian.systemd | vendor=debian.sysvinit
|
||||
vendor=debian
|
||||
;;
|
||||
opensuse)
|
||||
vendor=suse
|
||||
@@ -122,7 +124,6 @@ if [ -z "$vendor" ]; then
|
||||
params[HOST]=apple
|
||||
rcfile=shorewallrc.apple
|
||||
;;
|
||||
|
||||
cygwin*|CYGWIN*)
|
||||
params[HOST]=cygwin
|
||||
rcfile=shorewallrc.cygwin
|
||||
@@ -130,7 +131,7 @@ if [ -z "$vendor" ]; then
|
||||
*)
|
||||
if [ -f /etc/debian_version ]; then
|
||||
params[HOST]=debian
|
||||
rcfile=shorewallrc.debian.sysvinit
|
||||
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
params[HOST]=redhat
|
||||
rcfile=shorewallrc.redhat
|
||||
@@ -143,28 +144,41 @@ if [ -z "$vendor" ]; then
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
params[HOST]=archlinux
|
||||
rcfile=shorewallrc.archlinux
|
||||
elif [ -f /etc/openwrt_release ]; then
|
||||
params[HOST]=openwrt
|
||||
rcfile=shorewallrc.openwrt
|
||||
else
|
||||
params[HOST]=linux
|
||||
rcfile=shorewallrc.default
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
vendor=${params[HOST]}
|
||||
elif [ $vendor = linux ]; then
|
||||
rcfile=shorewallrc.default;
|
||||
else
|
||||
rcfile=shorewallrc.$vendor
|
||||
if [ $vendor = linux ]; then
|
||||
rcfile=shorewallrc.default;
|
||||
elif [ $vendor = debian -a -f /etc/debian_version ]; then
|
||||
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
||||
else
|
||||
rcfile=shorewallrc.$vendor
|
||||
fi
|
||||
|
||||
if [ ! -f $rcfile ]; then
|
||||
echo "ERROR: $vendor is not a recognized host type" >&2
|
||||
exit 1
|
||||
elif [ $vendor = default ]; then
|
||||
params[HOST]=linux
|
||||
vendor=linux
|
||||
elif [[ $vendor == debian.* ]]; then
|
||||
params[HOST]=debian
|
||||
vendor=debian
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $vendor = linux ]; then
|
||||
echo "INFO: Creating a generic Linux installation - " `date`;
|
||||
else
|
||||
echo "INFO: Creating a ${vendor}-specific installation - " `date`;
|
||||
echo "INFO: Creating a ${params[HOST]}-specific installation - " `date`;
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -177,6 +191,7 @@ done
|
||||
|
||||
echo '#' > shorewallrc
|
||||
echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc
|
||||
echo "# rc file: $rcfile" >> shorewallrc
|
||||
echo '#' >> shorewallrc
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
|
@@ -52,6 +52,9 @@ for ( @ARGV ) {
|
||||
$params{$pn} = $pv;
|
||||
}
|
||||
|
||||
use File::Basename;
|
||||
chdir dirname($0);
|
||||
|
||||
my $vendor = $params{HOST};
|
||||
my $rcfile;
|
||||
my $rcfilename;
|
||||
@@ -81,12 +84,39 @@ unless ( defined $vendor ) {
|
||||
}
|
||||
|
||||
if ( defined $vendor ) {
|
||||
$rcfilename = $vendor eq 'linux' ? 'shorewallrc.default' : 'shorewallrc.' . $vendor;
|
||||
die qq("ERROR: $vendor" is not a recognized host type) unless -f $rcfilename;
|
||||
if ( $vendor eq 'debian' && -f '/etc/debian_version' ) {
|
||||
if ( -l '/sbin/init' ) {
|
||||
if ( readlink('/sbin/init') =~ /systemd/ ) {
|
||||
$rcfilename = 'shorewallrc.debian.systemd';
|
||||
} else {
|
||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||
}
|
||||
} else {
|
||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||
}
|
||||
} else {
|
||||
$rcfilename = $vendor eq 'linux' ? 'shorewallrc.default' : 'shorewallrc.' . $vendor;
|
||||
}
|
||||
|
||||
unless ( -f $rcfilename ) {
|
||||
die qq("ERROR: $vendor" is not a recognized host type);
|
||||
} elsif ( $vendor eq 'default' ) {
|
||||
$params{HOST} = $vendor = 'linux';
|
||||
} elsif ( $vendor =~ /^debian\./ ) {
|
||||
$params{HOST} = $vendor = 'debian';
|
||||
}
|
||||
} else {
|
||||
if ( -f '/etc/debian_version' ) {
|
||||
$vendor = 'debian';
|
||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||
if ( -l '/sbin/init' ) {
|
||||
if ( readlink( '/sbin/init' ) =~ /systemd/ ) {
|
||||
$rcfilename = 'shorewallrc.debian.systemd';
|
||||
} else {
|
||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||
}
|
||||
} else {
|
||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||
}
|
||||
} elsif ( -f '/etc/redhat-release' ){
|
||||
$vendor = 'redhat';
|
||||
$rcfilename = 'shorewallrc.redhat';
|
||||
@@ -143,7 +173,8 @@ my $outfile;
|
||||
|
||||
open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!";
|
||||
|
||||
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n#\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];
|
||||
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];
|
||||
print $outfile "# rc file: $rcfilename\n#\n";
|
||||
|
||||
print $outfile "# Input: @ARGV\n#\n" if @ARGV;
|
||||
|
||||
|
@@ -66,15 +66,6 @@ mywhich() {
|
||||
return 2
|
||||
}
|
||||
|
||||
run_install()
|
||||
{
|
||||
if ! install $*; then
|
||||
echo
|
||||
echo "ERROR: Failed to install $*" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
cant_autostart()
|
||||
{
|
||||
echo
|
||||
@@ -88,7 +79,20 @@ delete_file() # $1 = file to delete
|
||||
|
||||
install_file() # $1 = source $2 = target $3 = mode
|
||||
{
|
||||
run_install $T $OWNERSHIP -m $3 $1 ${2}
|
||||
if cp -f $1 $2; then
|
||||
if chmod $3 $2; then
|
||||
if [ -n "$OWNER" ]; then
|
||||
if chown $OWNER:$GROUP $2; then
|
||||
return
|
||||
fi
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "ERROR: Failed to install $2" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
require()
|
||||
@@ -181,10 +185,6 @@ done
|
||||
|
||||
[ "${INITFILE}" != 'none/' ] && require INITSOURCE && require INITDIR
|
||||
|
||||
T="-T"
|
||||
|
||||
INSTALLD='-D'
|
||||
|
||||
if [ -z "$BUILD" ]; then
|
||||
case $(uname) in
|
||||
cygwin*|CYGWIN*)
|
||||
@@ -226,6 +226,8 @@ if [ -z "$BUILD" ]; then
|
||||
BUILD=suse
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
BUILD=archlinux
|
||||
elif [ -f ${CONFDIR}/openwrt_release ] ; then
|
||||
BUILD=openwrt
|
||||
else
|
||||
BUILD=linux
|
||||
fi
|
||||
@@ -252,17 +254,15 @@ case $BUILD in
|
||||
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=wheel
|
||||
INSTALLD=
|
||||
T=
|
||||
;;
|
||||
*)
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||
|
||||
#
|
||||
# Determine where to install the firewall script
|
||||
#
|
||||
@@ -276,7 +276,7 @@ case "$HOST" in
|
||||
apple)
|
||||
echo "Installing Mac-specific configuration...";
|
||||
;;
|
||||
debian|gentoo|redhat|slackware|archlinux|linux|suse)
|
||||
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt)
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unknown HOST \"$HOST\"" >&2
|
||||
@@ -305,7 +305,6 @@ if [ -n "$DESTDIR" ]; then
|
||||
if [ $BUILD != cygwin ]; then
|
||||
if [ `id -u` != 0 ] ; then
|
||||
echo "Not setting file owner/group permissions, not running as root."
|
||||
OWNERSHIP=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -407,9 +406,9 @@ fi
|
||||
if [ ${SHAREDIR} != /usr/share ]; then
|
||||
for f in lib.*; do
|
||||
if [ $BUILD != apple ]; then
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/shorewall/$f
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/$f
|
||||
else
|
||||
eval sed -i \'\' -e \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/shorewall/$f
|
||||
eval sed -i \'\' -e \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/$f
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@@ -143,29 +143,63 @@ timed_read ()
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if 'syslog -C' is running
|
||||
# Determine if 'syslogd -C' or logd -S is running
|
||||
#
|
||||
syslog_circular_buffer() {
|
||||
local pid
|
||||
local tty
|
||||
local flags
|
||||
local cputime
|
||||
local time
|
||||
local path
|
||||
local args
|
||||
local arg
|
||||
|
||||
ps ax 2> /dev/null | while read pid tty flags cputime path args; do
|
||||
case $path in
|
||||
syslogd|*/syslogd)
|
||||
for arg in $args; do
|
||||
if [ x$arg = x-C ]; then
|
||||
echo Yes
|
||||
return
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
ps w 2> /dev/null | (
|
||||
while read pid tty stat time path args; do
|
||||
case $path in
|
||||
syslogd|*/syslogd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-C*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
logd|*/logd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-S*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
return 1 )
|
||||
}
|
||||
|
||||
setup_logread() {
|
||||
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
|
||||
|
||||
if syslog_circular_buffer; then
|
||||
LOGFILE=logread
|
||||
if qt mywhich tac; then
|
||||
g_logread="logread | tac"
|
||||
else
|
||||
g_logread="logread"
|
||||
fi
|
||||
elif [ -r $LOGFILE ]; then
|
||||
if qt mywhich tac; then
|
||||
g_logread="tac $LOGFILE"
|
||||
else
|
||||
g_logread="cat $LOGFILE"
|
||||
fi
|
||||
else
|
||||
fatal_error "LOGFILE ($LOGFILE) does not exist or is not readable!"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
@@ -173,31 +207,59 @@ syslog_circular_buffer() {
|
||||
#
|
||||
packet_log() # $1 = number of messages
|
||||
{
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
if qt mywhich tac; then
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | tail -n$1 | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | tail -n$1 | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | tail -n$1 | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | tail -n$1 | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
search_log() # $1 = IP address to search for
|
||||
{
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
if qt mywhich tac; then
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
|
||||
if [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
elif [ $g_family -eq 4 ]; then
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
|
||||
else
|
||||
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -280,17 +342,7 @@ show_bl() {
|
||||
logwatch() # $1 = timeout -- if negative, prompt each time that
|
||||
# an 'interesting' packet count changes
|
||||
{
|
||||
if [ -z "$LOGFILE" ]; then
|
||||
LOGFILE=/var/log/messages
|
||||
|
||||
if [ -n "$(syslog_circular_buffer)" ]; then
|
||||
g_logread="logread | tac"
|
||||
elif [ -r $LOGFILE ]; then
|
||||
g_logread="tac $LOGFILE"
|
||||
else
|
||||
fatal_error "LOGFILE ($LOGFILE) does not exist!"
|
||||
fi
|
||||
fi
|
||||
setup_logread
|
||||
|
||||
host=$(echo $g_hostname | sed 's/\..*$//')
|
||||
oldrejects=$($g_tool -L -v -n | grep 'LOG')
|
||||
@@ -1000,11 +1052,13 @@ show_command() {
|
||||
conntrack -f ipv6 -L $@ | show_connections_filter
|
||||
else
|
||||
[ $# -gt 1 ] && usage 1
|
||||
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
|
||||
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
|
||||
echo "$g_product $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
|
||||
echo
|
||||
grep '^ipv6' /proc/net/nf_conntrack | sed -r 's/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | show_connections_filter
|
||||
if [ -f /proc/sys/net/netfilter/nf_conntrack_count -a -f /proc/sys/net/nf_conntrack ]; then
|
||||
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
|
||||
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
|
||||
echo "$g_product $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
|
||||
echo
|
||||
grep '^ipv6' /proc/net/nf_conntrack | sed -r 's/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | show_connections_filter
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
nat)
|
||||
@@ -1038,17 +1092,7 @@ show_command() {
|
||||
log)
|
||||
[ $# -gt 2 ] && usage 1
|
||||
|
||||
if [ -z "$LOGFILE" ]; then
|
||||
LOGFILE=/var/log/messages
|
||||
|
||||
if [ -n "$(syslog_circular_buffer)" ]; then
|
||||
g_logread="logread | tac"
|
||||
elif [ -r $LOGFILE ]; then
|
||||
g_logread="tac $LOGFILE"
|
||||
else
|
||||
fatal_error "LOGFILE ($LOGFILE) does not exist!"
|
||||
fi
|
||||
fi
|
||||
setup_logread
|
||||
|
||||
echo "$g_product $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
|
||||
echo
|
||||
@@ -1427,17 +1471,7 @@ do_dump_command() {
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$LOGFILE" ]; then
|
||||
LOGFILE=/var/log/messages
|
||||
|
||||
if [ -n "$(syslog_circular_buffer)" ]; then
|
||||
g_logread="logread | tac"
|
||||
elif [ -r $LOGFILE ]; then
|
||||
g_logread="tac $LOGFILE"
|
||||
else
|
||||
fatal_error "LOGFILE ($LOGFILE) does not exist! - See http://www.shorewall.net/shorewall_logging.html"
|
||||
fi
|
||||
fi
|
||||
setup_logread
|
||||
|
||||
g_ipt_options="$g_ipt_options $g_ipt_options1"
|
||||
|
||||
@@ -1592,7 +1626,7 @@ do_dump_command() {
|
||||
|
||||
echo
|
||||
|
||||
ss -${g_family}tunap
|
||||
qt mywhich ss && ss -${g_family}tunap || { qt mywhich netstat && netatat -tunap; }
|
||||
|
||||
if [ -n "$TC_ENABLED" ]; then
|
||||
heading "Traffic Control"
|
||||
@@ -3495,10 +3529,34 @@ noiptrace_command() {
|
||||
fatal_error "$g_product is not started"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Set the configuration variables from shorewall-lite.conf
|
||||
# Verify that we have a compiled firewall script
|
||||
#
|
||||
verify_firewall_script() {
|
||||
if [ ! -f $g_firewall ]; then
|
||||
echo " ERROR: $g_product is not properly installed" >&2
|
||||
if [ -L $g_firewall ]; then
|
||||
echo " $g_firewall is a symbolic link to a" >&2
|
||||
echo " non-existant file" >&2
|
||||
else
|
||||
echo " The file $g_firewall does not exist" >&2
|
||||
fi
|
||||
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# The remaining functions are used by the Lite cli - they are overloaded by
|
||||
# the Standard CLI by loading lib.cli-std
|
||||
################################################################################
|
||||
#
|
||||
# Set the configuration variables from shorewall[6]-lite.conf.
|
||||
#
|
||||
get_config() {
|
||||
local config
|
||||
local lib
|
||||
|
||||
ensure_config_path
|
||||
|
||||
@@ -3520,15 +3578,7 @@ get_config() {
|
||||
|
||||
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||
|
||||
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
|
||||
|
||||
if ( ps ax 2> /dev/null | grep -v grep | qt grep 'syslogd.*-C' ) ; then
|
||||
g_logread="logread | tac"
|
||||
elif [ -r $LOGFILE ]; then
|
||||
g_logread="tac $LOGFILE"
|
||||
else
|
||||
fatal_error "LOGFILE ($LOGFILE) does not exist!"
|
||||
fi
|
||||
setup_logread
|
||||
#
|
||||
# See if we have a real version of "tail" -- use separate redirection so
|
||||
# that ash (aka /bin/sh on LRP) doesn't crap
|
||||
@@ -3590,7 +3640,13 @@ get_config() {
|
||||
VERBOSITY=2
|
||||
fi
|
||||
|
||||
g_hostname=$(hostname 2> /dev/null)
|
||||
if qt mywhich hostname; then
|
||||
g_hostname=$(hostname 2> /dev/null)
|
||||
elif qt mywhich uname; then
|
||||
g_hostname=$(uname -n 2> /dev/null)
|
||||
else
|
||||
g_hostname=localhost
|
||||
fi
|
||||
|
||||
if [ -n "$IPSET" ]; then
|
||||
case "$IPSET" in
|
||||
@@ -3630,29 +3686,11 @@ get_config() {
|
||||
|
||||
g_loopback=$(find_loopback_interfaces)
|
||||
|
||||
lib=$(find_file lib.cli-user)
|
||||
|
||||
[ -f $lib ] && . $lib
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# Verify that we have a compiled firewall script
|
||||
#
|
||||
verify_firewall_script() {
|
||||
if [ ! -f $g_firewall ]; then
|
||||
echo " ERROR: $g_product is not properly installed" >&2
|
||||
if [ -L $g_firewall ]; then
|
||||
echo " $g_firewall is a symbolic link to a" >&2
|
||||
echo " non-existant file" >&2
|
||||
else
|
||||
echo " The file $g_firewall does not exist" >&2
|
||||
fi
|
||||
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# The remaining functions are used by the Lite cli - they are overloaded by
|
||||
# the Standard CLI by loading lib.cli-std
|
||||
################################################################################
|
||||
#
|
||||
# Start Command Executor
|
||||
#
|
||||
|
@@ -33,7 +33,7 @@ startup_error() # $* = Error Message
|
||||
echo " ERROR: $@: Firewall state not changed" >&2
|
||||
|
||||
if [ $LOG_VERBOSITY -ge 0 ]; then
|
||||
timestamp="$(date +'%_b %d %T') "
|
||||
timestamp="$(date +'%b %d %T') "
|
||||
echo "${timestamp} ERROR: $@" >> $STARTUP_LOG
|
||||
fi
|
||||
|
||||
@@ -50,7 +50,7 @@ startup_error() # $* = Error Message
|
||||
esac
|
||||
|
||||
if [ $LOG_VERBOSITY -ge 0 ]; then
|
||||
timestamp="$(date +'%_b %d %T') "
|
||||
timestamp="$(date +'%b %d %T') "
|
||||
|
||||
case $COMMAND in
|
||||
start)
|
||||
@@ -316,6 +316,7 @@ reload_kernel_modules() {
|
||||
local moduleloader
|
||||
moduleloader=modprobe
|
||||
local uname
|
||||
local extras
|
||||
|
||||
if ! qt mywhich modprobe; then
|
||||
moduleloader=insmod
|
||||
@@ -323,9 +324,25 @@ reload_kernel_modules() {
|
||||
|
||||
[ -n "${MODULE_SUFFIX:=ko ko.gz ko.xz o o.gz o.xz gz xz}" ]
|
||||
|
||||
[ -z "$MODULESDIR" ] && \
|
||||
uname=$(uname -r) && \
|
||||
if [ -n "$MODULESDIR" ]; then
|
||||
case "$MODULESDIR" in
|
||||
+*)
|
||||
extras="$MODULESDIR"
|
||||
extras=${extras#+}
|
||||
MODULESDIR=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$MODULESDIR" ]; then
|
||||
uname=$(uname -r)
|
||||
MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
|
||||
if [ -n "$extras" ]; then
|
||||
for directory in $(split "$extras"); do
|
||||
MODULESDIR="$MODULESDIR:/lib/modules/$uname/$directory"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
|
||||
|
||||
@@ -355,6 +372,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
||||
local savemoduleinfo
|
||||
savemoduleinfo=${1:-Yes} # So old compiled scripts still work
|
||||
local uname
|
||||
local extras
|
||||
|
||||
if ! qt mywhich modprobe; then
|
||||
moduleloader=insmod
|
||||
@@ -362,9 +380,25 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
||||
|
||||
[ -n "${MODULE_SUFFIX:=o gz xz ko o.gz o.xz ko.gz ko.xz}" ]
|
||||
|
||||
[ -z "$MODULESDIR" ] && \
|
||||
uname=$(uname -r) && \
|
||||
if [ -n "$MODULESDIR" ]; then
|
||||
case "$MODULESDIR" in
|
||||
+*)
|
||||
extras="$MODULESDIR"
|
||||
extras=${extras#+}
|
||||
MODULESDIR=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$MODULESDIR" ]; then
|
||||
uname=$(uname -r)
|
||||
MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
|
||||
if [ -n "$extras" ]; then
|
||||
for directory in $(split "$extras"); do
|
||||
MODULESDIR="$MODULESDIR:/lib/modules/$uname/$directory"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
for directory in $(split $MODULESDIR); do
|
||||
[ -d $directory ] && moduledirectories="$moduledirectories $directory"
|
||||
@@ -709,12 +743,15 @@ mutex_on()
|
||||
local lockf
|
||||
lockf=${LOCKFILE:=${VARDIR}/lock}
|
||||
local lockpid
|
||||
local lockd
|
||||
|
||||
MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60}
|
||||
|
||||
if [ $MUTEX_TIMEOUT -gt 0 ]; then
|
||||
|
||||
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
||||
lockd=$(dirname $LOCKFILE)
|
||||
|
||||
[ -d "$lockd" ] || mkdir -p "$lockd"
|
||||
|
||||
if [ -f $lockf ]; then
|
||||
lockpid=`cat ${lockf} 2> /dev/null`
|
||||
@@ -734,6 +771,11 @@ mutex_on()
|
||||
chmod u+w ${lockf}
|
||||
echo $$ > ${lockf}
|
||||
chmod u-w ${lockf}
|
||||
elif qt mywhich lock; then
|
||||
lock -${MUTEX_TIMEOUT} -r1 ${lockf}
|
||||
chmod u+w ${lockf}
|
||||
echo $$ > ${lockf}
|
||||
chmod u-w ${lockf}
|
||||
else
|
||||
while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do
|
||||
sleep 1
|
||||
|
26
Shorewall-core/shorewallrc.openwrt
Normal file
26
Shorewall-core/shorewallrc.openwrt
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Created by Shorewall Core version 5.0.2-RC1 configure - Fri, Nov 06, 2015 10:02:03 AM
|
||||
#
|
||||
# Input: host=openwrt
|
||||
#
|
||||
HOST=openwrt
|
||||
PREFIX=/usr
|
||||
SHAREDIR=${PREFIX}/share
|
||||
LIBEXECDIR=${PREFIX}/share
|
||||
PERLLIBDIR=${PREFIX}/share/shorewall
|
||||
CONFDIR=/etc
|
||||
SBINDIR=/sbin
|
||||
MANDIR=${PREFIX}/man
|
||||
INITDIR=/etc/init.d
|
||||
INITSOURCE=init.openwrt.sh
|
||||
INITFILE=$PRODUCT
|
||||
AUXINITSOURCE=
|
||||
AUXINITFILE=
|
||||
SERVICEDIR=
|
||||
SERVICEFILE=
|
||||
SYSCONFFILE=default.openwrt
|
||||
SYSCONFDIR=${CONFDIR}/sysconfig
|
||||
SPARSE=
|
||||
ANNOTATED=
|
||||
VARLIB=/lib
|
||||
VARDIR=${VARLIB}/$PRODUCT
|
@@ -397,6 +397,7 @@ if [ $HOST = debian ]; then
|
||||
|
||||
[ $configure -eq 1 ] || mkdir -p ${DESTDIR}${CONFDIR}/default
|
||||
install_file sysconfig ${DESTDIR}${ETC}/default/shorewall-init 0644
|
||||
echo "sysconfig file installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
|
||||
fi
|
||||
|
||||
IFUPDOWN=ifupdown.debian.sh
|
||||
@@ -490,7 +491,11 @@ esac
|
||||
if [ -z "$DESTDIR" ]; then
|
||||
if [ $configure -eq 1 -a -n "$first_install" ]; then
|
||||
if [ $HOST = debian ]; then
|
||||
if mywhich insserv; then
|
||||
if [ -n "$SERVICEDIR" ]; then
|
||||
if systemctl enable ${PRODUCT}.service; then
|
||||
echo "Shorewall Init will start automatically at boot"
|
||||
fi
|
||||
elif mywhich insserv; then
|
||||
if insserv ${INITDIR}/shorewall-init; then
|
||||
echo "Shorewall Init will start automatically at boot"
|
||||
else
|
||||
@@ -554,7 +559,7 @@ fi
|
||||
|
||||
[ -z "${DESTDIR}" ] && [ ! -f ~/.shorewallrc ] && cp ${SHAREDIR}/shorewall/shorewallrc .
|
||||
|
||||
if [ -f ${DESTDIR}/etc/ppp ]; then
|
||||
if [ -d ${DESTDIR}/etc/ppp ]; then
|
||||
case $HOST in
|
||||
debian|suse)
|
||||
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
|
||||
|
@@ -174,9 +174,13 @@ if [ -f "$INITSCRIPT" ]; then
|
||||
remove_file $INITSCRIPT
|
||||
fi
|
||||
|
||||
if [ -n "$SYSTEMD" ]; then
|
||||
if [ -z "${SERVICEDIR}" ]; then
|
||||
SERVICEDIR="$SYSTEMD"
|
||||
fi
|
||||
|
||||
if [ -n "$SERVICEDIR" ]; then
|
||||
[ $configure -eq 1 ] && systemctl disable shorewall-init.service
|
||||
rm -f $SYSTEMD/shorewall-init.service
|
||||
rm -f $SERVICEDIR/shorewall-init.service
|
||||
fi
|
||||
|
||||
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
|
||||
@@ -202,8 +206,10 @@ if [ -d ${CONFDIR}/ppp ]; then
|
||||
done
|
||||
|
||||
for file in if-up.local if-down.local; do
|
||||
if grep -qF Shorewall-based ${CONFDIR}/ppp/$FILE; then
|
||||
remove_file ${CONFDIR}/ppp/$FILE
|
||||
if [ -f ${CONFDIR}/ppp/$file ]; then
|
||||
if grep -qF Shorewall-based ${CONFDIR}/ppp/$FILE; then
|
||||
remove_file ${CONFDIR}/ppp/$FILE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
25
Shorewall-lite/default.openwrt
Normal file
25
Shorewall-lite/default.openwrt
Normal file
@@ -0,0 +1,25 @@
|
||||
# sysV init file script configuration(/etc/sysconfdir/shorewall-lite)
|
||||
|
||||
# startup option(default "-vvv")
|
||||
OPTIONS=
|
||||
|
||||
# change default start run level(if none empty; /etc/init.d/shorewall-lite enable)
|
||||
START=50
|
||||
|
||||
# change default stop run level(if none empty; /etc/init.d/shorewall-lite enable)
|
||||
STOP=
|
||||
|
||||
# option to pass when shorewall start is executed
|
||||
STARTOPTIONS=
|
||||
|
||||
# option to pass when shorewall restart is executed
|
||||
RESTARTOPTIONS=
|
||||
|
||||
# option to pass when shorewall reload is executed
|
||||
RELOADOPTIONS=
|
||||
|
||||
# option to pass when shorewall stop is executed
|
||||
STOPOPTIONS=
|
||||
|
||||
# option to pass when shorewall status is executed
|
||||
STATUSOPTIONS=
|
98
Shorewall-lite/init.openwrt.sh
Executable file
98
Shorewall-lite/init.openwrt.sh
Executable file
@@ -0,0 +1,98 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
|
||||
#
|
||||
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2015 - Matt Darfeuille - (matdarf@gmail.com)
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 2 of the license or, at your
|
||||
# option, any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# If an error occurs while starting or restarting the firewall, the
|
||||
# firewall is automatically stopped.
|
||||
#
|
||||
# Commands are:
|
||||
#
|
||||
# shorewall-lite start Starts the firewall
|
||||
# shorewall-lite restart Restarts the firewall
|
||||
# shorewall-lite reload Reload the firewall
|
||||
# (same as restart)
|
||||
# shorewall-lite stop Stops the firewall
|
||||
# shorewall-lite status Displays firewall status
|
||||
#
|
||||
|
||||
# description: Packet filtering firewall
|
||||
|
||||
# openwrt stuph
|
||||
# start and stop runlevel variable
|
||||
#START=21
|
||||
#STOP=91
|
||||
# variable to display what the status command do when /etc/init.d/shorewall-lite is invoke without argument
|
||||
EXTRA_COMMANDS="status"
|
||||
EXTRA_HELP="Displays shorewall status"
|
||||
|
||||
################################################################################
|
||||
# Get startup options (override default)
|
||||
################################################################################
|
||||
OPTIONS="-vvv"
|
||||
|
||||
#
|
||||
# The installer may alter this
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
if [ -f ${SYSCONFDIR}/shorewall-lite ]; then
|
||||
. ${SYSCONFDIR}/shorewall-lite
|
||||
fi
|
||||
|
||||
START=${START:-21}
|
||||
STOP=${STOP:-91}
|
||||
|
||||
SHOREWALL_INIT_SCRIPT=1
|
||||
|
||||
################################################################################
|
||||
# E X E C U T I O N B E G I N S H E R E #
|
||||
################################################################################
|
||||
# arg1 of init script is arg2 when rc.common is sourced; set to action variable
|
||||
command="$action"
|
||||
|
||||
start() {
|
||||
exec ${SBINDIR}/shorewall-lite $OPTIONS $command ${STARTOPTIONS:-$@}
|
||||
}
|
||||
|
||||
boot() {
|
||||
local command="start"
|
||||
start
|
||||
}
|
||||
|
||||
restart() {
|
||||
exec ${SBINDIR}/shorewall-lite $OPTIONS $command ${RESTARTOPTIONS:-$@}
|
||||
}
|
||||
|
||||
reload() {
|
||||
exec ${SBINDIR}/shorewall-lite $OPTIONS $command ${RELOADOPTION:-$@}
|
||||
}
|
||||
|
||||
stop() {
|
||||
exec ${SBINDIR}/shorewall-lite $OPTIONS $command ${STOPOPTIONS:-$@}
|
||||
}
|
||||
|
||||
status() {
|
||||
exec ${SBINDIR}/shorewall-lite $OPTIONS $command ${STATUSOPTIONS:-$@}
|
||||
}
|
@@ -67,15 +67,6 @@ mywhich() {
|
||||
return 2
|
||||
}
|
||||
|
||||
run_install()
|
||||
{
|
||||
if ! install $*; then
|
||||
echo
|
||||
echo "ERROR: Failed to install $*" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
cant_autostart()
|
||||
{
|
||||
echo
|
||||
@@ -89,7 +80,28 @@ delete_file() # $1 = file to delete
|
||||
|
||||
install_file() # $1 = source $2 = target $3 = mode
|
||||
{
|
||||
run_install $T $OWNERSHIP -m $3 $1 ${2}
|
||||
if cp -f $1 $2; then
|
||||
if chmod $3 $2; then
|
||||
if [ -n "$OWNER" ]; then
|
||||
if chown $OWNER:$GROUP $2; then
|
||||
return
|
||||
fi
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "ERROR: Failed to install $2" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
make_directory() # $1 = directory , $2 = mode
|
||||
{
|
||||
mkdir -p $1
|
||||
chmod 755 $1
|
||||
[ -n "$OWNERSHIP" ] && chown $OWNERSHIP $1
|
||||
|
||||
}
|
||||
|
||||
require()
|
||||
@@ -187,7 +199,7 @@ elif [ -z "${VARDIR}" ]; then
|
||||
VARDIR=${VARLIB}/${PRODUCT}
|
||||
fi
|
||||
|
||||
for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||
for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARLIB VARDIR; do
|
||||
require $var
|
||||
done
|
||||
|
||||
@@ -201,8 +213,6 @@ PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
|
||||
# Determine where to install the firewall script
|
||||
#
|
||||
cygwin=
|
||||
INSTALLD='-D'
|
||||
T='-T'
|
||||
|
||||
if [ -z "$BUILD" ]; then
|
||||
case $(uname) in
|
||||
@@ -245,6 +255,8 @@ if [ -z "$BUILD" ]; then
|
||||
BUILD=slackware
|
||||
elif [ -f ${CONFDIR}/arch-release ] ; then
|
||||
BUILD=archlinux
|
||||
elif [ -f ${CONFDIR}/openwrt_release ]; then
|
||||
BUILD=openwrt
|
||||
else
|
||||
BUILD=linux
|
||||
fi
|
||||
@@ -260,16 +272,16 @@ case $BUILD in
|
||||
apple)
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=wheel
|
||||
INSTALLD=
|
||||
T=
|
||||
;;
|
||||
*)
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||
[ -n "$OWNER" ] && OWNERSHIP="$OWNER:$GROUP"
|
||||
|
||||
[ -n "$HOST" ] || HOST=$BUILD
|
||||
|
||||
@@ -300,6 +312,9 @@ case "$HOST" in
|
||||
suse)
|
||||
echo "Installing Suse-specific configuration..."
|
||||
;;
|
||||
openwrt)
|
||||
echo "Installing OpenWRT-specific configuration..."
|
||||
;;
|
||||
linux)
|
||||
;;
|
||||
*)
|
||||
@@ -316,8 +331,9 @@ if [ -n "$DESTDIR" ]; then
|
||||
OWNERSHIP=""
|
||||
fi
|
||||
|
||||
install -d $OWNERSHIP -m 755 ${DESTDIR}/${SBINDIR}
|
||||
install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
|
||||
make_directory ${DESTDIR}${SBINDIR} 755
|
||||
make_directory ${DESTDIR}${INITDIR} 755
|
||||
|
||||
else
|
||||
if [ ! -f ${SHAREDIR}/shorewall/coreversion ]; then
|
||||
echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2
|
||||
@@ -357,7 +373,7 @@ fi
|
||||
delete_file ${DESTDIR}/usr/share/$PRODUCT/xmodules
|
||||
|
||||
install_file $PRODUCT ${DESTDIR}${SBINDIR}/$PRODUCT 0544
|
||||
[ -n "${INITFILE}" ] && install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
|
||||
[ -n "${INITFILE}" ] && make_directory ${DESTDIR}${INITDIR} 755
|
||||
|
||||
echo "$Product control program installed in ${DESTDIR}${SBINDIR}/$PRODUCT"
|
||||
|
||||
@@ -399,7 +415,7 @@ fi
|
||||
if [ -n "$SERVICEDIR" ]; then
|
||||
mkdir -p ${DESTDIR}${SERVICEDIR}
|
||||
[ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
|
||||
run_install $OWNERSHIP -m 644 $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
|
||||
install_file $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service 644
|
||||
[ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
|
||||
echo "Service file $SERVICEFILE installed as ${DESTDIR}${SERVICEDIR}/$PRODUCT.service"
|
||||
fi
|
||||
@@ -421,9 +437,9 @@ fi
|
||||
#
|
||||
# Install the Makefile
|
||||
#
|
||||
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}${CONFDIR}/$PRODUCT
|
||||
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${CONFDIR}/$PRODUCT/Makefile
|
||||
[ $SBINDIR = /sbin ] || eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}/${CONFDIR}/$PRODUCT/Makefile
|
||||
install_file Makefile ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile 0600
|
||||
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
|
||||
[ $SBINDIR = /sbin ] || eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
|
||||
echo "Makefile installed as ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile"
|
||||
|
||||
#
|
||||
@@ -438,7 +454,7 @@ echo "Default config path file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/confi
|
||||
for f in lib.* ; do
|
||||
if [ -f $f ]; then
|
||||
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
|
||||
echo "Library ${f#*.} file installed as ${DESTDIR}/${SHAREDIR}/$PRODUCT/$f"
|
||||
echo "Library ${f#*.} file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -451,7 +467,7 @@ echo "Common functions linked through ${DESTDIR}${SHAREDIR}/$PRODUCT/functions"
|
||||
#
|
||||
|
||||
install_file shorecap ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap 0755
|
||||
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${LIBEXECDIR}/$PRODUCT/shorecap
|
||||
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap
|
||||
|
||||
echo
|
||||
echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap"
|
||||
@@ -461,17 +477,17 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
|
||||
#
|
||||
|
||||
if [ -f modules ]; then
|
||||
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}${SHAREDIR}/$PRODUCT
|
||||
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
|
||||
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
|
||||
fi
|
||||
|
||||
if [ -f helpers ]; then
|
||||
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}${SHAREDIR}/$PRODUCT
|
||||
install_file helpers ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers 600
|
||||
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
|
||||
fi
|
||||
|
||||
for f in modules.*; do
|
||||
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f
|
||||
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 644
|
||||
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
||||
done
|
||||
|
||||
@@ -482,17 +498,17 @@ done
|
||||
if [ -d manpages ]; then
|
||||
cd manpages
|
||||
|
||||
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
|
||||
mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
|
||||
|
||||
for f in *.5; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz
|
||||
install_file $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz 644
|
||||
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man5/$f.gz"
|
||||
done
|
||||
|
||||
for f in *.8; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz
|
||||
install_file $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz 644
|
||||
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man8/$f.gz"
|
||||
done
|
||||
|
||||
@@ -502,7 +518,7 @@ if [ -d manpages ]; then
|
||||
fi
|
||||
|
||||
if [ -d ${DESTDIR}${CONFDIR}/logrotate.d ]; then
|
||||
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT
|
||||
install_file logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT 644
|
||||
echo "Logrotate file installed as ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT"
|
||||
fi
|
||||
|
||||
@@ -533,13 +549,13 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR
|
||||
chmod 755 ${DESTDIR}${SYSCONFDIR}
|
||||
fi
|
||||
|
||||
run_install $OWNERSHIP -m 0644 ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT}
|
||||
install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT} 0640
|
||||
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
|
||||
fi
|
||||
|
||||
if [ ${SHAREDIR} != /usr/share ]; then
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.base
|
||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SBINDIR}/$PRODUCT
|
||||
fi
|
||||
|
||||
if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
|
||||
@@ -587,6 +603,13 @@ if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${
|
||||
else
|
||||
cant_autostart
|
||||
fi
|
||||
elif [ $HOST = openwrt -a -f ${CONFDIR}/rc.common ]; then
|
||||
/etc/init.d/$PRODUCT enable
|
||||
if /etc/init.d/$PRODUCT enabled; then
|
||||
echo "$PRODUCT will start automatically at boot"
|
||||
else
|
||||
cant_autostart
|
||||
fi
|
||||
elif [ "$INITFILE" != rc.${PRODUCT} ]; then #Slackware starts this automatically
|
||||
cant_autostart
|
||||
fi
|
||||
|
@@ -168,7 +168,15 @@ if [ $configure -eq 1 ]; then
|
||||
fi
|
||||
|
||||
if [ -L ${SHAREDIR}/shorewall-lite/init ]; then
|
||||
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)
|
||||
if [ $HOST = openwrt ]; then
|
||||
if [ $configure -eq 1 ] && /etc/init.d/shorewall-lite enabled; then
|
||||
/etc/init.d/shorewall-lite disable
|
||||
fi
|
||||
|
||||
FIREWALL=$(readlink ${SHAREDIR}/shorewall-lite/init)
|
||||
else
|
||||
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)
|
||||
fi
|
||||
elif [ -n "$INITFILE" ]; then
|
||||
FIREWALL=${INITDIR}/${INITFILE}
|
||||
fi
|
||||
@@ -187,9 +195,11 @@ if [ -f "$FIREWALL" ]; then
|
||||
remove_file $FIREWALL
|
||||
fi
|
||||
|
||||
if [ -n "$SYSTEMD" ]; then
|
||||
[ -z "$SERVICEDIR" ] && SERVICEDIR="$SYSTEMD"
|
||||
|
||||
if [ -n "$SERVICEDIR" ]; then
|
||||
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
|
||||
rm -f $SYSTEMD/shorewall-lite.service
|
||||
rm -f $SERVICEDIR/shorewall-lite.service
|
||||
fi
|
||||
|
||||
rm -f ${SBINDIR}/shorewall-lite
|
||||
@@ -199,6 +209,7 @@ rm -rf ${VARDIR}/shorewall-lite
|
||||
rm -rf ${SHAREDIR}/shorewall-lite
|
||||
rm -rf ${LIBEXECDIR}/shorewall-lite
|
||||
rm -f ${CONFDIR}/logrotate.d/shorewall-lite
|
||||
rm -f ${SYSCONFDIR}/shorewall-lite
|
||||
|
||||
rm -f ${MANDIR}/man5/shorewall-lite*
|
||||
rm -f ${MANDIR}/man8/shorewall-lite*
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - AMQP Macro
|
||||
# Shorewall - AMQP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.AMQP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Audited AllowICMPs Macro
|
||||
# Shorewall - Audited AllowICMPs Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.A_AllowICMPs
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Audited DropDNSrep Macro
|
||||
# Shorewall - Audited DropDNSrep Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.A_DropDNSrep
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - ADropUPnP Macro
|
||||
# Shorewall - ADropUPnP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.A_DropUPnP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Samba 4 Macro
|
||||
# Shorewall - Samba 4 Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.ActiveDir
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - AllowICMPs Macro
|
||||
# Shorewall - AllowICMPs Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.AllowICMPs
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Amanda Macro
|
||||
# Shorewall - Amanda Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Amanda
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Auth Macro
|
||||
# Shorewall - Auth Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Auth
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - BGP Macro
|
||||
# Shorewall - BGP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.BGP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - blacklist Macro
|
||||
# Shorewall - blacklist Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.blacklist
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - BitTorrent Macro
|
||||
# Shorewall - BitTorrent Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.BitTorrent
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - BitTorrent 3.2 Macro
|
||||
# Shorewall - BitTorrent 3.2 Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.BitTorrent32
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - CVS Macro
|
||||
# Shorewall - CVS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.CVS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Citrix/ICA Macro
|
||||
# Shorewall - Citrix/ICA Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Citrix
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DAAP Macro
|
||||
# Shorewall - DAAP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DAAP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DCC Macro
|
||||
# Shorewall - DCC Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DCC
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DHCPfwd Macro
|
||||
# Shorewall - DHCPfwd Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DHCPfwd
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DNS Macro
|
||||
# Shorewall - DNS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DNS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Distcc Macro
|
||||
# Shorewall - Distcc Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Distcc
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Drop Macro
|
||||
# Shorewall - Drop Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Drop
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DropDNSrep Macro
|
||||
# Shorewall - DropDNSrep Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DropDNSrep
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - DropUPnP Macro
|
||||
# Shorewall - DropUPnP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.DropUPnP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Edonkey Macro
|
||||
# Shorewall - Edonkey Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Edonkey
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - FTP Macro
|
||||
# Shorewall - FTP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.FTP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Finger Macro
|
||||
# Shorewall - Finger Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Finger
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - GNUnet Macro
|
||||
# Shorewall - GNUnet Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.GNUnet
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - GRE Macro
|
||||
# Shorewall - GRE Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.GRE
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Git Macro
|
||||
# Shorewall - Git Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Git
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Gnutella Macro
|
||||
# Shorewall - Gnutella Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Gnutella
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Citrix/Goto Meeting macro
|
||||
# Shorewall - Citrix/Goto Meeting macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Goto-Meeting
|
||||
# by Eric Teeter
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - HKP Macro
|
||||
# Shorewall - HKP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.HKP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - HTTP Macro
|
||||
# Shorewall - HTTP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.HTTP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - HTTPS Macro
|
||||
# Shorewall - HTTPS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.HTTPS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - ICPV2 Macro
|
||||
# Shorewall - ICPV2 Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.ICPV2
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - ICQ Macro
|
||||
# Shorewall - ICQ Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.ICQ
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - ILO Macro
|
||||
# Shorewall - ILO Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.ILO
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IMAP Macro
|
||||
# Shorewall - IMAP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IMAP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IMAPS Macro
|
||||
# Shorewall - IMAPS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IMAPS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPIP Macro
|
||||
# Shorewall - IPIP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPIP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPMI Macro
|
||||
# Shorewall - IPMI Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPMI
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 3.2 - IPP Macro
|
||||
# Shorewall - IPP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPP Broadcast Macro
|
||||
# Shorewall - IPP Broadcast Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPPbrd
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPPserver Macro
|
||||
# Shorewall - IPPserver Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPPserver
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPsec Macro
|
||||
# Shorewall - IPsec Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPsec
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPsecah Macro
|
||||
# Shorewall - IPsecah Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPsecah
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - IPsecnat Macro
|
||||
# Shorewall - IPsecnat Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IPsecnat
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 IRC Macro
|
||||
# Shorewall IRC Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.IRC
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - JAP Macro
|
||||
# Shorewall - JAP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.JAP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Jabber Macro
|
||||
# Shorewall - Jabber Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Jabber
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - JabberPlain Macro
|
||||
# Shorewall - JabberPlain Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.JabberPlain
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - JabberSecure (SSL) Macro
|
||||
# Shorewall - JabberSecure (SSL) Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.JabberSecure
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 3.4 - Jabberd (server intercommunication)
|
||||
# Shorewall - Jabberd (server intercommunication)
|
||||
#
|
||||
# /usr/share/shorewall/macro.Jabberd
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 3.2 - Jetdirect Macro
|
||||
# Shorewall - Jetdirect Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Jetdirect
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Kerberos Macro
|
||||
# Shorewall - Kerberos Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Kerberos
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - L2TP Macro
|
||||
# Shorewall - L2TP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.L2TP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - LDAP Macro
|
||||
# Shorewall - LDAP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.LDAP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - LDAPS Macro
|
||||
# Shorewall - LDAPS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.LDAPS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - MSNP Macro
|
||||
# Shorewall - MSNP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.MSNP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - MSSQL Macro
|
||||
# Shorewall - MSSQL Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.MSSQL
|
||||
#
|
||||
@@ -9,3 +9,4 @@
|
||||
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
|
||||
# PORT(S) PORT(S) DEST LIMIT GROUP
|
||||
PARAM - - tcp 1433
|
||||
PARAM - - udp 1434
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Mail Macro
|
||||
# Shorewall - Mail Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Mail
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - MongoDB Macro
|
||||
# Shorewall - MongoDB Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.MongoDB
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Munin Macro
|
||||
# Shorewall - Munin Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Munin
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - MySQL Macro
|
||||
# Shorewall - MySQL Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.MySQL
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 NNTP Macro
|
||||
# Shorewall NNTP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.NNTP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 NNTPS Macro
|
||||
# Shorewall NNTPS Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.NNTPS
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - NTP Macro
|
||||
# Shorewall - NTP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.NTP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - NTPbi Macro
|
||||
# Shorewall - NTPbi Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.NTPbi
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - NTPbrd Macro
|
||||
# Shorewall - NTPbrd Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.NTPbrd
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - OSPF Macro
|
||||
# Shorewall - OSPF Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.OSPF
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - OpenVPN Macro
|
||||
# Shorewall - OpenVPN Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.OpenVPN Macro
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - PCA Macro
|
||||
# Shorewall - PCA Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.PCA
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - POP3 Macro
|
||||
# Shorewall - POP3 Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.POP3
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - POP3S Macro
|
||||
# Shorewall - POP3S Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.POP3S
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - PPTP Macro
|
||||
# Shorewall - PPTP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.PPtP Macro
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Ping Macro
|
||||
# Shorewall - Ping Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Ping
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - PostgreSQL Macro
|
||||
# Shorewall - PostgreSQL Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.PostgreSQL
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 3.2 - Printer Macro
|
||||
# Shorewall - Printer Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Printer
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Puppet Macro
|
||||
# Shorewall - Puppet Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Puppet
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - QUIC Macro
|
||||
# Shorewall - QUIC Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.QUIC
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 3.2 - RDP Macro
|
||||
# Shorewall - RDP Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.RDP
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - RIPbi Macro
|
||||
# Shorewall - RIPbi Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.RIPbi
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - RNDC Macro
|
||||
# Shorewall - RNDC Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.RNDC
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Razor Macro
|
||||
# Shorewall - Razor Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Razor
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Rdate Macro
|
||||
# Shorewall - Rdate Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Rdate
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Redis Macro
|
||||
# Shorewall - Redis Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Redis
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Reject Macro
|
||||
# Shorewall - Reject Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Reject
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Macro Template
|
||||
# Shorewall - Macro Template
|
||||
#
|
||||
# /usr/share/shorewall/macro.Rfc1918
|
||||
#
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Shorewall version 5 - Rsync Macro
|
||||
# Shorewall - Rsync Macro
|
||||
#
|
||||
# /usr/share/shorewall/macro.Rsync
|
||||
#
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user