Compare commits

..

25 Commits

Author SHA1 Message Date
Tom Eastep
95b7d351e2 Correct documentation index link
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-02-18 15:29:38 -08:00
Tom Eastep
66f5319a14 Correct NFQUEUE! manpage description
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-10-07 05:47:11 -07:00
Tom Eastep
89b5023703 Correct typo in mangle manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-04-30 11:16:51 -07:00
Tom Eastep
ba104a3528 OMerge branch '4.6.13' of ssh://server.shorewall.net/home/teastep/shorewall/code into 4.6.13 2016-01-02 13:14:52 -08:00
Tom Eastep
505f2838fe Another fix to configure.pl from Matt Darfeuille
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-01-02 13:04:05 -08:00
Tom Eastep
ae9a4e3b83 Accept host=debian.* in the configure scripts (Matt Darfeuille)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-01-02 13:03:35 -08:00
Tom Eastep
70d08f97f6 Support the DROP command in the mangle file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-01-02 13:02:59 -08:00
Tom Eastep
c6065c0370 Accept host=debian.* in the configure scripts (Matt Darfeuille)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-12 08:19:31 -08:00
Tom Eastep
f9de9c3c74 Another fix to configure.pl from Matt Darfeuille.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-11 14:02:16 -08:00
Tom Eastep
b0f6de62d0 Delete superfluous line from shorewall-init.service.debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 14:29:39 -08:00
Tom Eastep
17ce463b2d Don't delete files that are still valid in 4.6.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:48:53 -08:00
Tom Eastep
a3e467b8e3 Use setup_logread() in lib.cli-std
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:08:51 -08:00
Tom Eastep
b84f6aef55 Add some comments in get_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:06:37 -08:00
Tom Eastep
376999970b More tweaks to params processing and exporting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:06:15 -08:00
Tom Eastep
7d98721169 Add Cygwin-specific code in get_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:05:59 -08:00
Tom Eastep
489ee29e53 More param handling fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:05:44 -08:00
Tom Eastep
05d99c8500 Don't export variables with parentheses in their names
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 11:05:28 -08:00
Tom Eastep
3336db6f86 Change to IP_FORWARDING=keep in shorewall6.conf files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 10:59:34 -08:00
Tom Eastep
b90513bd62 Start optional interfaces when there are no providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 10:56:46 -08:00
Tom Eastep
2bf6b92c02 Install/uninstall/configure fixes from Matt Darfeuille
Also add OpenWRT support

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-08 10:56:37 -08:00
Tom Eastep
e0861408cd Handle MAC addresses in IPv6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-12-07 15:24:13 -08:00
Tom Eastep
326cf8ba0a Correct permissions on certain files in $CONFDIR/$PRODUCT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 13:09:30 -07:00
Tom Eastep
41880276a9 Deal with missing 'hostname' utility
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 13:09:10 -07:00
Tom Eastep
6835caf484 Correct error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 13:08:43 -07:00
Tom Eastep
266863713d Delete main default routes when there are 'load=' or 'fallback=' interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-14 07:46:00 -07:00
463 changed files with 8229 additions and 5212 deletions

View File

@@ -1,4 +1,4 @@
Shoreline Firewall (Shorewall) Version 5
Shoreline Firewall (Shorewall) Version 4
----- ----
-----------------------------------------------------------------------------

View File

@@ -28,7 +28,7 @@
#
# Build updates this
#
VERSION=4.6.12
VERSION=4.5.2.1
case "$BASH_VERSION" in
[4-9].*)

View File

@@ -31,7 +31,7 @@ use strict;
# Build updates this
#
use constant {
VERSION => '4.6.12'
VERSION => '4.5.2.1'
};
my %params;

View File

@@ -24,9 +24,6 @@
VERSION=xxx #The Build script inserts the actual version
PRODUCT=shorewall-core
Product="Shorewall Core"
usage() # $1 = exit status
{
ME=$(basename $0)
@@ -103,9 +100,6 @@ require()
eval [ -n "\$$1" ] || fatal_error "Required option $1 not set"
}
#
# Change to the directory containing this script
#
cd "$(dirname $0)"
#
@@ -346,10 +340,8 @@ fi
mkdir -p ${DESTDIR}${SBINDIR}
chmod 755 ${DESTDIR}${SBINDIR}
if [ -n "${MANDIR}" ]; then
mkdir -p ${DESTDIR}${MANDIR}
chmod 755 ${DESTDIR}${MANDIR}
fi
mkdir -p ${DESTDIR}${MANDIR}
chmod 755 ${DESTDIR}${MANDIR}
if [ -n "${INITFILE}" ]; then
mkdir -p ${DESTDIR}${INITDIR}

View File

@@ -1,7 +1,7 @@
#
# Shorewall 5.0 -- /usr/share/shorewall/lib.base
# Shorewall 4.5 -- /usr/share/shorewall/lib.base
#
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net)
# (c) 1999-2014 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#

View File

