forked from extern/shorewall_code
Compare commits
2 Commits
5.2.6-Beta
...
5.1.3
Author | SHA1 | Date | |
---|---|---|---|
|
e8b90f89a3 | ||
|
870f6130ee |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
|||||||
*targetname export-ignore
|
|
@@ -18,7 +18,7 @@ Shoreline Firewall (Shorewall) Version 5
|
|||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Please see https://shorewall.org/Install.htm for installation
|
Please see http://www.shorewall.net/Install.htm for installation
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
5.2.5-Beta2
|
|
13
Shorewall-core/configure
vendored
13
Shorewall-core/configure
vendored
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Shorewall Packet Filtering Firewall configuration program - V5.2
|
# Shorewall Packet Filtering Firewall RPM configuration program - V4.6
|
||||||
#
|
#
|
||||||
# (c) 2012,2014,2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2012,2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at https://shorewall.org
|
# Shorewall documentation is available at http://www.shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -109,9 +109,6 @@ if [ -z "$vendor" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
vendor=suse
|
vendor=suse
|
||||||
;;
|
;;
|
||||||
alt|basealt|altlinux)
|
|
||||||
vendor=alt
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
vendor="$ID"
|
vendor="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -135,8 +132,6 @@ 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
|
||||||
@@ -195,7 +190,7 @@ for p in ${!params[@]}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo '#' > shorewallrc
|
echo '#' > shorewallrc
|
||||||
echo "# Created by Shorewall Core version $VERSION configure - " `date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"` >> shorewallrc
|
echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc
|
||||||
echo "# rc file: $rcfile" >> shorewallrc
|
echo "# rc file: $rcfile" >> shorewallrc
|
||||||
echo '#' >> shorewallrc
|
echo '#' >> shorewallrc
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#! /usr/bin/perl -w
|
#! /usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# Shorewall Packet Filtering Firewall configuration program - V5.2
|
# Shorewall Packet Filtering Firewall RPM configuration program - V4.5
|
||||||
#
|
#
|
||||||
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at https://shorewall.org
|
# Shorewall documentation is available at http://www.shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -74,8 +74,6 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -119,9 +117,6 @@ 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';
|
||||||
@@ -178,12 +173,7 @@ my $outfile;
|
|||||||
|
|
||||||
open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!";
|
open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!";
|
||||||
|
|
||||||
if ( $ENV{SOURCE_DATE_EPOCH} ) {
|
|
||||||
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s\n", VERSION, `date --utc --date=\"\@$ENV{SOURCE_DATE_EPOCH}\"`;
|
|
||||||
} else {
|
|
||||||
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];
|
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 "# rc file: $rcfilename\n#\n";
|
||||||
|
|
||||||
print $outfile "# Input: @ARGV\n#\n" if @ARGV;
|
print $outfile "# Input: @ARGV\n#\n" if @ARGV;
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
#
|
#
|
||||||
# Script to install Shoreline Firewall Core Modules
|
# Script to install Shoreline Firewall Core Modules
|
||||||
#
|
#
|
||||||
# (c) 2000-2018 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -172,9 +172,6 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
alt|basealt|altlinux)
|
|
||||||
BUILD=alt
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -183,8 +180,6 @@ 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
|
||||||
@@ -243,7 +238,7 @@ case "$HOST" in
|
|||||||
apple)
|
apple)
|
||||||
echo "Installing Mac-specific configuration...";
|
echo "Installing Mac-specific configuration...";
|
||||||
;;
|
;;
|
||||||
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt|alt)
|
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
fatal_error "Unknown HOST \"$HOST\""
|
fatal_error "Unknown HOST \"$HOST\""
|
||||||
@@ -340,8 +335,9 @@ for f in lib.* ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ $SHAREDIR != /usr/share ]; then
|
if [ $SHAREDIR != /usr/share ]; then
|
||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.base
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.base
|
||||||
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.cli
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.core
|
||||||
|
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.2 -- /usr/share/shorewall/lib.base
|
# Shorewall 5.0 -- /usr/share/shorewall/lib.base
|
||||||
#
|
#
|
||||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.2 -- /usr/share/shorewall/lib.common
|
# Shorewall 5.0 -- /usr/share/shorewall/lib.common.
|
||||||
#
|
#
|
||||||
# (c) 2010-2018 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010-2015 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 daemon.err "ERROR:$g_product start failed:Firewall state not changed"
|
mylogger kern.err "ERROR:$g_product start failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
mylogger daemon.err "ERROR:$g_product restart failed:Firewall state not changed"
|
mylogger kern.err "ERROR:$g_product restart failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
restore)
|
restore)
|
||||||
mylogger daemon.err "ERROR:$g_product restore failed:Firewall state not changed"
|
mylogger kern.err "ERROR:$g_product restore failed:Firewall state not changed"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -92,20 +92,18 @@ 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
|
||||||
if [ "$g_debugging" = debug ]; then
|
options="$1 -"
|
||||||
options='-D'
|
shift;
|
||||||
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
|
||||||
@@ -271,48 +269,53 @@ loadmodule() # $1 = module name, $2 - * arguments
|
|||||||
{
|
{
|
||||||
local modulename
|
local modulename
|
||||||
modulename=$1
|
modulename=$1
|
||||||
shift
|
|
||||||
local moduleoptions
|
|
||||||
moduleoptions=$*
|
|
||||||
local modulefile
|
local modulefile
|
||||||
local suffix
|
local suffix
|
||||||
|
|
||||||
if [ -d /sys/module/ ]; then
|
if [ -d /sys/module/ ]; then
|
||||||
if ! list_search $modulename $DONT_LOAD; then
|
if ! list_search $modulename $DONT_LOAD; then
|
||||||
if [ ! -d /sys/module/$modulename ]; then
|
if [ ! -d /sys/module/$modulename ]; then
|
||||||
|
shift
|
||||||
|
|
||||||
|
for suffix in $MODULE_SUFFIX ; do
|
||||||
|
for directory in $moduledirectories; do
|
||||||
|
modulefile=$directory/${modulename}.${suffix}
|
||||||
|
|
||||||
|
if [ -f $modulefile ]; then
|
||||||
case $moduleloader in
|
case $moduleloader in
|
||||||
insmod)
|
insmod)
|
||||||
for directory in $moduledirectories; do
|
insmod $modulefile $*
|
||||||
for modulefile in $directory/${modulename}.*; do
|
;;
|
||||||
if [ -f $modulefile ]; then
|
*)
|
||||||
insmod $modulefile $moduleoptions
|
modprobe $modulename $*
|
||||||
return
|
;;
|
||||||
|
esac
|
||||||
|
break 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
;;
|
|
||||||
*)
|
|
||||||
modprobe -q $modulename $moduleoptions
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif ! list_search $modulename $DONT_LOAD $MODULES; then
|
elif ! list_search $modulename $DONT_LOAD $MODULES; then
|
||||||
|
shift
|
||||||
|
|
||||||
|
for suffix in $MODULE_SUFFIX ; do
|
||||||
|
for directory in $moduledirectories; do
|
||||||
|
modulefile=$directory/${modulename}.${suffix}
|
||||||
|
|
||||||
|
if [ -f $modulefile ]; then
|
||||||
case $moduleloader in
|
case $moduleloader in
|
||||||
insmod)
|
insmod)
|
||||||
for directory in $moduledirectories; do
|
insmod $modulefile $*
|
||||||
for modulefile in $directory/${modulename}.*; do
|
;;
|
||||||
if [ -f $modulefile ]; then
|
*)
|
||||||
insmod $modulefile $moduleoptions
|
modprobe $modulename $*
|
||||||
return
|
;;
|
||||||
|
esac
|
||||||
|
break 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
;;
|
|
||||||
*)
|
|
||||||
modprobe -q $modulename $moduleoptions
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,6 +338,8 @@ reload_kernel_modules() {
|
|||||||
moduleloader=insmod
|
moduleloader=insmod
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -n "${MODULE_SUFFIX:=ko ko.gz ko.xz o o.gz o.xz gz xz}" ]
|
||||||
|
|
||||||
if [ -n "$MODULESDIR" ]; then
|
if [ -n "$MODULESDIR" ]; then
|
||||||
case "$MODULESDIR" in
|
case "$MODULESDIR" in
|
||||||
+*)
|
+*)
|
||||||
@@ -389,6 +394,8 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
|||||||
moduleloader=insmod
|
moduleloader=insmod
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -n "${MODULE_SUFFIX:=o gz xz ko o.gz o.xz ko.gz ko.xz}" ]
|
||||||
|
|
||||||
if [ -n "$MODULESDIR" ]; then
|
if [ -n "$MODULESDIR" ]; then
|
||||||
case "$MODULESDIR" in
|
case "$MODULESDIR" in
|
||||||
+*)
|
+*)
|
||||||
@@ -413,7 +420,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
|
||||||
|
|
||||||
modules=$(find_file helpers)
|
[ -n "$LOAD_HELPERS_ONLY" ] && modules=$(find_file helpers) || modules=$(find_file modules)
|
||||||
|
|
||||||
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)
|
||||||
@@ -421,7 +428,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
|
||||||
@@ -503,7 +510,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 do not support XOR ("^").
|
# the popular light-weight Bourne shell derivatives don't support XOR ("^").
|
||||||
#
|
#
|
||||||
ip_broadcast() {
|
ip_broadcast() {
|
||||||
local x
|
local x
|
||||||
@@ -738,8 +745,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 -N as
|
# /sbin/shorewall program while holding mutual exclusion, you should pass "nolock" as
|
||||||
# the first argument. Example "shorewall -N refresh"
|
# the first argument. Example "shorewall nolock 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
|
||||||
@@ -753,44 +760,36 @@ 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 [ -z "$g_havemutex" -a $MUTEX_TIMEOUT -gt 0 ]; then
|
if [ $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" ] || [ $lockpid = 0 ]; then
|
if [ -z "$lockpid" -o $lockpid = 0 ]; then
|
||||||
rm -f ${lockf}
|
rm -f ${lockf}
|
||||||
error_message "WARNING: Stale lockfile ${lockf} removed"
|
error_message "WARNING: Stale lockfile ${lockf} removed"
|
||||||
elif [ -z "$openwrt" ]; then
|
elif [ $lockpid -eq $$ ]; then
|
||||||
if [ $lockpid -eq $$ ]; then
|
return 0
|
||||||
fatal_error "Mutex_on confusion"
|
elif ! ps | grep -v grep | qt grep ${lockpid}; then
|
||||||
elif ! qt ps --pid ${lockpid}; then
|
|
||||||
rm -f ${lockf}
|
rm -f ${lockf}
|
||||||
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed"
|
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$openwrt" ]; then
|
if qt mywhich lockfile; then
|
||||||
lock ${lockf} || fatal_error "Can't lock ${lockf}"
|
lockfile -${MUTEX_TIMEOUT} -r1 ${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
|
||||||
@@ -800,15 +799,10 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -817,10 +811,7 @@ mutex_on()
|
|||||||
#
|
#
|
||||||
mutex_off()
|
mutex_off()
|
||||||
{
|
{
|
||||||
if [ -n "$g_havemutex" ]; then
|
[ -f ${CONFDIR}/rc.common ] && lock -u ${LOCKFILE:=${VARDIR}/lock}
|
||||||
eval $g_havemutex
|
rm -f ${LOCKFILE:=${VARDIR}/lock}
|
||||||
g_havemutex=
|
|
||||||
trap '' exit
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.2 -- /usr/share/shorewall/lib.core
|
# Shorewall 5.0 -- /usr/share/shorewall/lib.core
|
||||||
#
|
#
|
||||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
# generated scripts.
|
# generated scripts.
|
||||||
#
|
#
|
||||||
|
|
||||||
SHOREWALL_LIBVERSION=50108
|
SHOREWALL_LIBVERSION=50100
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fatal Error
|
# Fatal Error
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.2 -- /usr/share/shorewall/lib.installer
|
#
|
||||||
|
# Shorewall 5.0 -- /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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Shorewall 5.2 -- /usr/share/shorewall/lib.installer
|
#
|
||||||
|
# Shorewall 5.0 -- /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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -60,7 +61,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 -h $1 ] ; then
|
if [ -f $1 -o -L $1 ] ; then
|
||||||
rm -f $1
|
rm -f $1
|
||||||
echo "$1 Removed"
|
echo "$1 Removed"
|
||||||
fi
|
fi
|
||||||
@@ -84,7 +85,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 -h $f ] ; then
|
elif [ -f $f -o -L $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.2
|
# Shorewall Packet Filtering Firewall Control Program - V5.0
|
||||||
#
|
#
|
||||||
# (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 -
|
||||||
# Tom Eastep (teastep@shorewall.net)
|
# Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Shorewall documentation is available at https://shorewall.org
|
# Shorewall documentation is available at http://www.shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -25,10 +25,6 @@
|
|||||||
# For a list of supported commands, type 'shorewall help' or 'shorewall6 help'
|
# For a list of supported commands, type 'shorewall help' or 'shorewall6 help'
|
||||||
#
|
#
|
||||||
################################################################################################
|
################################################################################################
|
||||||
#
|
|
||||||
# Default product is Shorewall. PRODUCT will be set based on $0 and on passed -[46] and -l
|
|
||||||
# options
|
|
||||||
#
|
|
||||||
PRODUCT=shorewall
|
PRODUCT=shorewall
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# 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.2 rc file
|
# Apple OS X Shorewall 5.0 rc file
|
||||||
#
|
#
|
||||||
BUILD=apple
|
BUILD=apple
|
||||||
HOST=apple
|
HOST=apple
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Arch Linux Shorewall 5.2 rc file
|
# Arch Linux Shorewall 5.0 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.2 rc file
|
# Cygwin Shorewall 5.0 rc file
|
||||||
#
|
#
|
||||||
BUILD=cygwin
|
BUILD=cygwin
|
||||||
HOST=cygwin
|
HOST=cygwin
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Debian Shorewall 5.2 rc file
|
# Debian Shorewall 5.0 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=debian
|
HOST=debian
|
||||||
@@ -13,7 +13,7 @@ MANDIR=${PREFIX}/share/man #Directory where manpages are installed.
|
|||||||
INITDIR= #Directory where SysV init scripts are installed.
|
INITDIR= #Directory where SysV init scripts are installed.
|
||||||
INITFILE= #Name of the product's installed SysV init script
|
INITFILE= #Name of the product's installed SysV init script
|
||||||
INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script
|
INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script
|
||||||
ANNOTATED= #If non-empty, annotated configuration files are installed
|
ANNOTATED= #If non-zero, annotated configuration files are installed
|
||||||
SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR
|
SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR
|
||||||
SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
|
SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
|
||||||
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Debian Shorewall 5.2 rc file
|
# Debian Shorewall 5.0 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.2 rc file
|
# Default Shorewall 5.0 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/LEDE Shorewall 5.2 rc file
|
# OpenWRT Shorewall 5.0 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.2 rc file
|
# RedHat/FedoraShorewall 5.0 rc file
|
||||||
#
|
#
|
||||||
BUILD= #Default is to detect the build system
|
BUILD= #Default is to detect the build system
|
||||||
HOST=redhat
|
HOST=redhat
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall 5.2 rc file for installing into a Sandbox
|
|
||||||
#
|
|
||||||
BUILD= # Default is to detect the build system
|
|
||||||
HOST=linux
|
|
||||||
INSTALLDIR= # Set this to the directory where you want Shorewall installed
|
|
||||||
PREFIX=${INSTALLDIR}/usr # Top-level directory for shared files, libraries, etc.
|
|
||||||
SHAREDIR=${PREFIX}/share # Directory for arch-neutral files.
|
|
||||||
LIBEXECDIR=${PREFIX}/share # Directory for executable scripts.
|
|
||||||
PERLLIBDIR=${PREFIX}/share/shorewall # Directory to install Shorewall Perl module directory
|
|
||||||
CONFDIR=${INSTALLDIR}/etc # Directory where subsystem configurations are installed
|
|
||||||
SBINDIR=${INSTALLDIR}/sbin # Directory where system administration programs are installed
|
|
||||||
MANDIR= # Leave empty
|
|
||||||
INITDIR= # Leave empty
|
|
||||||
INITSOURCE= # Leave empty
|
|
||||||
INITFILE= # Leave empty
|
|
||||||
AUXINITSOURCE= # Leave empty
|
|
||||||
AUXINITFILE= # Leave empty
|
|
||||||
SERVICEDIR= # Leave empty
|
|
||||||
SERVICEFILE= # Leave empty
|
|
||||||
SYSCONFFILE= # Leave empty
|
|
||||||
SYSCONFDIR= # Leave empty
|
|
||||||
SPARSE= # Leave empty
|
|
||||||
ANNOTATED= # If non-empty, annotated configuration files are installed
|
|
||||||
VARLIB=${INSTALLDIR}/var/lib # Directory where product variable data is stored.
|
|
||||||
VARDIR=${VARLIB}/$PRODUCT # Directory where product variable data is stored.
|
|
||||||
DEFAULT_PAGER=/usr/bin/less # Pager to use if none specified in shorewall[6].conf
|
|
||||||
SANDBOX=Yes # Indicates SANDBOX installation
|
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Slackware Shorewall 5.2 rc file
|
# Slackware Shorewall 5.0 rc file
|
||||||
#
|
#
|
||||||
BUILD=slackware
|
BUILD=slackware
|
||||||
HOST=slackware
|
HOST=slackware
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SuSE Shorewall 5.2 rc file
|
# SuSE Shorewall 5.0 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 https://shorewall.org
|
# Shorewall documentation is available at http://www.shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Shorewall interface helper utility - V5.2
|
# Shorewall interface helper utility - V4.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 https://shorewall.org
|
# Shorewall documentation is available at http://www.shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 - MODE and INTERFACE inherited from the environment
|
# Debian ifupdown system
|
||||||
#
|
#
|
||||||
INTERFACE="$IFACE"
|
INTERFACE="$IFACE"
|
||||||
|
|
||||||
@@ -127,17 +127,6 @@ 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 https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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,8 +90,6 @@ case $0 in
|
|||||||
COMMAND=down
|
COMMAND=down
|
||||||
;;
|
;;
|
||||||
*dispatcher.d*)
|
*dispatcher.d*)
|
||||||
case "$2" in
|
|
||||||
up|down)
|
|
||||||
COMMAND="$2"
|
COMMAND="$2"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -99,11 +97,6 @@ case $0 in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -n "$LOGFILE" ] || LOGFILE=/dev/null
|
[ -n "$LOGFILE" ] || LOGFILE=/dev/null
|
||||||
|
@@ -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 https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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,15 +120,8 @@ case $0 in
|
|||||||
case $0 in
|
case $0 in
|
||||||
*dispatcher.d*)
|
*dispatcher.d*)
|
||||||
INTERFACE="$1"
|
INTERFACE="$1"
|
||||||
case "$2" in
|
|
||||||
up|down)
|
|
||||||
COMMAND="$2"
|
COMMAND="$2"
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*if-up.d*)
|
*if-up.d*)
|
||||||
COMMAND=up
|
COMMAND=up
|
||||||
;;
|
;;
|
||||||
|
@@ -1,150 +0,0 @@
|
|||||||
#!/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.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -73,16 +73,12 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
if [ $PRODUCT = shorewall ]; then
|
if [ $PRODUCT = shorewall ]; then
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 1
|
return 0
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,6 +108,7 @@ shorewall_start () {
|
|||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
#
|
#
|
||||||
# Run in a sub-shell to avoid name collisions
|
# Run in a sub-shell to avoid name collisions
|
||||||
#
|
#
|
||||||
@@ -121,6 +118,7 @@ shorewall_start () {
|
|||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "done."
|
echo "done."
|
||||||
@@ -147,8 +145,10 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "done."
|
echo "done."
|
||||||
@@ -159,9 +159,8 @@ shorewall_stop () {
|
|||||||
|
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
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"
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
||||||
else
|
else
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
echo_notdone
|
echo_notdone
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -44,14 +44,12 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if [ $PRODUCT = shorewall ]; then
|
||||||
return 0
|
|
||||||
elif [ $PRODUCT = shorewall ]; then
|
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,15 +66,12 @@ start () {
|
|||||||
|
|
||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
|
||||||
ipset -R < "$SAVE_IPSETS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
setstatedir
|
setstatedir
|
||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
|
if [ -x "${STATEDIR}/firewall" ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger
|
${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger
|
||||||
retval=${PIPESTATUS[0]}
|
retval=${PIPESTATUS[0]}
|
||||||
[ $retval -ne 0 ] && break
|
[ $retval -ne 0 ] && break
|
||||||
@@ -84,6 +79,9 @@ start () {
|
|||||||
retval=6 #Product not configured
|
retval=6 #Product not configured
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
@@ -108,6 +106,7 @@ stop () {
|
|||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
|
if [ -x "${STATEDIR}/firewall" ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger
|
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger
|
||||||
retval=${PIPESTATUS[0]}
|
retval=${PIPESTATUS[0]}
|
||||||
[ $retval -ne 0 ] && break
|
[ $retval -ne 0 ] && break
|
||||||
@@ -115,18 +114,12 @@ stop () {
|
|||||||
retval=6 #Product not configured
|
retval=6 #Product not configured
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
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
|
|
||||||
|
|
||||||
rm -f $lockfile
|
rm -f $lockfile
|
||||||
success
|
success
|
||||||
else
|
else
|
||||||
|
20
Shorewall-init/init.openwrt.sh
Executable file → Normal file
20
Shorewall-init/init.openwrt.sh
Executable file → Normal file
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
||||||
#
|
#
|
||||||
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
|
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
|
||||||
@@ -75,14 +75,12 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if [ $PRODUCT = shorewall ]; then
|
||||||
return 0
|
|
||||||
elif [ $PRODUCT = shorewall ]; then
|
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,17 +92,17 @@ start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
ipset -R < "$SAVE_IPSETS"
|
ipset -R < "$SAVE_IPSETS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boot () {
|
boot () {
|
||||||
@@ -119,19 +117,17 @@ stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
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"
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
||||||
else
|
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
||||||
#
|
#
|
||||||
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
@@ -69,12 +69,10 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
|
||||||
return 0
|
|
||||||
elif [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
|
|
||||||
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
|
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
|
||||||
else
|
else
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,10 +84,12 @@ shorewall_start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} stop
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
@@ -107,16 +107,16 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
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"
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
||||||
else
|
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
@@ -79,14 +79,12 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if [ $PRODUCT = shorewall ]; then
|
||||||
return 0
|
|
||||||
elif [ $PRODUCT = shorewall ]; then
|
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
else
|
else
|
||||||
return 6
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,10 +96,12 @@ shorewall_start () {
|
|||||||
printf "Initializing \"Shorewall-based firewalls\": "
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x $STATEDIR/firewall ]; then
|
||||||
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
|
||||||
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
|
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
@@ -117,16 +117,16 @@ shorewall_stop () {
|
|||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${STATEDIR}/firewall ${OPTIONS} clear
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
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"
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
||||||
else
|
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@@ -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 https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
ID=$(grep '^ID=' /etc/os-release | sed 's/ID=//; s/"//g;')
|
eval $(cat /etc/os-release | grep ^ID=)
|
||||||
|
|
||||||
case $ID in
|
case $ID in
|
||||||
fedora|rhel|centos|foobar)
|
fedora|rhel|centos|foobar)
|
||||||
@@ -181,9 +181,6 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
alt|basealt|altlinux)
|
|
||||||
BUILD=alt
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -194,8 +191,6 @@ 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
|
||||||
@@ -258,9 +253,6 @@ 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"
|
||||||
;;
|
;;
|
||||||
@@ -357,11 +349,12 @@ 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 ${CONFDIR}/network/if-up.d 0755
|
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-up.d 0755
|
||||||
make_parent_directory ${CONFDIR}/network/if-post-down.d 0755
|
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-down.d 0755
|
||||||
rm -f ${CONFDIR}/network/if-down.d/shorewall
|
make_parent_directory ${DESTDIR}${CONFDIR}/network/if-post-down.d 0755
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${DESTDIR}${CONFDIR}/default/$PRODUCT ]; then
|
if [ ! -f ${DESTDIR}${CONFDIR}/default/$PRODUCT ]; then
|
||||||
@@ -387,7 +380,7 @@ else
|
|||||||
elif [ $HOST = openwrt ]; then
|
elif [ $HOST = openwrt ]; then
|
||||||
# Not implemented on OpenWRT
|
# Not implemented on OpenWRT
|
||||||
/bin/true
|
/bin/true
|
||||||
elif [ "$HOST" != debian ]; then
|
else
|
||||||
make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755
|
make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -416,22 +409,19 @@ if [ $HOST != openwrt ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
|
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
|
||||||
if [ "$HOST" = debian ]; then
|
|
||||||
rm -f ${DESTDIR}${ETC}/NetworkManager/dispatcher.d/01-shorewall
|
|
||||||
else
|
|
||||||
[ $configure -eq 1 ] || make_parent_directory ${DESTDIR}${CONFDIR}/NetworkManager/dispatcher.d 0755
|
[ $configure -eq 1 ] || make_parent_directory ${DESTDIR}${CONFDIR}/NetworkManager/dispatcher.d 0755
|
||||||
install_file ifupdown ${DESTDIR}${ETC}/NetworkManager/dispatcher.d/01-shorewall 0544
|
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.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
|
||||||
#
|
#
|
||||||
# (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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 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
|
||||||
@@ -34,74 +33,13 @@ setstatedir() {
|
|||||||
|
|
||||||
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
|
||||||
|
|
||||||
if [ -x ${STATEDIR}/firewall ]; then
|
if [ $PRODUCT = shorewall ]; then
|
||||||
return 0
|
|
||||||
elif [ $PRODUCT = shorewall ]; then
|
|
||||||
${SBINDIR}/shorewall compile
|
${SBINDIR}/shorewall compile
|
||||||
elif [ $PRODUCT = shorewall6 ]; then
|
elif [ $PRODUCT = shorewall6 ]; then
|
||||||
${SBINDIR}/shorewall -6 compile
|
${SBINDIR}/shorewall -6 compile
|
||||||
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
|
else
|
||||||
rm -f "${SAVE_IPSETS}.tmp"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -121,12 +59,64 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Initialize the firewall
|
||||||
|
shorewall_start () {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Initializing \"Shorewall-based firewalls\": "
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
#
|
||||||
|
# Run in a sub-shell to avoid name collisions
|
||||||
|
#
|
||||||
|
(
|
||||||
|
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
|
||||||
|
${STATEDIR}/firewall ${OPTIONS} stop
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
|
||||||
|
ipset -R < "$SAVE_IPSETS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the firewall
|
||||||
|
shorewall_stop () {
|
||||||
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
if setstatedir; then
|
||||||
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
|
${STATEDIR}/firewall ${OPTIONS} clear
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
|
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
||||||
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_init_start
|
shorewall_start
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
shorewall_init_stop
|
shorewall_stop
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop}"
|
echo "Usage: $0 {start|stop}"
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
5.2.4.1
|
|
@@ -1,117 +0,0 @@
|
|||||||
#!/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 - V5.2
|
# 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) 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 - V5.2
|
# 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) 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 - V5.2
|
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Shorewall documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is part of Shorewall.
|
# This program is part of Shorewall.
|
||||||
#
|
#
|
||||||
@@ -190,9 +190,6 @@ if [ -z "$BUILD" ]; then
|
|||||||
opensuse)
|
opensuse)
|
||||||
BUILD=suse
|
BUILD=suse
|
||||||
;;
|
;;
|
||||||
alt|basealt|altlinux)
|
|
||||||
BUILD=alt
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
BUILD="$ID"
|
BUILD="$ID"
|
||||||
;;
|
;;
|
||||||
@@ -201,8 +198,6 @@ 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
|
||||||
@@ -271,9 +266,6 @@ case "$HOST" in
|
|||||||
openwrt)
|
openwrt)
|
||||||
echo "Installing OpenWRT-specific configuration..."
|
echo "Installing OpenWRT-specific configuration..."
|
||||||
;;
|
;;
|
||||||
alt)
|
|
||||||
echo "Installing ALT-specific configuration...";
|
|
||||||
;;
|
|
||||||
linux)
|
linux)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -426,11 +418,6 @@ 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
|
||||||
@@ -438,6 +425,11 @@ 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 5.2 -- /usr/share/shorewall-lite/lib.base
|
# Shorewall 4.4 -- /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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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="https://shorewall.org/Documentation_Index.html">https://shorewall.org/Documentation_Index.html</ulink></para>
|
url="http://www.shorewall.net/Documentation_Index.html">http://www.shorewall.net/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),
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#
|
#
|
||||||
# On the target system (the system where the firewall program is to run):
|
# On the target system (the system where the firewall program is to run):
|
||||||
#
|
#
|
||||||
# [ IPTABLES=<iptables binary> ] [ MODULESDIR=<kernel modules directory> ] shorecap > capabilities
|
# [ IPTABLES=<iptables binary> ] [ MODULESDIR=<kernel modules directory> ] [ MODULE_SUFFIX="<module suffix list>" ] shorecap > capabilities
|
||||||
#
|
#
|
||||||
# Now move the capabilities file to the compilation system. The file must
|
# Now move the capabilities file to the compilation system. The file must
|
||||||
# be placed in a directory on the CONFIG_PATH to be used when compiling firewalls
|
# be placed in a directory on the CONFIG_PATH to be used when compiling firewalls
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
#
|
#
|
||||||
# IPTABLES - iptables
|
# IPTABLES - iptables
|
||||||
# MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
|
# MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
|
||||||
|
# MODULE_SUFFIX - "o gz xz ko o.gz o.xz ko.gz ko.xz"
|
||||||
#
|
#
|
||||||
# Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
|
# Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
|
||||||
# used during firewall compilation, then the generated firewall program will likewise not
|
# used during firewall compilation, then the generated firewall program will likewise not
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
# "man shorewall-lite.conf"
|
# "man shorewall-lite.conf"
|
||||||
#
|
#
|
||||||
# Manpage also online at
|
# Manpage also online at
|
||||||
# https://shorewall.org/manpages/shorewall-lite.conf.html
|
# http://www.shorewall.net/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 [ -h ${SHAREDIR}/$PRODUCT/init ]; then
|
if [ -L ${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
|
||||||
|
56
Shorewall/Actions/action.A_Drop.deprecated
Normal file
56
Shorewall/Actions/action.A_Drop.deprecated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/action.A_Drop
|
||||||
|
#
|
||||||
|
# The audited default DROP common rules
|
||||||
|
#
|
||||||
|
# This action is invoked before a DROP policy is enforced. The purpose
|
||||||
|
# of the action is:
|
||||||
|
#
|
||||||
|
# a) Avoid logging lots of useless cruft.
|
||||||
|
# b) Ensure that certain ICMP packets that are necessary for successful
|
||||||
|
# internet operation are always ACCEPTed.
|
||||||
|
#
|
||||||
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
|
#
|
||||||
|
?require AUDIT_TARGET
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT
|
||||||
|
#
|
||||||
|
# Count packets that come through here
|
||||||
|
#
|
||||||
|
COUNT
|
||||||
|
#
|
||||||
|
# Special Handling for Auth
|
||||||
|
#
|
||||||
|
Auth(A_DROP)
|
||||||
|
#
|
||||||
|
# ACCEPT critical ICMP types
|
||||||
|
#
|
||||||
|
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
||||||
|
# AllowICMPs must be before broadcast Drop.
|
||||||
|
#
|
||||||
|
A_AllowICMPs - - icmp
|
||||||
|
#
|
||||||
|
# Don't log broadcasts and multicasts
|
||||||
|
#
|
||||||
|
dropBcast(audit)
|
||||||
|
dropMcast(audit)
|
||||||
|
#
|
||||||
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
|
# and just confuse people when they appear in the log.
|
||||||
|
#
|
||||||
|
dropInvalid(audit)
|
||||||
|
#
|
||||||
|
# Drop Microsoft noise so that it doesn't clutter up the log.
|
||||||
|
#
|
||||||
|
SMB(A_DROP)
|
||||||
|
A_DropUPnP
|
||||||
|
#
|
||||||
|
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
||||||
|
#
|
||||||
|
dropNotSyn(audit) - - tcp
|
||||||
|
#
|
||||||
|
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
||||||
|
# the log.
|
||||||
|
#
|
||||||
|
A_DropDNSrep
|
@@ -1,13 +1,13 @@
|
|||||||
#
|
#
|
||||||
# Shorewall -- /usr/share/shorewall/action.A_REJECT
|
# Shorewall -- /usr/share/shorewall/action.A_REJECTWITH
|
||||||
#
|
#
|
||||||
# A_REJECT Action.
|
# A_REJECT Action.
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
|
52
Shorewall/Actions/action.A_Reject.deprecated
Normal file
52
Shorewall/Actions/action.A_Reject.deprecated
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/action.A_Reject
|
||||||
|
#
|
||||||
|
# The audited default REJECT action common rules
|
||||||
|
#
|
||||||
|
# This action is invoked before a REJECT policy is enforced. The purpose
|
||||||
|
# of the action is:
|
||||||
|
#
|
||||||
|
# a) Avoid logging lots of useless cruft.
|
||||||
|
# b) Ensure that certain ICMP packets that are necessary for successful
|
||||||
|
# internet operation are always ACCEPTed.
|
||||||
|
#
|
||||||
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO
|
||||||
|
#
|
||||||
|
# Count packets that come through here
|
||||||
|
#
|
||||||
|
COUNT
|
||||||
|
#
|
||||||
|
# ACCEPT critical ICMP types
|
||||||
|
#
|
||||||
|
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
||||||
|
# AllowICMPs must be before broadcast Drop.
|
||||||
|
#
|
||||||
|
A_AllowICMPs - - icmp
|
||||||
|
#
|
||||||
|
# Drop Broadcasts and multicasts so they don't clutter up the log
|
||||||
|
# (these must *not* be rejected).
|
||||||
|
#
|
||||||
|
dropBcast(audit)
|
||||||
|
dropMcast(audit)
|
||||||
|
#
|
||||||
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
|
# and just confuse people when they appear in the log (these ICMPs cannot be
|
||||||
|
# rejected).
|
||||||
|
#
|
||||||
|
dropInvalid(audit)
|
||||||
|
#
|
||||||
|
# Reject Microsoft noise so that it doesn't clutter up the log.
|
||||||
|
#
|
||||||
|
SMB(A_REJECT)
|
||||||
|
A_DropUPnP
|
||||||
|
#
|
||||||
|
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
||||||
|
#
|
||||||
|
dropNotSyn(audit) - - tcp
|
||||||
|
#
|
||||||
|
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
||||||
|
# the log.
|
||||||
|
#
|
||||||
|
A_DropDNSrep
|
@@ -7,38 +7,5 @@
|
|||||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
DEFAULTS ACCEPT
|
DEFAULTS ACCEPT
|
||||||
|
|
||||||
?if __IPV4
|
|
||||||
@1 - - icmp fragmentation-needed {comment="Needed ICMP types"}
|
@1 - - icmp fragmentation-needed {comment="Needed ICMP types"}
|
||||||
@1 - - icmp time-exceeded {comment="Needed ICMP types"}
|
@1 - - icmp time-exceeded {comment="Needed ICMP types"}
|
||||||
?else
|
|
||||||
?COMMENT Needed ICMP types (RFC4890)
|
|
||||||
@1 - - ipv6-icmp destination-unreachable
|
|
||||||
@1 - - ipv6-icmp packet-too-big
|
|
||||||
@1 - - ipv6-icmp time-exceeded
|
|
||||||
@1 - - ipv6-icmp parameter-problem
|
|
||||||
|
|
||||||
# The following should have a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
@1 - - ipv6-icmp router-solicitation
|
|
||||||
@1 - - ipv6-icmp router-advertisement
|
|
||||||
@1 - - ipv6-icmp neighbour-solicitation
|
|
||||||
@1 - - ipv6-icmp neighbour-advertisement
|
|
||||||
@1 - - ipv6-icmp 137 # Redirect
|
|
||||||
@1 - - ipv6-icmp 141 # Inverse neighbour discovery solicitation
|
|
||||||
@1 - - ipv6-icmp 142 # Inverse neighbour discovery advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and must be allowed to transit a bridge
|
|
||||||
@1 fe80::/10 - ipv6-icmp 130 # Listener query
|
|
||||||
@1 fe80::/10 - ipv6-icmp 131 # Listener report
|
|
||||||
@1 fe80::/10 - ipv6-icmp 132 # Listener done
|
|
||||||
@1 fe80::/10 - ipv6-icmp 143 # Listener report v2
|
|
||||||
|
|
||||||
# The following should be received with a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
@1 - - ipv6-icmp 148 # Certificate path solicitation
|
|
||||||
@1 - - ipv6-icmp 149 # Certificate path advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and a ttl of 1 and must be allowed to transit a bridge
|
|
||||||
@1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
|
||||||
@1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
|
||||||
@1 fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
|
||||||
?endif
|
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -20,7 +20,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.
|
||||||
#
|
#
|
||||||
# Broadcast[([<action>|[,{audit|-}])]
|
# Broadcast[([<action>|-[,{audit|-}])]
|
||||||
#
|
#
|
||||||
# Default action is DROP
|
# Default action is DROP
|
||||||
#
|
#
|
||||||
@@ -34,28 +34,18 @@ DEFAULTS DROP,-
|
|||||||
?else
|
?else
|
||||||
?begin perl;
|
?begin perl;
|
||||||
|
|
||||||
use strict;
|
|
||||||
use Shorewall::IPAddrs;
|
use Shorewall::IPAddrs;
|
||||||
use Shorewall::Config;
|
use Shorewall::Config;
|
||||||
use Shorewall::Chains;
|
use Shorewall::Chains;
|
||||||
|
|
||||||
my ( $action, $audit ) = get_action_params( 2 );
|
my ( $action ) = get_action_params( 1 );
|
||||||
my $chainref = get_action_chain;
|
my $chainref = get_action_chain;
|
||||||
my ( $level, $tag ) = get_action_logging;
|
my ( $level, $tag ) = get_action_logging;
|
||||||
|
|
||||||
fatal_error "Invalid parameter to action Broadcast" if supplied $audit && $audit ne 'audit';
|
|
||||||
|
|
||||||
my $target = require_audit ( $action , $audit );
|
|
||||||
|
|
||||||
if ( $family == F_IPV4 ) {
|
|
||||||
add_commands $chainref, 'for address in $ALL_BCASTS; do';
|
add_commands $chainref, 'for address in $ALL_BCASTS; do';
|
||||||
} elsif ($family == F_IPV6 ) {
|
|
||||||
add_commands $chainref, 'for address in $ALL_ACASTS; do';
|
|
||||||
}
|
|
||||||
|
|
||||||
incr_cmd_level $chainref;
|
incr_cmd_level $chainref;
|
||||||
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -d $address ' if $level ne '';
|
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -d $address ' if $level ne '';
|
||||||
add_jump $chainref, $target, 0, "-d \$address ";
|
add_jump $chainref, $action, 0, "-d \$address ";
|
||||||
decr_cmd_level $chainref;
|
decr_cmd_level $chainref;
|
||||||
add_commands $chainref, 'done';
|
add_commands $chainref, 'done';
|
||||||
|
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
|
84
Shorewall/Actions/action.Drop.deprecated
Normal file
84
Shorewall/Actions/action.Drop.deprecated
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/action.Drop
|
||||||
|
#
|
||||||
|
# The former default DROP common rules. Use of this action is now deprecated
|
||||||
|
#
|
||||||
|
# This action is invoked before a DROP policy is enforced. The purpose
|
||||||
|
# of the action is:
|
||||||
|
#
|
||||||
|
# a) Avoid logging lots of useless cruft.
|
||||||
|
# b) Ensure that certain ICMP packets that are necessary for successful
|
||||||
|
# internet operation are always ACCEPTed.
|
||||||
|
#
|
||||||
|
# The action accepts six optional parameters:
|
||||||
|
#
|
||||||
|
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
|
||||||
|
# actions.
|
||||||
|
# 2 - Action to take with Auth requests. Default is to do nothing special
|
||||||
|
# with them.
|
||||||
|
# 3 - Action to take with SMB requests. Default is DROP or A_DROP,
|
||||||
|
# depending on the setting of the first parameter.
|
||||||
|
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
|
||||||
|
# A_ACCEPT depending on the first parameter.
|
||||||
|
# 5 - Action to take with late DNS replies (UDP source port 53). Default
|
||||||
|
# is DROP or A_DROP depending on the first parameter.
|
||||||
|
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
|
||||||
|
# depending on the first parameter.
|
||||||
|
#
|
||||||
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
?warning "You are using the deprecated Drop default action. Please see http://www.shorewall.net/Actions.html#Default"
|
||||||
|
|
||||||
|
?if passed(@1)
|
||||||
|
?if @1 eq 'audit'
|
||||||
|
DEFAULTS -,-,A_DROP,A_ACCEPT,A_DROP,A_DROP
|
||||||
|
?else
|
||||||
|
?error The first parameter to Drop must be 'audit' or '-'
|
||||||
|
?endif
|
||||||
|
?else
|
||||||
|
DEFAULTS -,-,DROP,ACCEPT,DROP,DROP
|
||||||
|
?endif
|
||||||
|
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT
|
||||||
|
#
|
||||||
|
# Count packets that come through here
|
||||||
|
#
|
||||||
|
COUNT
|
||||||
|
#
|
||||||
|
# Special Handling for Auth
|
||||||
|
#
|
||||||
|
?if passed(@2)
|
||||||
|
Auth(@2)
|
||||||
|
?endif
|
||||||
|
#
|
||||||
|
# ACCEPT critical ICMP types
|
||||||
|
#
|
||||||
|
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
||||||
|
# AllowICMPs must be before silent broadcast Drop.
|
||||||
|
#
|
||||||
|
AllowICMPs(@4) - - icmp
|
||||||
|
#
|
||||||
|
# Don't log broadcasts or multicasts
|
||||||
|
#
|
||||||
|
Broadcast(DROP,@1)
|
||||||
|
Multicast(DROP,@1)
|
||||||
|
#
|
||||||
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
|
# and just confuse people when they appear in the log.
|
||||||
|
#
|
||||||
|
Invalid(DROP,@1)
|
||||||
|
#
|
||||||
|
# Drop Microsoft noise so that it doesn't clutter up the log.
|
||||||
|
#
|
||||||
|
SMB(@3)
|
||||||
|
DropUPnP(@6)
|
||||||
|
#
|
||||||
|
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
||||||
|
#
|
||||||
|
NotSyn(DROP,@1) - - tcp
|
||||||
|
#
|
||||||
|
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
||||||
|
# the log.
|
||||||
|
#
|
||||||
|
DropDNSrep(@5)
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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,33 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.FIN
|
|
||||||
#
|
|
||||||
# FIN Action
|
|
||||||
#
|
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
|
||||||
#
|
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
|
||||||
#
|
|
||||||
# Complete documentation is available at https://shorewall.org
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# as published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# 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, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# FIN[([<action>])]
|
|
||||||
#
|
|
||||||
# Default action is ACCEPT
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
DEFAULTS ACCEPT,-
|
|
||||||
|
|
||||||
@1 - - ;;+ -p 6 --tcp-flags ACK,FIN ACK,FIN
|
|
@@ -13,9 +13,9 @@
|
|||||||
DEFAULTS 2,0
|
DEFAULTS 2,0
|
||||||
|
|
||||||
?if @1 !~ /^\d+/ || ! @1 || @1 > 1024
|
?if @1 !~ /^\d+/ || ! @1 || @1 > 1024
|
||||||
?error Invalid value (@1) for the GlusterFS Bricks argument
|
?error Invalid value for Bricks (@1)
|
||||||
?elsif @2 !~ /^[01]$/
|
?elsif @2 !~ /^[01]$/
|
||||||
?error Invalid value (@2) for the GlusterFS IB argument
|
?error Invalid value for IB (@2)
|
||||||
?endif
|
?endif
|
||||||
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT
|
#ACTION SOURCE DEST PROTO DPORT
|
||||||
|
@@ -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 https://shorewall.org/Events.html
|
# For additional information, see http://www.shorewall.net/Events.html
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# DO NOT REMOVE THE FOLLOWING LINE
|
# DO NOT REMOVE THE FOLLOWING LINE
|
||||||
@@ -107,14 +107,11 @@ if ( $command & $REAP_OPT ) {
|
|||||||
|
|
||||||
$duration .= '--rttl ' if $command & $TTL_OPT;
|
$duration .= '--rttl ' if $command & $TTL_OPT;
|
||||||
|
|
||||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
|
||||||
perl_action_helper( "${action}-", "-m recent --rcheck ${duration}--hitcount $hitcount" );
|
|
||||||
$action = 'ACCEPT';
|
|
||||||
}
|
|
||||||
|
|
||||||
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};
|
||||||
#
|
#
|
||||||
# The event mark bit must be within 32 bits
|
# The event mark bit must be within 32 bits
|
||||||
@@ -133,7 +130,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 $srcdst" );
|
perl_action_helper( $action , "-m mark --mark $mark/$mark -m recent --remove --name $event" );
|
||||||
} elsif ( $command & $UPDATE_CMD ) {
|
} elsif ( $command & $UPDATE_CMD ) {
|
||||||
perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" );
|
perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" );
|
||||||
} else {
|
} else {
|
||||||
|
@@ -4,9 +4,9 @@
|
|||||||
# Invalid Action
|
# Invalid Action
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -33,22 +33,16 @@ DEFAULTS DROP,-
|
|||||||
?else
|
?else
|
||||||
?begin perl;
|
?begin perl;
|
||||||
|
|
||||||
use strict;
|
|
||||||
use Shorewall::IPAddrs;
|
use Shorewall::IPAddrs;
|
||||||
use Shorewall::Config;
|
use Shorewall::Config;
|
||||||
use Shorewall::Chains;
|
use Shorewall::Chains;
|
||||||
|
|
||||||
my ( $action, $audit ) = get_action_params( 2 );
|
my ( $action ) = get_action_params( 1 );
|
||||||
my $chainref = get_action_chain;
|
my $chainref = get_action_chain;
|
||||||
my ( $level, $tag ) = get_action_logging;
|
my ( $level, $tag ) = get_action_logging;
|
||||||
|
|
||||||
fatal_error "Invalid parameter to action Multicast" if supplied $audit && $audit ne 'audit';
|
log_rule_limit $level, $chainref, 'Multicast' , $action, '', $tag, 'add', ' -d 224.0.0.0/4 ' if $level ne '';
|
||||||
|
add_jump $chainref, $action, 0, '-d 224.0.0.0/4 ';
|
||||||
my $target = require_audit ( $action , $audit );
|
|
||||||
my $dest = ( $family == F_IPV4 ) ? join( ' ', '-d', IPv4_MULTICAST . ' ' ) : join( ' ', '-d', IPv6_MULTICAST . ' ' );
|
|
||||||
|
|
||||||
log_rule_limit( $level, $chainref, 'Multicast' , $action, '', $tag, 'add', $dest ) if $level ne '';
|
|
||||||
add_jump $chainref, $target, 0, $dest;
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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
|
||||||
|
85
Shorewall/Actions/action.Reject.deprecated
Normal file
85
Shorewall/Actions/action.Reject.deprecated
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/action.Reject
|
||||||
|
#
|
||||||
|
# The former default REJECT action common rules. Use of this action is deprecated.
|
||||||
|
#
|
||||||
|
# This action is invoked before a REJECT policy is enforced. The purpose
|
||||||
|
# of the action is:
|
||||||
|
#
|
||||||
|
# a) Avoid logging lots of useless cruft.
|
||||||
|
# b) Ensure that certain ICMP packets that are necessary for successful
|
||||||
|
# internet operation are always ACCEPTed.
|
||||||
|
#
|
||||||
|
# The action accepts six optional parameters:
|
||||||
|
#
|
||||||
|
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
|
||||||
|
# actions.
|
||||||
|
# 2 - Action to take with Auth requests. Default is to do nothing
|
||||||
|
# special with them.
|
||||||
|
# 3 - Action to take with SMB requests. Default is REJECT or A_REJECT,
|
||||||
|
# depending on the setting of the first parameter.
|
||||||
|
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
|
||||||
|
# A_ACCEPT depending on the first parameter.
|
||||||
|
# 5 - Action to take with late DNS replies (UDP source port 53). Default
|
||||||
|
# is DROP or A_DROP depending on the first parameter.
|
||||||
|
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
|
||||||
|
# depending on the first parameter.
|
||||||
|
#
|
||||||
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
|
###############################################################################
|
||||||
|
?warning "You are using the deprecated Reject default action. Please see http://www.shorewall.net/Actions.html#Default"
|
||||||
|
|
||||||
|
?if passed(@1)
|
||||||
|
?if @1 eq 'audit'
|
||||||
|
DEFAULTS -,-,A_REJECT,A_ACCEPT,A_DROP,A_DROP
|
||||||
|
?else
|
||||||
|
?error The first parameter to Reject must be 'audit' or '-'
|
||||||
|
?endif
|
||||||
|
?else
|
||||||
|
DEFAULTS -,-,REJECT,ACCEPT,DROP,DROP
|
||||||
|
?endif
|
||||||
|
|
||||||
|
#ACTION SOURCE DEST PROTO
|
||||||
|
#
|
||||||
|
# Count packets that come through here
|
||||||
|
#
|
||||||
|
COUNT
|
||||||
|
#
|
||||||
|
# Special handling for Auth
|
||||||
|
#
|
||||||
|
?if passed(@2)
|
||||||
|
Auth(@2)
|
||||||
|
?endif
|
||||||
|
#
|
||||||
|
# ACCEPT critical ICMP types
|
||||||
|
#
|
||||||
|
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
||||||
|
# AllowICMPs must be before silent broadcast Drop.
|
||||||
|
#
|
||||||
|
AllowICMPs(@4) - - icmp
|
||||||
|
#
|
||||||
|
# Drop Broadcasts so they don't clutter up the log
|
||||||
|
# (broadcasts must *not* be rejected).
|
||||||
|
#
|
||||||
|
Broadcast(DROP,@1)
|
||||||
|
Multicast(DROP,@1)
|
||||||
|
#
|
||||||
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
|
# and just confuse people when they appear in the log (these ICMPs cannot be
|
||||||
|
# rejected).
|
||||||
|
#
|
||||||
|
Invalid(DROP,@1)
|
||||||
|
#
|
||||||
|
# Reject Microsoft noise so that it doesn't clutter up the log.
|
||||||
|
#
|
||||||
|
SMB(@3)
|
||||||
|
DropUPnP(@6)
|
||||||
|
#
|
||||||
|
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
||||||
|
#
|
||||||
|
NotSyn(DROP,@1) - - tcp
|
||||||
|
#
|
||||||
|
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
||||||
|
# the log.
|
||||||
|
#
|
||||||
|
DropDNSrep(@5)
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org/Events.html
|
# For additional information, see http://www.shorewall.net/Events.html
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# DO NOT REMOVE THE FOLLOWING LINE
|
# DO NOT REMOVE THE FOLLOWING LINE
|
||||||
@@ -41,11 +41,6 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
|
|||||||
set_action_disposition( $disposition) if supplied $disposition;
|
set_action_disposition( $disposition) if supplied $disposition;
|
||||||
set_action_name_to_caller;
|
set_action_name_to_caller;
|
||||||
|
|
||||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
|
||||||
perl_action_helper( "${action}-", "" );
|
|
||||||
$action = 'ACCEPT';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $destination eq 'dst' ) {
|
if ( $destination eq 'dst' ) {
|
||||||
perl_action_helper( $action, '', '', "-m recent --name $event --remove --rdest" );
|
perl_action_helper( $action, '', '', "-m recent --name $event --remove --rdest" );
|
||||||
} else {
|
} else {
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# address (dst)
|
# address (dst)
|
||||||
# Disposition - Disposition for any event generated.
|
# Disposition - Disposition for any event generated.
|
||||||
#
|
#
|
||||||
# For additional information, see https://shorewall.org/Events.html
|
# For additional information, see http://www.shorewall.net/Events.html
|
||||||
#
|
#
|
||||||
|
|
||||||
DEFAULTS -,ACCEPT,src
|
DEFAULTS -,ACCEPT,src
|
||||||
@@ -37,11 +37,6 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
|
|||||||
set_action_disposition( $disposition) if supplied $disposition;
|
set_action_disposition( $disposition) if supplied $disposition;
|
||||||
set_action_name_to_caller;
|
set_action_name_to_caller;
|
||||||
|
|
||||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
|
||||||
perl_action_helper( "${action}-", "" );
|
|
||||||
$action = 'ACCEPT';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $destination eq 'dst' ) {
|
if ( $destination eq 'dst' ) {
|
||||||
perl_action_helper( $action, '', '', "-m recent --name $event --set --rdest" );
|
perl_action_helper( $action, '', '', "-m recent --name $event --set --rdest" );
|
||||||
} else {
|
} else {
|
||||||
|
@@ -26,4 +26,4 @@ $tcpflags_action - - ;;+ -p 6 --tcp-flags ALL FIN,URG,PSH
|
|||||||
$tcpflags_action - - ;;+ -p 6 --tcp-flags ALL NONE
|
$tcpflags_action - - ;;+ -p 6 --tcp-flags ALL NONE
|
||||||
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,RST SYN,RST
|
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,RST SYN,RST
|
||||||
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,FIN SYN,FIN
|
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,FIN SYN,FIN
|
||||||
$tcpflags_action - - ;;+ -p 6 --syn --sport 0
|
$tcpflags_action - - ;;+ -p tcp --syn --sport 0
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
# it under the terms of Version 2 of the GNU General Public License
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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,39 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/action.dropBcasts
|
|
||||||
#
|
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
|
||||||
#
|
|
||||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
|
||||||
#
|
|
||||||
# Complete documentation is available at https://shorewall.org
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# as published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# 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, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# dropBcasts[([audit])]
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
DEFAULTS -
|
|
||||||
|
|
||||||
?if passed(@1)
|
|
||||||
?if @1 eq 'audit'
|
|
||||||
?require AUDIT_TARGET
|
|
||||||
Broadcast(A_DROP)
|
|
||||||
?else
|
|
||||||
?error "Invalid argument (@1) to dropBcasts"
|
|
||||||
?endif
|
|
||||||
?else
|
|
||||||
Broadcast(DROP)
|
|
||||||
?endif
|
|
||||||
|
|
@@ -5,9 +5,9 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org/Actions.html for additional
|
# Please see http://shorewall.net/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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org/Actions.html for additional
|
# Please see http://shorewall.net/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 - V5.2
|
# Shorewall WAN Interface monitor - V4.4
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org/MultiISP.html#swping.
|
# For information about this script, see http://www.shorewall.net/MultiISP.html#swping.
|
||||||
#
|
#
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
#
|
#
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shorewall WAN Interface monitor - V5.2
|
# Shorewall WAN Interface monitor - V4.4
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
# 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 https://shorewall.org/Install.htm for installation
|
Please see http://www.shorewall.net/Install.htm for installation
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/macro.IPFS-swarm
|
|
||||||
#
|
|
||||||
# This macro handles IPFS data traffic (the connection to IPFS swarm).
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
|
||||||
|
|
||||||
PARAM - - tcp 4001
|
|
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,12 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
@@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/macro.FreeIPA
|
|
||||||
#
|
|
||||||
# This macro handles FreeIPA server traffic.
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
|
||||||
|
|
||||||
DNS
|
|
||||||
HTTP
|
|
||||||
HTTPS
|
|
||||||
Kerberos
|
|
||||||
Kpasswd
|
|
||||||
LDAP
|
|
||||||
LDAPS
|
|
||||||
NTP
|
|
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user