@@ -1,7 +1,7 @@
#
# Shorewall 5.0 -- /usr/share/shorewall/lib.cli.
# Shorewall 4.5 -- /usr/share/shorewall/lib.cli.
#
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net)
# (c) 1999-2014 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -25,7 +25,7 @@
# loaded after this one and replaces some of the functions declared here.
#
SHOREWALL_CAPVERSION=50004
SHOREWALL_CAPVERSION=40609
[ -n "${g_program:=shorewall}" ]
@@ -440,16 +440,30 @@ do_save() {
status=0
if [ -f ${VARDIR}/firewall ]; then
if $iptables_save | grep -v -- '-A dynamic.* -j ACCEPT' > ${VARDIR}/restore-$$; then
cp -f ${VARDIR}/firewall $g_restorepath
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-iptables
chmod +x $g_restorepath
echo " Currently-running Configuration Saved to $g_restorepath"
run_user_exit save
if [ -n "$WORKAROUNDS" ]; then
if $iptables_save | iptablesbug | grep -v -- '-A dynamic.* -j ACCEPT' > ${VARDIR}/restore-$$; then
cp -f ${VARDIR}/firewall $g_restorepath
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-iptables
chmod +x $g_restorepath
echo " Currently-running Configuration Saved to $g_restorepath"
run_user_exit save
else
rm -f ${VARDIR}/restore-$$
echo " ERROR: Currently-running Configuration Not Saved" >&2
status=1
fi
else
rm -f ${VARDIR}/restore-$$
echo " ERROR: Currently-running Configuration Not Saved" >&2
status=1
if $iptables_save | grep -v -- '-A dynamic.* -j ACCEPT' > ${VARDIR}/restore-$$; then
cp -f ${VARDIR}/firewall $g_restorepath
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-iptables
chmod +x $g_restorepath
echo " Currently-running Configuration Saved to $g_restorepath"
run_user_exit save
else
rm -f ${VARDIR}/restore-$$
echo " ERROR: Currently-running Configuration Not Saved" >&2
status=1
fi
fi
else
echo " ERROR: ${VARDIR}/firewall does not exist" >&2
@@ -461,11 +475,24 @@ do_save() {
resolve_arptables
if [ -n "$arptables" ]; then
if ${arptables}-save > ${VARDIR}/restore-$$; then
if grep -q '^-A' ${VARDIR}/restore-$$; then
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-arptables
else
rm -f ${VARDIR}/restore-$$
if [ -n "$WORKAROUNDS" ]; then
#
# 'sed' command is a hack to work around broken arptables_jf
#
if ${arptables}-save | sed 's/-p[[:space:]]\+0\([[:digit:]]\)00\/ffff/-p 000\1\/ffff/' > ${VARDIR}/restore-$$; then
if grep -q '^-A' ${VARDIR}/restore-$$; then
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-arptables
else
rm -f ${VARDIR}/restore-$$
fi
fi
else
if ${arptables}-save > ${VARDIR}/restore-$$; then
if grep -q '^-A' ${VARDIR}/restore-$$; then
mv -f ${VARDIR}/restore-$$ ${g_restorepath}-arptables
else
rm -f ${VARDIR}/restore-$$
fi
fi
fi
else
@@ -506,12 +533,28 @@ do_save() {
esac
if [ -n "$IPSET" ]; then
if eval $IPSET -S > ${VARDIR}/ipsets.tmp; then
#
# Don't save an 'empty' file
#
grep -qE -- '^(-N|create )' ${VARDIR}/ipsets.tmp && mv -f ${VARDIR}/ipsets.tmp ${g_restorepath}-ipsets
if [ -n "$WORKAROUNDS" ]; then
if [ -f /etc/debian_version ] && [ $(cat /etc/debian_version) = 5.0.3 ]; then
#
# The 'grep -v' is a hack for a bug in ipset's nethash implementation when xtables-addons is applied to Lenny
#
hack='| grep -v /31'
else
hack=
fi
if eval $IPSET -S $hack > ${VARDIR}/ipsets.tmp; then
#
# Don't save an 'empty' file
#
grep -qE -- '^(-N|create )' ${VARDIR}/ipsets.tmp && mv -f ${VARDIR}/ipsets.tmp ${g_restorepath}-ipsets
fi
fi
elif eval $IPSET -S > ${VARDIR}/ipsets.tmp; then
#
# Don't save an 'empty' file
#
grep -qE -- '^(-N|create )' ${VARDIR}/ipsets.tmp && mv -f ${VARDIR}/ipsets.tmp ${g_restorepath}-ipsets
fi
;;
[Nn]o|ipv4|ipv6)
@@ -1052,13 +1095,11 @@ show_command() {
conntrack -f ipv6 -L $@ | show_connections_filter
else
[ $# -gt 1 ] && usage 1
if [ -f /proc/sys/net/netfilter/nf_conntrack_count -a -f /proc/sys/net/nf_conntrack ]; then
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
echo "$g_product $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
echo
grep '^ipv6' /proc/net/nf_conntrack | sed -r 's/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | show_connections_filter
fi
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
echo "$g_product $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
echo
grep '^ipv6' /proc/net/nf_conntrack | sed -r 's/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | show_connections_filter
fi
;;
nat)
@@ -2593,7 +2634,6 @@ determine_capabilities() {
TARPIT_TARGET=
IFACE_MATCH=
TCPMSS_TARGET=
WAIT_OPTION=
AMANDA_HELPER=
FTP_HELPER=
@@ -2617,11 +2657,6 @@ determine_capabilities() {
qt $arptables -L OUT && ARPTABLESJF=Yes
fi
if qt $g_tool --wait -t filter -L INPUT -n -v; then
WAIT_OPTION=Yes
tool="$tool --wait"
fi
chain=fooX$$
if [ -n "$NAT_ENABLED" ]; then
@@ -3080,10 +3115,8 @@ report_capabilities_unsorted() {
if [ $g_family -eq 4 ]; then
report_capability "iptables -S (IPTABLES_S)" $IPTABLES_S
report_capability "iptables --wait option (WAIT_OPTION)" $WAIT_OPTION
else
report_capability "ip6tables -S (IPTABLES_S)" $IPTABLES_S
report_capability "ip6tables --wait option (WAIT_OPTION)" $WAIT_OPTION
fi
report_capability "Basic Filter (BASIC_FILTER)" $BASIC_FILTER
@@ -3193,7 +3226,6 @@ report_capabilities_unsorted1() {
report_capability1 TARPIT_TARGET
report_capability1 IFACE_MATCH
report_capability1 TCPMSS_TARGET
report_capability1 WAIT_OPTION
report_capability1 AMANDA_HELPER
report_capability1 FTP_HELPER
@@ -3272,11 +3304,9 @@ show_interfaces() {
local printed
for f in ${VARDIR}/*.status; do
if [ -f $f ]; then
interface=$(basename $f)
echo " Interface ${interface%.status} is $(interface_status $f)"
printed=Yes
fi
interface=$(basename $f)
echo " Interface ${interface%.status} is $(interface_status $f)"
printed=Yes
done
[ -n "$printed" ] && echo
@@ -3540,34 +3570,10 @@ noiptrace_command() {
fatal_error "$g_product is not started"
fi
}
#
# Verify that we have a compiled firewall script
#
verify_firewall_script() {
if [ ! -f $g_firewall ]; then
echo " ERROR: $g_product is not properly installed" >&2
if [ -L $g_firewall ]; then
echo " $g_firewall is a symbolic link to a" >&2
echo " non-existant file" >&2
else
echo " The file $g_firewall does not exist" >&2
fi
exit 2
fi
}
################################################################################
# The remaining functions are used by the Lite cli - they are overloaded by
# the Standard CLI by loading lib.cli-std
################################################################################
#
# Set the configuration variables from shorewall[6]-lite.conf.
# Set the configuration variables from shorewall-lite.conf
#
get_config() {
local config
local lib
ensure_config_path
@@ -3697,11 +3703,29 @@ get_config() {
g_loopback=$(find_loopback_interfaces)
lib=$(find_file lib.cli-user)
[ -f $lib ] && . $lib
}
#
# Verify that we have a compiled firewall script
#
verify_firewall_script() {
if [ ! -f $g_firewall ]; then
echo " ERROR: $g_product is not properly installed" >&2
if [ -L $g_firewall ]; then
echo " $g_firewall is a symbolic link to a" >&2
echo " non-existant file" >&2
else
echo " The file $g_firewall does not exist" >&2
fi
exit 2
fi
}
################################################################################
# The remaining functions are used by the Lite cli - they are overloaded by
# the Standard CLI by loading lib.cli-std
################################################################################
#
# Start Command Executor
#
@@ -3793,7 +3817,7 @@ start_command() {
}
#
# Reload/Restart Command Executor
# Restart Command Executor
#
restart_command() {
local finished
@@ -3852,11 +3876,11 @@ restart_command() {
[ -n "$g_nolock" ] || mutex_on
if [ -x ${VARDIR}/firewall ]; then
run_it ${VARDIR}/firewall $g_debugging $COMMAND
run_it ${VARDIR}/firewall $g_debugging restart
rc=$?
else
error_message "${VARDIR}/firewall is missing or is not executable"
logger -p kern.err "ERROR:$g_product $COMMAND failed"
logger -p kern.err "ERROR:$g_product restart failed"
rc=6
fi
@@ -3928,13 +3952,6 @@ usage() # $1 = exit status
ecko " refresh [ -d ] [ -n ] [ -T ] [ -D <directory> ] [ <chain>... ]"
echo " reject <address> ..."
ecko " reload [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
if [ -z "$g_lite" ]; then
echo " remote-reload [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
echo " remote-restart [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
echo " remote-start [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
fi
echo " reset [ <chain> ... ]"
if [ -n "$g_lite" ]; then
@@ -4025,6 +4042,7 @@ shorewall_cli() {
g_refreshchains=:none:
g_confess=
g_update=
g_convert=
g_annotate=
g_recovering=
g_timestamp=
@@ -4033,10 +4051,14 @@ shorewall_cli() {
g_conditional=
g_file=
g_doing="Compiling"
g_directives=
g_inline=
g_tcrules=
g_counters=
g_loopback=
g_compiled=
g_routestopped=
g_notrack=
VERBOSE=
VERBOSITY=1
@@ -4215,7 +4237,7 @@ shorewall_cli() {
run_it $g_firewall $g_debugging reset $@
[ -n "$g_nolock" ] || mutex_off
;;
reload|restart)
restart)
get_config Yes Yes
shift
restart_command $@

View File

@@ -1,7 +1,7 @@
#
# Shorewall 5.0 -- /usr/share/shorewall/lib.common.
# Shorewall 4.5 -- /usr/share/shorewall/lib.common.
#
# (c) 2010-2015 - Tom Eastep (teastep@shorewall.net)
# (c) 2010-2014 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -71,35 +71,108 @@ startup_error() # $* = Error Message
}
#
# Create the required option string and run the passed script using
# Get the Shorewall version of the passed script
#
get_script_version() { # $1 = script
local temp
local version
local ifs
local digits
local verbosity
if [ -z "$WORKAROUNDS" -o "$g_compiled" = "$g_file" ]; then
#
# Unless WORKAROUNDS=No, either this script was just compiled or AUTOMAKE
# determined that re-compilation wasn't needed
#
temp="$SHOREWALL_VERSION"
else
verbosity="$VERBOSITY"
VERBOSITY=0
temp=$( $SHOREWALL_SHELL $1 version | tail -n 1 )
fi
if [ -z "$temp" ]; then
version=0
else
temp=${temp%-*}
ifs=$IFS
IFS=.
temp=$(echo $temp)
IFS=$ifs
digits=0
for temp in $temp; do
version=${version}$(printf '%02d' $temp)
digits=$(($digits + 1))
[ $digits -eq 3 ] && break
done
fi
echo $version
VERBOSITY="$verbosity"
}
#
# Do required exports or create the required option string and run the passed script using
# $SHOREWALL_SHELL
#
run_it() {
local script
local options
local version
export VARDIR
script=$1
shift
if [ x$1 = xtrace -o x$1 = xdebug ]; then
options="$1 -"
shift;
version=$(get_script_version $script)
if [ $version -lt 040408 ]; then
#
# Old script that doesn't understand 4.4.8 script options
#
export RESTOREFILE
export VERBOSITY
export NOROUTES=$g_noroutes
export PURGE=$g_purge
export TIMESTAMP=$g_timestamp
export RECOVERING=$g_recovering
case "$g_program" in
*-lite)
#
# Shorewall Lite
#
export LOGFORMAT
export IPTABLES
;;
esac
else
options='-'
#
# 4.4.8 or later -- no additional exports required
#
if [ x$1 = xtrace -o x$1 = xdebug ]; then
options="$1 -"
shift;
else
options='-'
fi
[ -n "$g_noroutes" ] && options=${options}n
[ -n "$g_timestamp" ] && options=${options}t
[ -n "$g_purge" ] && options=${options}p
[ -n "$g_recovering" ] && options=${options}r
[ -n "$g_counters" ] && options=${options}c
options="${options}V $VERBOSITY"
[ -n "$RESTOREFILE" ] && options="${options} -R $RESTOREFILE"
fi
[ -n "$g_noroutes" ] && options=${options}n
[ -n "$g_timestamp" ] && options=${options}t
[ -n "$g_purge" ] && options=${options}p
[ -n "$g_recovering" ] && options=${options}r
[ -n "$g_counters" ] && options=${options}c
options="${options}V $VERBOSITY"
[ -n "$RESTOREFILE" ] && options="${options} -R $RESTOREFILE"
$SHOREWALL_SHELL $script $options $@
}
@@ -316,7 +389,6 @@ reload_kernel_modules() {
local moduleloader
moduleloader=modprobe
local uname
local extras
if ! qt mywhich modprobe; then
moduleloader=insmod
@@ -324,25 +396,9 @@ reload_kernel_modules() {
[ -n "${MODULE_SUFFIX:=ko ko.gz ko.xz o o.gz o.xz gz xz}" ]
if [ -n "$MODULESDIR" ]; then
case "$MODULESDIR" in
+*)
extras="$MODULESDIR"
extras=${extras#+}
MODULESDIR=
;;
esac
fi
if [ -z "$MODULESDIR" ]; then
uname=$(uname -r)
[ -z "$MODULESDIR" ] && \
uname=$(uname -r) && \
MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
if [ -n "$extras" ]; then
for directory in $(split "$extras"); do
MODULESDIR="$MODULESDIR:/lib/modules/$uname/$directory"
done
fi
fi
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
@@ -372,7 +428,6 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
local savemoduleinfo
savemoduleinfo=${1:-Yes} # So old compiled scripts still work
local uname
local extras
if ! qt mywhich modprobe; then
moduleloader=insmod
@@ -380,25 +435,9 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
[ -n "${MODULE_SUFFIX:=o gz xz ko o.gz o.xz ko.gz ko.xz}" ]
if [ -n "$MODULESDIR" ]; then
case "$MODULESDIR" in
+*)
extras="$MODULESDIR"
extras=${extras#+}
MODULESDIR=
;;
esac
fi
if [ -z "$MODULESDIR" ]; then
uname=$(uname -r)
[ -z "$MODULESDIR" ] && \
uname=$(uname -r) && \
MODULESDIR=/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
if [ -n "$extras" ]; then
for directory in $(split "$extras"); do
MODULESDIR="$MODULESDIR:/lib/modules/$uname/$directory"
done
fi
fi
for directory in $(split $MODULESDIR); do
[ -d $directory ] && moduledirectories="$moduledirectories $directory"

View File

@@ -1,5 +1,5 @@
#
# Apple OS X Shorewall 5.0 rc file
# Apple OS X Shorewall 4.5 rc file
#
BUILD=apple
HOST=apple

View File

@@ -1,5 +1,5 @@
#
# Arch Linux Shorewall 5.0 rc file
# Arch Linux Shorewall 4.5 rc file
#
BUILD= #Default is to detect the build system
HOST=archlinux

View File

@@ -1,5 +1,5 @@
#
# Cygwin Shorewall 5.0 rc file
# Cygwin Shorewall 4.5 rc file
#
BUILD=cygwin
HOST=cygwin

View File

@@ -15,7 +15,7 @@ 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
ANNOTATED= #If non-zero, annotated configuration files are installed
SYSCONFFILE=default.debian #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
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR

View File

@@ -1,5 +1,5 @@
#
# Default Shorewall 5.0 rc file
# Default Shorewall 4.5 rc file
#
HOST=linux #Generic Linux
BUILD= #Default is to detect the build system

View File

@@ -3,21 +3,24 @@
#
# Input: host=openwrt
#
PREFIX=/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=/etc #Directory where subsystem configurations are installed
SBINDIR=/sbin #Directory where system administration programs are installed
MANDIR= #Directory where manpages are installed.
INITDIR=/etc/init.d #Directory where SysV init scripts are installed.
INITFILE=$PRODUCT #Name of the product's installed SysV init script
INITSOURCE=init.openwrt.sh #Name of the distributed file to be installed as the SysV init script
ANNOTATED= #If non-zero, annotated configuration files are installed
SYSCONFDIR=${CONFDIR}/sysconfig #Directory where SysV init parameter files are installed
SYSCONFFILE=sysconfig #Name of the distributed file to be installed in $SYSCONFDIR
SERVICEDIR= #Directory where .service files are installed (systems running systemd only)
SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
VARLIB=/lib #Directory where product variable data is stored.
VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored.
HOST=openwrt
PREFIX=/usr
SHAREDIR=${PREFIX}/share
LIBEXECDIR=${PREFIX}/share
PERLLIBDIR=${PREFIX}/share/shorewall
CONFDIR=/etc
SBINDIR=/sbin
MANDIR=${PREFIX}/man
INITDIR=/etc/init.d
INITSOURCE=init.openwrt.sh
INITFILE=$PRODUCT
AUXINITSOURCE=
AUXINITFILE=
SERVICEDIR=
SERVICEFILE=
SYSCONFFILE=default.openwrt
SYSCONFDIR=${CONFDIR}/sysconfig
SPARSE=
ANNOTATED=
VARLIB=/lib
VARDIR=${VARLIB}/$PRODUCT

View File

@@ -1,5 +1,5 @@
#
# RedHat/FedoraShorewall 5.0 rc file
# RedHat/FedoraShorewall 4.5 rc file
#
BUILD= #Default is to detect the build system
HOST=redhat

View File

@@ -1,5 +1,5 @@
#
# Slackware Shorewall 5.0 rc file
# Slackware Shorewall 4.5 rc file
#
BUILD=slackware
HOST=slackware

View File

@@ -1,5 +1,5 @@
#
# SuSE Shorewall 5.0 rc file
# SuSE Shorewall 4.5 rc file
#
BUILD= #Default is to detect the build system
HOST=suse

View File

@@ -27,9 +27,7 @@
# shown below. Simply run this script to remove Shorewall Firewall
VERSION=xxx #The Build script inserts the actual version
PRODUCT="shorewall-core"
Product="Shorewall Core"
usage() # $1 = exit status
{
ME=$(basename $0)
@@ -68,11 +66,6 @@ remove_file() # $1 = file to restore
fi
}
#
# Change to the directory containing this script
#
cd "$(dirname $0)"
#
# Read the RC file
#

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
# 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]
#

View File

@@ -1,131 +0,0 @@
#!/bin/sh /etc/rc.common
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
#
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
#
# On most distributions, this file should be called /etc/init.d/shorewall-init.
#
# This program is part of Shorewall.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 2 of the license or, at your
# option, any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# 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.
#
#
# arg1 of init script is arg2 when rc.common is sourced
case "$action" in
start|stop|boot)
if [ "$(id -u)" != "0" ]
then
echo "You must be root to start, stop or restart \"Shorewall \"."
exit 1
fi
# check if shorewall-init is configured or not
if [ -f "/etc/sysconfig/shorewall-init" ]
then
. /etc/sysconfig/shorewall-init
if [ -z "$PRODUCTS" ]
then
exit 0
fi
else
exit 0
fi
;;
enable|disable|enabled)
# Openwrt related
# start and stop runlevel variable
START=19
STOP=91
;;
*)
echo "Usage: /etc/init.d/shorewall-init {start|stop}"
exit 1
esac
#
# The installer may alter this
#
. /usr/share/shorewall/shorewallrc
# Locate the current PRODUCT's statedir
setstatedir() {
local statedir
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
statedir=$( . ${CONFDIR}/${PRODUCT}/vardir && echo $VARDIR )
fi
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
else
return 0
fi
}
# Initialize the firewall
start () {
local PRODUCT
local STATEDIR
echo -n "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then
if ! ${SBIN}/$PRODUCT 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
}
boot () {
start
}
# Clear the firewall
stop () {
local PRODUCT
local STATEDIR
echo -n "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
}

View File

@@ -1,5 +1,5 @@
#! /bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
#
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
#

View File

@@ -1,5 +1,5 @@
#! /bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
# 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]
#
@@ -38,7 +38,7 @@
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured

View File

@@ -28,8 +28,6 @@
#
VERSION=xxx #The Build script inserts the actual version.
PRODUCT=shorewall-init
Product="Shorewall Init"
usage() # $1 = exit status
{
@@ -73,50 +71,39 @@ mywhich() {
return 2
}
run_install()
{
if ! install $*; then
echo
echo "ERROR: Failed to install $*" >&2
exit 1
fi
}
cant_autostart()
{
echo
echo "WARNING: Unable to configure shorewall init to start automatically at boot" >&2
}
install_file() # $1 = source $2 = target $3 = mode
{
if cp -f $1 $2; then
if chmod $3 $2; then
if [ -n "$OWNER" ]; then
if chown $OWNER:$GROUP $2; then
return
fi
else
return 0
fi
fi
fi
echo "ERROR: Failed to install $2" >&2
exit 1
}
make_directory() # $1 = directory , $2 = mode
{
mkdir -p $1
chmod 0755 $1
[ -n "$OWNERSHIP" ] && chown $OWNERSHIP $1
}
require()
{
eval [ -n "\$$1" ] || fatal_error "Required option $1 not set"
}
#
# Change to the directory containing this script
#
install_file() # $1 = source $2 = target $3 = mode
{
run_install $T $OWNERSHIP -m $3 $1 ${2}
}
cd "$(dirname $0)"
PRODUCT=shorewall-init
#
# Parse the run line
#
T='-T'
finished=0
configure=1
@@ -243,8 +230,6 @@ if [ -z "$BUILD" ]; then
BUILD=slackware
elif [ -f /etc/arch-release ] ; then
BUILD=archlinux
elif [ -f ${CONFDIR}/openwrt_release ]; then
BUILD=openwrt
else
BUILD=linux
fi
@@ -252,24 +237,22 @@ if [ -z "$BUILD" ]; then
esac
fi
[ -n "$OWNER" ] || OWNER=$(id -un)
[ -n "$GROUP" ] || GROUP=$(id -gn)
case $BUILD in
apple)
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel
T=
;;
debian|gentoo|redhat|suse|slackware|archlinux)
;;
cygwin*|CYGWIN*)
OWNER=$(id -un)
GROUP=$(id -gn)
;;
*)
if [ $(id -u) -eq 0 ]; then
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
fi
[ -n "$BUILD" ] && echo "ERROR: Unknown BUILD environment ($BUILD)" >&2 || echo "ERROR: Unknown BUILD environment"
exit 1
;;
esac
[ -n "$OWNER" ] && OWNERSHIP="$OWNER:$GROUP"
OWNERSHIP="-o $OWNER -g $GROUP"
[ -n "$HOST" ] || HOST=$BUILD
@@ -294,9 +277,6 @@ case "$HOST" in
suse)
echo "Installing SuSE-specific configuration..."
;;
openwrt)
echo "Installing Openwrt-specific configuration..."
;;
linux)
echo "ERROR: Shorewall-init is not supported on this system" >&2
exit 1
@@ -310,12 +290,12 @@ esac
[ -z "$TARGET" ] && TARGET=$HOST
if [ -n "$DESTDIR" ]; then
if [ $(id -u) != 0 ] ; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
make_directory ${DESTDIR}${INITDIR} 0755
install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
fi
echo "Installing Shorewall Init Version $VERSION"
@@ -331,7 +311,7 @@ fi
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}${CONFDIR}/logrotate.d
chmod 0755 ${DESTDIR}${CONFDIR}/logrotate.d
chmod 755 ${DESTDIR}${CONFDIR}/logrotate.d
fi
#
@@ -359,14 +339,14 @@ fi
if [ -n "$SERVICEDIR" ]; then
mkdir -p ${DESTDIR}${SERVICEDIR}
[ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
install_file $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service 0644
run_install $OWNERSHIP -m 644 $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
[ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
echo "Service file $SERVICEFILE installed as ${DESTDIR}${SERVICEDIR}/$PRODUCT.service"
if [ -n "$DESTDIR" -o $configure -eq 0 ]; then
mkdir -p ${DESTDIR}${SBINDIR}
chmod 0755 ${DESTDIR}${SBINDIR}
chmod 755 ${DESTDIR}${SBINDIR}
fi
install_file shorewall-init ${DESTDIR}${SBINDIR}/shorewall-init 0700
run_install $OWNERSHIP -m 700 shorewall-init ${DESTDIR}${SBINDIR}/shorewall-init
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SBINDIR}/shorewall-init
echo "CLI installed as ${DESTDIR}${SBINDIR}/shorewall-init"
fi
@@ -375,13 +355,13 @@ fi
# Create /usr/share/shorewall-init if needed
#
mkdir -p ${DESTDIR}${SHAREDIR}/shorewall-init
chmod 0755 ${DESTDIR}${SHAREDIR}/shorewall-init
chmod 755 ${DESTDIR}${SHAREDIR}/shorewall-init
#
# Install logrotate file
#
if [ -d ${DESTDIR}${CONFDIR}/logrotate.d ]; then
install_file logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT 0644
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT
echo "Logrotate file installed as ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT"
fi
@@ -389,7 +369,7 @@ fi
# Create the version file
#
echo "$VERSION" > ${DESTDIR}/${SHAREDIR}/shorewall-init/version
chmod 0644 ${DESTDIR}${SHAREDIR}/shorewall-init/version
chmod 644 ${DESTDIR}${SHAREDIR}/shorewall-init/version
#
# Remove and create the symbolic link to the init script
@@ -432,9 +412,6 @@ else
elif [ $HOST = gentoo ]; then
# Gentoo does not support if-{up,down}.d
/bin/true
elif [ $HOST = openwrt ]; then
# Not implemented on openwrt
/bin/true
else
mkdir -p ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d
fi
@@ -442,8 +419,8 @@ else
fi
if [ -n "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PRODUCT} ]; then
install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/$PRODUCT 0644
echo "${SYSCONFFILE} file installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
run_install $OWNERSHIP -m 0644 ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/$PRODUCT
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
fi
[ $HOST = suse ] && IFUPDOWN=ifupdown.suse.sh || IFUPDOWN=ifupdown.fedora.sh
@@ -453,15 +430,13 @@ fi
# Install the ifupdown script
#
if [ $HOST != openwrt ]; then
cp $IFUPDOWN ifupdown
cp $IFUPDOWN ifupdown
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ifupdown
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ifupdown
mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall-init
mkdir -p ${DESTDIR}${LIBEXECDIR}/shorewall-init
install_file ifupdown ${DESTDIR}${LIBEXECDIR}/shorewall-init/ifupdown 0544
fi
install_file ifupdown ${DESTDIR}${LIBEXECDIR}/shorewall-init/ifupdown 0544
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
[ $configure -eq 1 ] || mkdir -p ${DESTDIR}${CONFDIR}/NetworkManager/dispatcher.d/
@@ -514,7 +489,7 @@ case $HOST in
esac
if [ -z "$DESTDIR" ]; then
if [ $configure -eq 1 -a -n "first_install" ]; then
if [ $configure -eq 1 -a -n "$first_install" ]; then
if [ $HOST = debian ]; then
if [ -n "$SERVICEDIR" ]; then
if systemctl enable ${PRODUCT}.service; then
@@ -536,13 +511,6 @@ if [ -z "$DESTDIR" ]; then
else
cant_autostart
fi
elif [ $HOST = openwrt -a -f ${CONFDIR}/rc.common ]; then
/etc/init.d/$PRODUCT enable
if /etc/init.d/$PRODUCT enabled; then
echo "$Product will start automatically at boot"
else
cant_autostart
fi
elif [ $HOST = gentoo ]; then
# On Gentoo, a service must be enabled manually by the user,
# not by the installer
@@ -571,13 +539,6 @@ if [ -z "$DESTDIR" ]; then
else
cant_autostart
fi
elif [ $HOST = openwrt -a -f ${CONFDIR}/rc.common ]; then
/etc/init.d/shorewall-inir enable
if /etc/init.d/shorewall-init enabled; then
echo "Shorrewall Init will start automatically at boot"
else
cant_autostart
fi
else
cant_autostart
fi

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.6
#
# (c) 2012-2014 - Tom Eastep (teastep@shorewall.net)
#

View File

@@ -5,8 +5,7 @@
#
[Unit]
Description=Shorewall firewall (bootup security)
Before=network-pre.target
Wants=network-pre.target
Before=network.target
[Service]
Type=oneshot

View File

@@ -0,0 +1,20 @@
#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall
#
# Copyright 2011 Jonathan Underwood <jonathan.underwood@gmail.com>
#
[Unit]
Description=Shorewall firewall (bootup security)
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/shorewall-init
StandardOutput=syslog
ExecStart=/sbin/shorewall-init start
ExecStop=/sbin/shorewall-init stop
[Install]
WantedBy=basic.target

View File

@@ -0,0 +1,21 @@
#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall
#
# Copyright 2011 Jonathan Underwood <jonathan.underwood@gmail.com>
# Copyright 2015 Tom Eastep <teastep@shorewall.net>
#
[Unit]
Description=Shorewall firewall (bootup security)
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/default/shorewall-init
StandardOutput=syslog
ExecStart=/sbin/shorewall-init start
ExecStop=/sbin/shorewall-init stop
[Install]
WantedBy=basic.target

View File

@@ -27,8 +27,6 @@
# shown below. Simply run this script to remove Shorewall Firewall
VERSION=xxx #The Build script inserts the actual version
PRODUCT=shorewall-init
Product="Shorewall Init"
usage() # $1 = exit status
{
@@ -77,11 +75,6 @@ remove_file() # $1 = file to restore
fi
}
#
# Change to the directory containing this script
#
cd "$(dirname $0)"
finished=0
configure=1
@@ -169,11 +162,7 @@ INITSCRIPT=${CONFDIR}/init.d/shorewall-init
if [ -f "$INITSCRIPT" ]; then
if [ $configure -eq 1 ]; then
if [ $HOST = openwrt ]; then
if /etc/init.d/shorewall-init enabled; then
/etc/init.d/shorewall-init disable
fi
elif mywhich updaterc.d ; then
if mywhich updaterc.d ; then
updaterc.d shorewall-init remove
elif mywhich insserv ; then
insserv -r $INITSCRIPT
@@ -194,13 +183,8 @@ if [ -n "$SERVICEDIR" ]; then
rm -f $SERVICEDIR/shorewall-init.service
fi
if [ $HOST = openwrt ]; then
[ "$(readlink -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
[ "$(readlink -q ${SBINDIR}/ifdown-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifdown-local
else
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
[ "$(readlink -m -q ${SBINDIR}/ifdown-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifdown-local
fi
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
[ "$(readlink -m -q ${SBINDIR}/ifdown-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifdown-local
remove_file ${CONFDIR}/default/shorewall-init
remove_file ${CONFDIR}/sysconfig/shorewall-init
@@ -214,6 +198,8 @@ remove_file ${CONFDIR}/network/if-post-down.d/shorewall
remove_file ${CONFDIR}/sysconfig/network/if-up.d/shorewall
remove_file ${CONFDIR}/sysconfig/network/if-down.d/shorewall
[ -n "$SYSTEMD" ] && remove_file ${SYSTEMD}/shorewall.service
if [ -d ${CONFDIR}/ppp ]; then
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
remove_file ${CONFDIR}/ppp/$directory/shorewall

View File

@@ -1,5 +1,5 @@
#
# Shorewall Lite version 5 - Default Config Path
# Shorewall Lite version 4.1 - Default Config Path
#
# /usr/share/shorewall-lite/configpath
#

View File

@@ -1,94 +0,0 @@
#!/bin/sh /etc/rc.common
#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5
#
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
# (c) 2015 - Matt Darfeuille - (matdarf@gmail.com)
#
# On most distributions, this file should be called /etc/init.d/shorewall.
#
# Complete documentation is available at http://shorewall.net
#
# This program is part of Shorewall.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 2 of the license or, at your
# option, any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# If an error occurs while starting or restarting the firewall, the
# firewall is automatically stopped.
#
# Commands are:
#
# shorewall-lite start Starts the firewall
# shorewall-lite restart Restarts the firewall
# shorewall-lite reload Reload the firewall
# shorewall-lite stop Stops the firewall
# shorewall-lite status Displays firewall status
#
# description: Packet filtering firewall
# Openwrt related
# Start and stop runlevel variable
START=50
STOP=89
# Displays the status command
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Displays firewall status"
################################################################################
# Get startup options (override default)
################################################################################
OPTIONS=
#
# The installer may alter this
#
. /usr/share/shorewall/shorewallrc
if [ -f ${SYSCONFDIR}/shorewall-lite ]; then
. ${SYSCONFDIR}/shorewall-lite
fi
SHOREWALL_INIT_SCRIPT=1
################################################################################
# E X E C U T I O N B E G I N S H E R E #
################################################################################
# Arg1 of init script is arg2 when rc.common is sourced; set to action variable
command="$action"
start() {
exec ${SBINDIR}/shorewall-lite $OPTIONS $command $STARTOPTIONS
}
boot() {
local command="start"
start
}
restart() {
exec ${SBINDIR}/shorewall-lite $OPTIONS $command $RESTARTOPTIONS
}
reload() {
exec ${SBINDIR}/shorewall-lite $OPTIONS $command $RELOADOPTION
}
stop() {
exec ${SBINDIR}/shorewall-lite $OPTIONS $command $STOPOPTIONS
}
status() {
exec ${SBINDIR}/shorewall-lite $OPTIONS $command $@
}

View File

@@ -329,21 +329,6 @@
<arg choice="plain"><replaceable>address</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>shorewall-lite</command>
<arg
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>reload</option></arg>
<arg><option>-n</option></arg>
<arg><option>-p</option><arg><option>-C</option></arg></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>shorewall-lite</command>
@@ -723,7 +708,6 @@
<para>If <option>-f</option> is given, the command will be processed
by the compiled script that executed the last successful <emphasis
role="bold">start</emphasis>, <emphasis
role="bold">reload</emphasis>, <emphasis
role="bold">restart</emphasis> or <emphasis
role="bold">refresh</emphasis> command if that script exists.</para>
</listitem>
@@ -1042,32 +1026,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">reload </emphasis>[-n] [-p]
[-<option>C</option>]</term>
<listitem>
<para>Added in Shorewall 5.0.0, <emphasis
role="bold">reload</emphasis> is similar to <emphasis
role="bold">shorewall-lite start</emphasis> except that it assumes
that the firewall is already started. Existing connections are
maintained.</para>
<para>The <option>-n</option> option causes Shorewall-lite to avoid
updating the routing table(s).</para>
<para>The <option>-p</option> option causes the connection tracking
table to be flushed; the <command>conntrack</command> utility must
be installed to use this option.</para>
<para>The <option>-C</option> option was added in Shorewall 4.6.5.
If the specified (or implicit) firewall script is the one that
generated the current running configuration, then the running
netfilter configuration will be reloaded as is so as to preserve the
iptables packet and byte counters.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">reset [<replaceable>chain</replaceable>,
...]</emphasis><acronym/></term>
@@ -1085,10 +1043,9 @@
[-<option>C</option>]</term>
<listitem>
<para>Beginning with Shorewall 5.0.0, this command performs a true
restart. The firewall is completely stopped as if a
<command>stop</command> command had been issued then it is started
again.</para>
<para>Restart is similar to <emphasis role="bold">shorewall-lite
start</emphasis> except that it assumes that the firewall is already
started. Existing connections are maintained.</para>
<para>The <option>-n</option> option causes Shorewall-lite to avoid
updating the routing table(s).</para>

View File

@@ -1,5 +1,5 @@
###############################################################################
# /etc/shorewall-lite/shorewall-lite.conf Version 5 - Change the following
# /etc/shorewall-lite/shorewall-lite.conf Version 4 - Change the following
# variables to override the values in the shorewall.conf file used to
# compile /var/lib/shorewall-lite/firewall. Those values may be found in
# /var/lib/shorewall-lite/firewall.conf.

View File

@@ -0,0 +1,21 @@
#
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall
#
# Copyright 2011 Jonathan Underwood <jonathan.underwood@gmail.com>
#
[Unit]
Description=Shorewall IPv4 firewall (lite)
Wants=network-online.target
After=network-online.target
Conflicts=iptables.service firewalld.service
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/shorewall-lite
StandardOutput=syslog
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
ExecStop=/sbin/shorewall-lite $OPTIONS stop
[Install]
WantedBy=basic.target

View File

@@ -17,7 +17,6 @@ EnvironmentFile=-/etc/default/shorewall-lite
StandardOutput=syslog
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
ExecStop=/sbin/shorewall-lite $OPTIONS stop
ExecReload=/sbin/shorewall-lite $OPTIONS reload $RELOADOPTIONS
[Install]
WantedBy=basic.target

View File

@@ -1,26 +0,0 @@
#
# Global start/restart/reload/stop options
#
OPTIONS=""
#
# Start options
#
STARTOPTIONS=""
#
# Restart options
#
RESTARTOPTIONS=""
#
# Reload options
#
RELOADOPTIONS=""
#
# Stop options
#
STOPOPTIONS=""
# EOF

View File

@@ -28,7 +28,6 @@
VERSION=xxx #The Build script inserts the actual version
PRODUCT=shorewall-lite
Product="Shorewall Lite"
usage() # $1 = exit status
{
@@ -206,16 +205,14 @@ fi
rm -f ${SBINDIR}/shorewall-lite
rm -rf ${CONFDIR}/shorewall-lite
rm -rf ${VARDIR}
rm -rf ${VARDIR}/shorewall-lite
rm -rf ${SHAREDIR}/shorewall-lite
rm -rf ${LIBEXECDIR}/shorewall-lite
rm -f ${CONFDIR}/logrotate.d/shorewall-lite
rm -f ${SYSCONFDIR}/shorewall-lite
if [ -n "${MANDIR}" ]; then
rm -f ${MANDIR}/man5/shorewall-lite*
rm -f ${MANDIR}/man8/shorewall-lite*
fi
rm -f ${MANDIR}/man5/shorewall-lite*
rm -f ${MANDIR}/man8/shorewall-lite*
echo "Shorewall Lite Uninstalled"

View File

@@ -1,4 +1,4 @@
Shoreline Firewall (Shorewall) Version 5
Shoreline Firewall (Shorewall) Version 4
----- ----
-----------------------------------------------------------------------------

View File

@@ -1,11 +1,13 @@
#
# Shorewall - AMQP Macro
# Shorewall version 4 - AMQP Macro
#
# /usr/share/shorewall/macro.AMQP
#
# This macro handles AMQP traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 5672

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Audited AllowICMPs Macro
# Shorewall version 4 - Audited AllowICMPs Macro
#
# /usr/share/shorewall/macro.A_AllowICMPs
#
# This macro A_ACCEPTs needed ICMP types
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Audited DropDNSrep Macro
# Shorewall version 4 - Audited DropDNSrep Macro
#
# /usr/share/shorewall/macro.A_DropDNSrep
#
# This macro silently audites and drops DNS UDP replies
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - ADropUPnP Macro
# Shorewall version 4 - ADropUPnP Macro
#
# /usr/share/shorewall/macro.A_DropUPnP
#
# This macro silently drops UPnP probes on UDP port 1900
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Samba 4 Macro
# Shorewall version 4 - Samba 4 Macro
#
# /usr/share/shorewall/macro.ActiveDir
#
@@ -9,6 +9,8 @@
#
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 389 #LDAP services

View File

@@ -1,11 +1,13 @@
#
# Shorewall - AllowICMPs Macro
# Shorewall version 4 - AllowICMPs Macro
#
# /usr/share/shorewall/macro.AllowICMPs
#
# This macro ACCEPTs needed ICMP types
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Amanda Macro
# Shorewall version 4 - Amanda Macro
#
# /usr/share/shorewall/macro.Amanda
#
@@ -8,6 +8,8 @@
# files from those nodes.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Auth Macro
# Shorewall version 4 - Auth Macro
#
# /usr/share/shorewall/macro.Auth
#
# This macro handles Auth (identd) traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 113

View File

@@ -1,11 +1,13 @@
#
# Shorewall - BGP Macro
# Shorewall version 4 - BGP Macro
#
# /usr/share/shorewall/macro.BGP
#
# This macro handles BGP4 traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 179 # BGP4

View File

@@ -1,11 +1,13 @@
#
# Shorewall - blacklist Macro
# Shorewall version 4 - blacklist Macro
#
# /usr/share/shorewall/macro.blacklist
#
# This macro handles blacklisting using BLACKLIST_DISPOSITION and BLACKLIST_LOGLEVEL
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
?if $BLACKLIST_LOGLEVEL

View File

@@ -1,5 +1,5 @@
#
# Shorewall - BitTorrent Macro
# Shorewall version 4 - BitTorrent Macro
#
# /usr/share/shorewall/macro.BitTorrent
#
@@ -9,6 +9,8 @@
# BitTorrent32 macro.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 6881:6889

View File

@@ -1,11 +1,13 @@
#
# Shorewall - BitTorrent 3.2 Macro
# Shorewall version 4 - BitTorrent 3.2 Macro
#
# /usr/share/shorewall/macro.BitTorrent32
#
# This macro handles BitTorrent traffic for BitTorrent 3.2 and later.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 6881:6999

View File

@@ -1,11 +1,13 @@
#
# Shorewall - CVS Macro
# Shorewall version 4 - CVS Macro
#
# /usr/share/shorewall/macro.CVS
#
# This macro handles connections to the CVS pserver.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 2401

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Citrix/ICA Macro
# Shorewall version 4 - Citrix/ICA Macro
#
# /usr/share/shorewall/macro.Citrix
#
@@ -7,6 +7,8 @@
# ICA Session Reliability)
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 1494 # ICA

View File

@@ -1,5 +1,5 @@
#
# Shorewall - DAAP Macro
# Shorewall version 4 - DAAP Macro
#
# /usr/share/shorewall/macro.DAAP
#
@@ -7,6 +7,8 @@
# The protocol is used by iTunes, Rythmbox and other similar daemons.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 3689

View File

@@ -1,5 +1,5 @@
#
# Shorewall - DCC Macro
# Shorewall version 4 - DCC Macro
#
# /usr/share/shorewall/macro.DCC
#
@@ -7,6 +7,8 @@
# DCC is a distributed spam filtering mechanism.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 6277

View File

@@ -1,11 +1,13 @@
#
# Shorewall - DHCPfwd Macro
# Shorewall version 4 - DHCPfwd Macro
#
# /usr/share/shorewall/macro.DHCPfwd
#
# This macro (bidirectional) handles forwarded DHCP traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 67:68 67:68 # DHCP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - DNS Macro
# Shorewall version 4 - DNS Macro
#
# /usr/share/shorewall/macro.DNS
#
# This macro handles DNS traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 53

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Distcc Macro
# Shorewall version 4 - Distcc Macro
#
# /usr/share/shorewall/macro.Distcc
#
# This macro handles connections to the Distributed Compiler service.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 3632

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Drop Macro
# Shorewall version 4 - Drop Macro
#
# /usr/share/shorewall/macro.Drop
#
@@ -11,6 +11,8 @@
# Drop net all
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
#

View File

@@ -1,11 +1,13 @@
#
# Shorewall - DropDNSrep Macro
# Shorewall version 4 - DropDNSrep Macro
#
# /usr/share/shorewall/macro.DropDNSrep
#
# This macro silently drops DNS UDP replies
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - DropUPnP Macro
# Shorewall version 4 - DropUPnP Macro
#
# /usr/share/shorewall/macro.DropUPnP
#
# This macro silently drops UPnP probes on UDP port 1900
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Edonkey Macro
# Shorewall version 4 - Edonkey Macro
#
# /usr/share/shorewall/macro.Edonkey
#
@@ -28,6 +28,8 @@
# applications such as aMule WebServer or aMuleCMD.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 4662

View File

@@ -1,11 +1,13 @@
#
# Shorewall - FTP Macro
# Shorewall version 4 - FTP Macro
#
# /usr/share/shorewall/macro.FTP
#
# This macro handles FTP traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
?if ( __CT_TARGET && ! $AUTOHELPERS && __FTP_HELPER )

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Finger Macro
# Shorewall version 4 - Finger Macro
#
# /usr/share/shorewall/macro.Finger
#
@@ -7,6 +7,8 @@
# your finger information to internet.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 79

View File

@@ -1,11 +1,13 @@
#
# Shorewall - GNUnet Macro
# Shorewall version 4 - GNUnet Macro
#
# /usr/share/shorewall/macro.GNUnet
#
# This macro handles GNUnet (secure peer-to-peer networking) traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 2086

View File

@@ -1,5 +1,5 @@
#
# Shorewall - GRE Macro
# Shorewall version 4 - GRE Macro
#
# /usr/share/shorewall/macro.GRE
#
@@ -7,6 +7,8 @@
# traffic (RFC 1701)
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - 47 # GRE

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Git Macro
# Shorewall version 4 - Git Macro
#
# /usr/share/shorewall/macro.Git
#
# This macro handles Git traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 9418

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Gnutella Macro
# Shorewall version 4 - Gnutella Macro
#
# /usr/share/shorewall/macro.Gnutella
#
# This macro handles Gnutella traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 6346

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Citrix/Goto Meeting macro
# Shorewall version 4 - Citrix/Goto Meeting macro
#
# /usr/share/shorewall/macro.Goto-Meeting
# by Eric Teeter
@@ -7,6 +7,8 @@
# Assumes that ports 80 and 443 are already open
# If needed, use the macros that open Http and Https to reduce redundancy
####################################################################################
?FORMAT 2
####################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 8200 # Goto Meeting only needed (TCP outbound)

View File

@@ -1,11 +1,13 @@
#
# Shorewall - HKP Macro
# Shorewall version 4 - HKP Macro
#
# /usr/share/shorewall/macro.HKP
#
# This macro handles OpenPGP HTTP keyserver protocol traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 11371

View File

@@ -1,11 +1,13 @@
#
# Shorewall - HTTP Macro
# Shorewall version 4 - HTTP Macro
#
# /usr/share/shorewall/macro.HTTP
#
# This macro handles plaintext HTTP (WWW) traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 80

View File

@@ -1,11 +1,13 @@
#
# Shorewall - HTTPS Macro
# Shorewall version 4 - HTTPS Macro
#
# /usr/share/shorewall/macro.HTTPS
#
# This macro handles HTTPS (WWW over SSL) traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 443

View File

@@ -1,11 +1,13 @@
#
# Shorewall - ICPV2 Macro
# Shorewall version 4 - ICPV2 Macro
#
# /usr/share/shorewall/macro.ICPV2
#
# This macro handles Internet Cache Protocol V2 (Squid) traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 3130

View File

@@ -1,11 +1,13 @@
#
# Shorewall - ICQ Macro
# Shorewall version 4 - ICQ Macro
#
# /usr/share/shorewall/macro.ICQ
#
# This macro handles ICQ, now called AOL Instant Messenger (or AIM).
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 5190

View File

@@ -1,5 +1,5 @@
#
# Shorewall - ILO Macro
# Shorewall version 4 - ILO Macro
#
# /usr/share/shorewall/macro.ILO
#
@@ -8,6 +8,8 @@
# workstations.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 3002 # Raw serial data

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IMAP Macro
# Shorewall version 4 - IMAP Macro
#
# /usr/share/shorewall/macro.IMAP
#
@@ -7,6 +7,8 @@
# see macro.IMAPS.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 143

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IMAPS Macro
# Shorewall version 4 - IMAPS Macro
#
# /usr/share/shorewall/macro.IMAPS
#
@@ -7,6 +7,8 @@
# (not recommended), see macro.IMAP.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 993

View File

@@ -1,11 +1,13 @@
#
# Shorewall - IPIP Macro
# Shorewall version 4 - IPIP Macro
#
# /usr/share/shorewall/macro.IPIP
#
# This macro (bidirectional) handles IPIP capsulation traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - 94 # IPIP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IPMI Macro
# Shorewall version 4 - IPMI Macro
#
# /usr/share/shorewall/macro.IPMI
#
@@ -9,6 +9,8 @@
# workstations.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 623 # RMCP

View File

@@ -1,11 +1,13 @@
#
# Shorewall - IPP Macro
# Shorewall version 3.2 - IPP Macro
#
# /usr/share/shorewall/macro.IPP
#
# This macro handles Internet Printing Protocol (IPP).
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 631

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IPP Broadcast Macro
# Shorewall version 4 - IPP Broadcast Macro
#
# /usr/share/shorewall/macro.IPPbrd
#
@@ -8,6 +8,8 @@
# direction, use the IPPserver Macro
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 631

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IPPserver Macro
# Shorewall version 4 - IPPserver Macro
#
# /usr/share/shorewall/macro.IPPserver
#
@@ -23,6 +23,8 @@
# IPPserver/ACCEPT $FW loc
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM SOURCE DEST tcp 631

View File

@@ -1,11 +1,13 @@
#
# Shorewall - IPsec Macro
# Shorewall version 4 - IPsec Macro
#
# /usr/share/shorewall/macro.IPsec
#
# This macro (bidirectional) handles IPsec traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 500 500 # IKE

View File

@@ -1,5 +1,5 @@
#
# Shorewall - IPsecah Macro
# Shorewall version 4 - IPsecah Macro
#
# /usr/share/shorewall/macro.IPsecah
#
@@ -7,6 +7,8 @@
# This is insecure. You should use ESP with encryption for security.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 500 500 # IKE

View File

@@ -1,11 +1,13 @@
#
# Shorewall - IPsecnat Macro
# Shorewall version 4 - IPsecnat Macro
#
# /usr/share/shorewall/macro.IPsecnat
#
# This macro (bidirectional) handles IPsec traffic and Nat-Traversal
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 500 # IKE

View File

@@ -1,11 +1,13 @@
#
# Shorewall IRC Macro
# Shorewall version 4 IRC Macro
#
# /usr/share/shorewall/macro.IRC
#
# This macro handles IRC traffic (Internet Relay Chat).
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - JAP Macro
# Shorewall version 4 - JAP Macro
#
# /usr/share/shorewall/macro.JAP
#
@@ -8,6 +8,8 @@
# to browse anonymously!
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 8080 # HTTP port

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Jabber Macro
# Shorewall version 4 - Jabber Macro
#
# /usr/share/shorewall/macro.Jabber
#
# This macro accepts Jabber traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 5222

View File

@@ -1,5 +1,5 @@
#
# Shorewall - JabberPlain Macro
# Shorewall version 4 - JabberPlain Macro
#
# /usr/share/shorewall/macro.JabberPlain
#
@@ -7,6 +7,8 @@
# deprecated - use of macro.Jabber instead is recommended.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
Jabber

View File

@@ -1,5 +1,5 @@
#
# Shorewall - JabberSecure (SSL) Macro
# Shorewall version 4 - JabberSecure (SSL) Macro
#
# /usr/share/shorewall/macro.JabberSecure
#
@@ -8,6 +8,8 @@
# Jabber macro instead.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 5223

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Jabberd (server intercommunication)
# Shorewall version 3.4 - Jabberd (server intercommunication)
#
# /usr/share/shorewall/macro.Jabberd
#
# This macro accepts Jabberd intercommunication traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 5269

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Jetdirect Macro
# Shorewall version 3.2 - Jetdirect Macro
#
# /usr/share/shorewall/macro.Jetdirect
#
# This macro handles HP Jetdirect printing.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 9100

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Kerberos Macro
# Shorewall version 4 - Kerberos Macro
#
# /usr/share/shorewall/macro.Kerberos
#
# This macro handles Kerberos traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 88

View File

@@ -1,5 +1,5 @@
#
# Shorewall - L2TP Macro
# Shorewall version 4 - L2TP Macro
#
# /usr/share/shorewall/macro.L2TP
#
@@ -7,6 +7,8 @@
# (RFC 2661)
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - udp 1701 # L2TP

View File

@@ -1,5 +1,5 @@
#
# Shorewall - LDAP Macro
# Shorewall version 4 - LDAP Macro
#
# /usr/share/shorewall/macro.LDAP
#
@@ -11,6 +11,8 @@
# Consult your LDAP server documentation for details.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 389

View File

@@ -1,5 +1,5 @@
#
# Shorewall - LDAPS Macro
# Shorewall version 4 - LDAPS Macro
#
# /usr/share/shorewall/macro.LDAPS
#
@@ -11,6 +11,8 @@
# Consult your LDAP server documentation for details.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 636

View File

@@ -1,11 +1,13 @@
#
# Shorewall - MSNP Macro
# Shorewall version 4 - MSNP Macro
#
# /usr/share/shorewall/macro.MSNP
#
# This macro handles MSNP (MicroSoft Notification Protocol)
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 1863

View File

@@ -1,12 +1,13 @@
#
# Shorewall - MSSQL Macro
# Shorewall version 4 - MSSQL Macro
#
# /usr/share/shorewall/macro.MSSQL
#
# This macro handles MSSQL (Microsoft SQL Server)
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 1433
PARAM - - udp 1434

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Mail Macro
# Shorewall version 4 - Mail Macro
#
# /usr/share/shorewall/macro.Mail
#
@@ -12,6 +12,8 @@
# the POP3 or IMAP macros.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 25

View File

@@ -1,11 +1,13 @@
#
# Shorewall - MongoDB Macro
# Shorewall version 4 - MongoDB Macro
#
# /usr/share/shorewall/macro.MongoDB
#
# This macro handles MongoDB Daemon/Router traffic.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 27017

View File

@@ -1,11 +1,13 @@
#
# Shorewall - Munin Macro
# Shorewall version 4 - Munin Macro
#
# /usr/share/shorewall/macro.Munin
#
# This macro handles Munin networked resource monitoring traffic
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 4949

View File

@@ -1,11 +1,13 @@
#
# Shorewall - MySQL Macro
# Shorewall version 4 - MySQL Macro
#
# /usr/share/shorewall/macro.MySQL
#
# This macro handles connections to the MySQL server.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 3306

View File

@@ -1,5 +1,5 @@
#
# Shorewall NNTP Macro
# Shorewall version 4 NNTP Macro
#
# /usr/share/shorewall/macro.NNTP
#
@@ -7,6 +7,8 @@
# encrypted NNTP, see macro.NNTPS.
#
###############################################################################
?FORMAT 2
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 119

Some files were not shown because too many files have changed in this diff Show More