Compare commits

..

24 Commits

Author SHA1 Message Date
Tom Eastep
299d323977 Add warning about the sparse population of /etc/shorewall under Debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-26 08:53:34 -08:00
Tom Eastep
178a7f83bc Install/uninstall fixes from Matt Darfeuille
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-21 12:53:24 -08:00
Tom Eastep
7b54e5e1a6 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2015-11-10 07:50:33 -08:00
Tuomo Soini
d0d34568d1 Shorewall6: reduce number of lines on config headers
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-11-09 23:09:37 +02:00
Tuomo Soini
9460458fd5 Shorewall: reduce number of lines on config headers
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-11-09 23:04:00 +02:00
Tom Eastep
2994808e83 Merge branch 'master' of ssh://server.shorewall.net/home/teastep/shorewall/code 2015-11-09 07:37:08 -08:00
Tom Eastep
7fb00e0dfe Remove the routestopped files and their manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-09 07:28:46 -08:00
Tom Eastep
27c1cd3d6e Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2015-11-09 07:24:52 -08:00
Tuomo Soini
e989fa1d49 configfiles/routestopped: add install path
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-11-09 10:27:07 +02:00
Tuomo Soini
f095e6f31d configfiles: unified configuration file formatting
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-11-09 10:24:20 +02:00
Tuomo Soini
8aefb3a998 Shorewall6: upgrade conntrack to ?VERSION 3
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-11-09 09:44:31 +02:00
Tom Eastep
65a0c62b0d Update the 'Build' and 'Install' files for 5.0
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-08 13:33:25 -08:00
Tom Eastep
8ae6e3ff57 A couple more OpenWRT fixes
- Detect OpenWRT in the configure script
- Fix the Shorewall6-lite uninstaller
2015-11-07 07:20:44 -08:00
Tom Eastep
ec1c9bd991 Delete shorewallrc from Shorewall-core
- Inadvertently added during OpenWRT testing

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-06 14:12:28 -08:00
Tom Eastep
6f560bda38 More OpenWRT tweaks from Matt Darfeuille
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-06 14:01:02 -08:00
Tom Eastep
d2d3748af9 Merge branch 'master' of ssh://server.shorewall.net/home/teastep/shorewall/code 2015-11-05 18:09:29 -08:00
Tom Eastep
e75c88219f Start optional interfaces when there are no providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-05 18:07:31 -08:00
Tom Eastep
7cce2e4ed5 Fix mkdir command in mutex_on()
- Also support 'lock' utility on openWRT

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-05 12:38:54 -08:00
Tom Eastep
3d4cde76aa OpenWRT support in the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-04 13:29:59 -08:00
Tom Eastep
ca0ac0473c Another tweak to syslog_circular_buffer()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-03 18:59:10 -08:00
Tom Eastep
3890a5c1fd Correct syslog_circular_buffer()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-02 14:29:06 -08:00
Tuomo Soini
e74ff0ecd9 more cleanup to config files. 2015-11-02 00:03:38 +02:00
Tuomo Soini
85df53841b Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2015-11-02 00:02:56 +02:00
Tuomo Soini
0c481b4c30 shorewall: use consitent headers on config files
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-31 08:18:50 +02:00
109 changed files with 678 additions and 801 deletions

View File

@@ -143,6 +143,9 @@ if [ -z "$vendor" ]; then
elif [ -f /etc/arch-release ] ; then
params[HOST]=archlinux
rcfile=shorewallrc.archlinux
elif [ -f /etc/openwrt_release ]; then
params[HOST]=openwrt
rcfile=shorewallrc.openwrt
else
params[HOST]=linux
rcfile=shorewallrc.default

View File

@@ -66,15 +66,6 @@ mywhich() {
return 2
}
run_install()
{
if ! install $*; then
echo
echo "ERROR: Failed to install $*" >&2
exit 1
fi
}
cant_autostart()
{
echo
@@ -88,7 +79,20 @@ delete_file() # $1 = file to delete
install_file() # $1 = source $2 = target $3 = mode
{
run_install $T $OWNERSHIP -m $3 $1 ${2}
if cp -f $1 $2; then
if chmod $3 $2; then
if [ -n "$OWNER" ]; then
if chown $OWNER:$GROUP $2; then
return
fi
else
return 0
fi
fi
fi
echo "ERROR: Failed to install $2" >&2
exit 1
}
require()
@@ -133,8 +137,6 @@ while [ $finished -eq 0 ]; do
esac
done
[ -n $(mywhich install) ] || fatal_error "This installer requires the 'install' utility"
#
# Read the RC file
#
@@ -183,10 +185,6 @@ done
[ "${INITFILE}" != 'none/' ] && require INITSOURCE && require INITDIR
T="-T"
INSTALLD='-D'
if [ -z "$BUILD" ]; then
case $(uname) in
cygwin*|CYGWIN*)
@@ -228,6 +226,8 @@ if [ -z "$BUILD" ]; then
BUILD=suse
elif [ -f /etc/arch-release ] ; then
BUILD=archlinux
elif [ -f ${CONFDIR}/openwrt_release ] ; then
BUILD=openwrt
else
BUILD=linux
fi
@@ -254,17 +254,15 @@ case $BUILD in
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel
INSTALLD=
T=
;;
*)
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
if [ $(id -u) -eq 0 ]; then
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
fi
;;
esac
OWNERSHIP="-o $OWNER -g $GROUP"
#
# Determine where to install the firewall script
#
@@ -278,7 +276,7 @@ case "$HOST" in
apple)
echo "Installing Mac-specific configuration...";
;;
debian|gentoo|redhat|slackware|archlinux|linux|suse)
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt)
;;
*)
echo "ERROR: Unknown HOST \"$HOST\"" >&2
@@ -307,7 +305,6 @@ if [ -n "$DESTDIR" ]; then
if [ $BUILD != cygwin ]; then
if [ `id -u` != 0 ] ; then
echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP=""
fi
fi
fi

View File

@@ -143,7 +143,7 @@ timed_read ()
}
#
# Determine if 'syslog -C' is running
# Determine if 'syslogd -C' or logd -S is running
#
syslog_circular_buffer() {
local pid
@@ -154,30 +154,31 @@ syslog_circular_buffer() {
local args
local arg
ps w 2> /dev/null | while read pid tty stat time path args; do
case $path in
syslogd|*/syslogd)
for arg in $args; do
case $arg in
-C*)
return 0
;;
esac
done
;;
logd|*/logd)
for arg in $args; do
case $arg in
-S*)
return 0
;;
esac
done
;;
esac
done
ps w 2> /dev/null | (
while read pid tty stat time path args; do
case $path in
syslogd|*/syslogd)
for arg in $args; do
case $arg in
-C*)
return 0
;;
esac
done
;;
logd|*/logd)
for arg in $args; do
case $arg in
-S*)
return 0
;;
esac
done
;;
esac
done
return 1
return 1 )
}
setup_logread() {

View File

@@ -709,12 +709,15 @@ mutex_on()
local lockf
lockf=${LOCKFILE:=${VARDIR}/lock}
local lockpid
local lockd
MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60}
if [ $MUTEX_TIMEOUT -gt 0 ]; then
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
lockd=$(dirname $LOCKFILE)
[ -d "$lockd" ] || mkdir -p "$lockd"
if [ -f $lockf ]; then
lockpid=`cat ${lockf} 2> /dev/null`
@@ -734,6 +737,11 @@ mutex_on()
chmod u+w ${lockf}
echo $$ > ${lockf}
chmod u-w ${lockf}
elif qt mywhich lock; then
lock -${MUTEX_TIMEOUT} -r1 ${lockf}
chmod u+w ${lockf}
echo $$ > ${lockf}
chmod u-w ${lockf}
else
while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do
sleep 1

View File

@@ -0,0 +1,26 @@
#
# Created by Shorewall Core version 5.0.2-RC1 configure - Fri, Nov 06, 2015 10:02:03 AM
#
# Input: host=openwrt
#
HOST=openwrt
PREFIX=/usr
SHAREDIR=${PREFIX}/share
LIBEXECDIR=${PREFIX}/share
PERLLIBDIR=${PREFIX}/share/shorewall
CONFDIR=/etc
SBINDIR=/sbin
MANDIR=${PREFIX}/man
INITDIR=/etc/init.d
INITSOURCE=init.openwrt.sh
INITFILE=$PRODUCT
AUXINITSOURCE=
AUXINITFILE=
SERVICEDIR=
SERVICEFILE=
SYSCONFFILE=default.openwrt
SYSCONFDIR=${CONFDIR}/sysconfig
SPARSE=
ANNOTATED=
VARLIB=/lib
VARDIR=${VARLIB}/$PRODUCT

View File

@@ -397,6 +397,7 @@ if [ $HOST = debian ]; then
[ $configure -eq 1 ] || mkdir -p ${DESTDIR}${CONFDIR}/default
install_file sysconfig ${DESTDIR}${ETC}/default/shorewall-init 0644
echo "sysconfig file installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
fi
IFUPDOWN=ifupdown.debian.sh
@@ -490,7 +491,12 @@ esac
if [ -z "$DESTDIR" ]; then
if [ $configure -eq 1 -a -n "$first_install" ]; then
if [ $HOST = debian ]; then
if mywhich insserv; then
if [ -n "$SERVICEDIR" ]; then
if systemctl enable ${PRODUCT}.service; then
echo "Shorewall Init will start automatically at
boot"
fi
elif mywhich insserv; then
if insserv ${INITDIR}/shorewall-init; then
echo "Shorewall Init will start automatically at boot"
else
@@ -554,7 +560,7 @@ fi
[ -z "${DESTDIR}" ] && [ ! -f ~/.shorewallrc ] && cp ${SHAREDIR}/shorewall/shorewallrc .
if [ -f ${DESTDIR}/etc/ppp ]; then
if [ -d ${DESTDIR}/etc/ppp ]; then
case $HOST in
debian|suse)
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do

View File

@@ -174,9 +174,13 @@ if [ -f "$INITSCRIPT" ]; then
remove_file $INITSCRIPT
fi
if [ -n "$SYSTEMD" ]; then
if [ -z "${SERVICEDIR}" ]; then
SERVICEDIR="$SYSTEMD"
fi
if [ -n "$SERVICEDIR" ]; then
[ $configure -eq 1 ] && systemctl disable shorewall-init.service
rm -f $SYSTEMD/shorewall-init.service
rm -f $SERVICEDIR/shorewall-init.service
fi
[ "$(readlink -m -q ${SBINDIR}/ifup-local)" = ${SHAREDIR}/shorewall-init ] && remove_file ${SBINDIR}/ifup-local
@@ -202,8 +206,10 @@ if [ -d ${CONFDIR}/ppp ]; then
done
for file in if-up.local if-down.local; do
if grep -qF Shorewall-based ${CONFDIR}/ppp/$FILE; then
remove_file ${CONFDIR}/ppp/$FILE
if [ -f ${CONFDIR}/ppp/$file ]; then
if grep -qF Shorewall-based ${CONFDIR}/ppp/$FILE; then
remove_file ${CONFDIR}/ppp/$FILE
fi
fi
done
fi

View File

@@ -0,0 +1,25 @@
# sysV init file script configuration(/etc/sysconfdir/shorewall-lite)
# startup option(default "-vvv")
OPTIONS=
# change default start run level(if none empty; /etc/init.d/shorewall-lite enable)
START=50
# change default stop run level(if none empty; /etc/init.d/shorewall-lite enable)
STOP=
# option to pass when shorewall start is executed
STARTOPTIONS=
# option to pass when shorewall restart is executed
RESTARTOPTIONS=
# option to pass when shorewall reload is executed
RELOADOPTIONS=
# option to pass when shorewall stop is executed
STOPOPTIONS=
# option to pass when shorewall status is executed
STATUSOPTIONS=

98
Shorewall-lite/init.openwrt.sh Executable file
View File

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

View File

@@ -67,15 +67,6 @@ mywhich() {
return 2
}
run_install()
{
if ! install $*; then
echo
echo "ERROR: Failed to install $*" >&2
exit 1
fi
}
cant_autostart()
{
echo
@@ -89,7 +80,28 @@ delete_file() # $1 = file to delete
install_file() # $1 = source $2 = target $3 = mode
{
run_install $T $OWNERSHIP -m $3 $1 ${2}
if cp -f $1 $2; then
if chmod $3 $2; then
if [ -n "$OWNER" ]; then
if chown $OWNER:$GROUP $2; then
return
fi
else
return 0
fi
fi
fi
echo "ERROR: Failed to install $2" >&2
exit 1
}
make_directory() # $1 = directory , $2 = mode
{
mkdir -p $1
chmod 755 $1
[ -n "$OWNERSHIP" ] && chown $OWNERSHIP $1
}
require()
@@ -151,8 +163,6 @@ while [ $finished -eq 0 ] ; do
esac
done
[ -n $(mywhich install) ] || fatal_error "This installer requires the 'install' utility"
#
# Read the RC file
#
@@ -203,8 +213,6 @@ PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
# Determine where to install the firewall script
#
cygwin=
INSTALLD='-D'
T='-T'
if [ -z "$BUILD" ]; then
case $(uname) in
@@ -247,6 +255,8 @@ if [ -z "$BUILD" ]; then
BUILD=slackware
elif [ -f ${CONFDIR}/arch-release ] ; then
BUILD=archlinux
elif [ -f ${CONFDIR}/openwrt_release ]; then
BUILD=openwrt
else
BUILD=linux
fi
@@ -262,16 +272,16 @@ case $BUILD in
apple)
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=wheel
INSTALLD=
T=
;;
*)
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
if [ $(id -u) -eq 0 ]; then
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
fi
;;
esac
OWNERSHIP="-o $OWNER -g $GROUP"
[ -n "$OWNER" ] && OWNERSHIP="$OWNER:$GROUP"
[ -n "$HOST" ] || HOST=$BUILD
@@ -302,6 +312,9 @@ case "$HOST" in
suse)
echo "Installing Suse-specific configuration..."
;;
openwrt)
echo "Installing OpenWRT-specific configuration..."
;;
linux)
;;
*)
@@ -318,8 +331,9 @@ if [ -n "$DESTDIR" ]; then
OWNERSHIP=""
fi
install -d $OWNERSHIP -m 755 ${DESTDIR}${SBINDIR}
install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
make_directory ${DESTDIR}${SBINDIR} 755
make_directory ${DESTDIR}${INITDIR} 755
else
if [ ! -f ${SHAREDIR}/shorewall/coreversion ]; then
echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2
@@ -359,7 +373,7 @@ fi
delete_file ${DESTDIR}/usr/share/$PRODUCT/xmodules
install_file $PRODUCT ${DESTDIR}${SBINDIR}/$PRODUCT 0544
[ -n "${INITFILE}" ] && install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
[ -n "${INITFILE}" ] && make_directory ${DESTDIR}${INITDIR} 755
echo "$Product control program installed in ${DESTDIR}${SBINDIR}/$PRODUCT"
@@ -401,7 +415,7 @@ fi
if [ -n "$SERVICEDIR" ]; then
mkdir -p ${DESTDIR}${SERVICEDIR}
[ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
run_install $OWNERSHIP -m 644 $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
install_file $SERVICEFILE ${DESTDIR}${SERVICEDIR}/$PRODUCT.service 644
[ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SERVICEDIR}/$PRODUCT.service
echo "Service file $SERVICEFILE installed as ${DESTDIR}${SERVICEDIR}/$PRODUCT.service"
fi
@@ -423,7 +437,7 @@ fi
#
# Install the Makefile
#
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}${CONFDIR}/$PRODUCT
install_file Makefile ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile 0600
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
[ $SBINDIR = /sbin ] || eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
echo "Makefile installed as ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile"
@@ -463,17 +477,17 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
#
if [ -f modules ]; then
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}${SHAREDIR}/$PRODUCT
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
fi
if [ -f helpers ]; then
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}${SHAREDIR}/$PRODUCT
install_file helpers ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers 600
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
fi
for f in modules.*; do
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 644
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
done
@@ -484,17 +498,17 @@ done
if [ -d manpages ]; then
cd manpages
[ -n "$INSTALLD" ] || mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
mkdir -p ${DESTDIR}${MANDIR}/man5/ ${DESTDIR}${MANDIR}/man8/
for f in *.5; do
gzip -c $f > $f.gz
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz
install_file $f.gz ${DESTDIR}${MANDIR}/man5/$f.gz 644
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man5/$f.gz"
done
for f in *.8; do
gzip -c $f > $f.gz
run_install $T $INSTALLD $OWNERSHIP -m 0644 $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz
install_file $f.gz ${DESTDIR}${MANDIR}/man8/$f.gz 644
echo "Man page $f.gz installed to ${DESTDIR}${MANDIR}/man8/$f.gz"
done
@@ -504,7 +518,7 @@ if [ -d manpages ]; then
fi
if [ -d ${DESTDIR}${CONFDIR}/logrotate.d ]; then
run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT
install_file logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT 644
echo "Logrotate file installed as ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT"
fi
@@ -535,7 +549,7 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR
chmod 755 ${DESTDIR}${SYSCONFDIR}
fi
run_install $OWNERSHIP -m 0644 ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT}
install_file ${SYSCONFFILE} ${DESTDIR}${SYSCONFDIR}/${PRODUCT} 0640
echo "$SYSCONFFILE installed in ${DESTDIR}${SYSCONFDIR}/${PRODUCT}"
fi
@@ -589,6 +603,13 @@ if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${
else
cant_autostart
fi
elif [ $HOST = openwrt -a -f ${CONFDIR}/rc.common ]; then
/etc/init.d/$PRODUCT enable
if /etc/init.d/$PRODUCT enabled; then
echo "$PRODUCT will start automatically at boot"
else
cant_autostart
fi
elif [ "$INITFILE" != rc.${PRODUCT} ]; then #Slackware starts this automatically
cant_autostart
fi

View File

@@ -153,7 +153,7 @@ if [ -f ${SHAREDIR}/shorewall-lite/version ]; then
VERSION="$INSTALLED_VERSION"
fi
else
echo "WARNING: Shorewall Lite Version $VERSION is not installed"
echo "WARNING: Shorewal Lite Version $VERSION is not installed"
VERSION=""
fi
@@ -168,7 +168,11 @@ if [ $configure -eq 1 ]; then
fi
if [ -L ${SHAREDIR}/shorewall-lite/init ]; then
if [ $HOST = "linux" ] && [ -f /etc/openwrt_release -o -f /etc/openwrt_version ]; then
if [ $HOST = openwrt ]; then
if [ $configure -eq 1 ] && /etc/init.d/shorewall-lite enabled; then
/etc/init.d/shorewall-lite disable
fi
FIREWALL=$(readlink ${SHAREDIR}/shorewall-lite/init)
else
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)

View File

@@ -1768,6 +1768,7 @@ sub map_provider_to_interface() {
sub setup_providers() {
our $providers;
our $pseudoproviders;
if ( $providers ) {
if ( $maxload ) {
@@ -1802,6 +1803,11 @@ sub setup_providers() {
push_indent;
if ( $pseudoproviders ) {
emit '';
emit "start_$providers{$_}->{what}_$_" for @providers;
}
emit "\nundo_routing";
emit "restore_default_route $config{USE_DEFAULT_RT}";

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Accounting File
# Shorewall -- /etc/shorewall/accounting
#
# For information about entries in this file, type "man shorewall-accounting"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - Actions File
#
# /etc/shorewall/actions
# Shorewall -- /etc/shorewall/actions
#
# For information about entries in this file, type "man shorewall-actions"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - arprules File
# Shorewall -- /etc/shorewall/arprules
#
# For information about entries in this file, type "man shorewall-arprules"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Blrules File
# Shorewall -- /etc/shorewall/blrules
#
# For information about entries in this file, type "man shorewall-blrules"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - clear File
#
# /etc/shorewall/clear
# Shorewall -- /etc/shorewall/clear
#
# Add commands below that you want to be executed after Shorewall has
# processed the 'clear' command.

View File

@@ -1,10 +1,11 @@
#
# Shorewall - conntrack File
# Shorewall -- /etc/shorewall/conntrack
#
# For information about entries in this file, type "man shorewall-conntrack"
#
##############################################################################################################
?FORMAT 3
##############################################################################################################
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/ SWITCH
# PORT(S) PORT(S) GROUP
?if $AUTOHELPERS && __CT_TARGET

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Ecn File
# Shorewall -- /etc/shorewall/ecn
#
# For information about entries in this file, type "man shorewall-ecn"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - Findgw File
#
# /etc/shorewall/findgw
# Shorewall -- /etc/shorewall/findgw
#
# The code in this file is executed when Shorewall is trying to detect the
# gateway through an interface in /etc/shorewall/providers that has GATEWAY

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Hosts file
# Shorewall -- /etc/shorewall/hosts
#
# For information about entries in this file, type "man shorewall-hosts"
#

View File

@@ -1,10 +1,8 @@
#
# Shorewall - Init File
# Shorewall -- /etc/shorewall/init
#
# /etc/shorewall/init
#
# Add commands below that you want to be executed at the beginning of
# a "shorewall start", "shorewall-reload" or "shorewall restart" command.
# Add commands below that you want to be executed at the beginning of
# a "shorewall start", "shorewall-reload" or "shorewall restart" command.
#
# For additional information, see
# http://shorewall.net/shorewall_extension_scripts.htm

View File

@@ -1,12 +1,10 @@
#
# Shorewall - Initdone File
# Shorewall -- /etc/shorewall/initdone
#
# /etc/shorewall/initdone
#
# Add commands below that you want to be executed during
# "shorewall start", "shorewall reload" or "shorewall restart" commands
# at the point where Shorewall has not yet added any permanent rules to
# the builtin chains.
# Add commands below that you want to be executed during
# "shorewall start", "shorewall reload" or "shorewall restart" commands
# at the point where Shorewall has not yet added any permanent rules to
# the builtin chains.
#
# For additional information, see
# http://shorewall.net/shorewall_extension_scripts.htm

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Interfaces File
# Shorewall -- /etc/shorewall/interfaces
#
# For information about entries in this file, type "man shorewall-interfaces"
#

View File

@@ -1,15 +1,13 @@
#
# Shorewall - isusable File
# Shorewall -- /etc/shorewall/isusable
#
# /etc/shorewall/isusable
# This script is called when Shorewall is attempting to determine
# if an interface named in /etc/shorewall/providers is usable.
#
# This script is called when Shorewall is attempting to determine
# if an interface named in /etc/shorewall/providers is usable.
#
# The script is invoked inside a function that accepts an interface
# name as a single argument. The file below is designed to work with
# both swping and lsm as described at
# http://www.shorewall.net/MultiISP.html
# The script is invoked inside a function that accepts an interface
# name as a single argument. The file below is designed to work with
# both swping and lsm as described at
# http://www.shorewall.net/MultiISP.html
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,7 +1,5 @@
#
# Shorewall - lib.private File
#
# /etc/shorewall/lib.private
# Shorewall -- /etc/shorewall/lib.private
#
# Use this file to declare shell functions to be called in the other
# run-time extension scripts. The file will be copied into the generated

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Maclist file
# Shorewall -- /etc/shorewall/maclist
#
# For information about entries in this file, type "man shorewall-maclist"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Mangle File
# Shorewall -- /etc/shorewall/mangle
#
# For information about entries in this file, type "man shorewall-mangle"
#
@@ -9,6 +9,7 @@
#
# See http://shorewall.net/PacketMarking.html for a detailed description of
# the Netfilter/Shorewall packet marking mechanism.
#
####################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE USER TEST LENGTH TOS CONNBYTES HELPER PROBABILITY DSCP
# PORT(S) PORT(S)

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Masq file
# Shorewall -- /etc/shorewall/masq
#
# For information about entries in this file, type "man shorewall-masq"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Nat File
# Shorewall -- /etc/shorewall/nat
#
# For information about entries in this file, type "man shorewall-nat"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Netmap File
# Shorewall -- /etc/shorewall/netmap
#
# For information about entries in this file, type "man shorewall-netmap"
#

View File

@@ -1,27 +1,25 @@
#
# Shorewall - Params File
# Shorewall -- /etc/shorewall/params
#
# /etc/shorewall/params
# Assign any variables that you need here.
#
# Assign any variables that you need here.
# It is suggested that variable names begin with an upper case letter
# to distinguish them from variables used internally within the
# Shorewall programs
#
# It is suggested that variable names begin with an upper case letter
# to distinguish them from variables used internally within the
# Shorewall programs
# Example:
#
# Example:
# NET_IF=eth0
# NET_BCAST=130.252.100.255
# NET_OPTIONS=routefilter,norfc1918
#
# NET_IF=eth0
# NET_BCAST=130.252.100.255
# NET_OPTIONS=routefilter,norfc1918
# Example (/etc/shorewall/interfaces record):
#
# Example (/etc/shorewall/interfaces record):
# net $NET_IF $NET_BCAST $NET_OPTIONS
#
# net $NET_IF $NET_BCAST $NET_OPTIONS
# The result will be the same as if the record had been written
#
# The result will be the same as if the record had been written
#
# net eth0 130.252.100.255 routefilter,norfc1918
# net eth0 130.252.100.255 routefilter,norfc1918
#
###############################################################################

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Policy File
# Shorewall -- /etc/shorewall/policy
#
# For information about entries in this file, type "man shorewall-policy"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Providers File
# Shorewall -- /etc/shorewall/providers
#
# For information about entries in this file, type "man shorewall-providers"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Proxyarp File
# Shorewall -- /etc/shorewall/proxyarp
#
# For information about entries in this file, type "man shorewall-proxyarp"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - refresh File
#
# /etc/shorewall/refresh
# Shorewall -- /etc/shorewall/refresh
#
# Add commands below that you want to be executed before Shorewall
# has processed the 'refresh' command.

View File

@@ -1,7 +1,5 @@
#
# Shorewall - refreshed File
#
# /etc/shorewall/refreshed
# Shorewall -- /etc/shorewall/refreshed
#
# Add commands below that you want to be executed after Shorewall has
# processed the 'refresh' command.

View File

@@ -1,10 +1,8 @@
#
# Shorewall - Restored File
# Shorewall -- /etc/shorewall/restored
#
# /etc/shorewall/restored
#
# Add commands below that you want to be executed after shorewall has
# completed a 'restore' command.
# Add commands below that you want to be executed after shorewall has
# completed a 'restore' command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,8 +1,9 @@
#
# Shorewall - routes File
# Shorewall -- /etc/shorewall/routes
#
# For information about entries in this file, type "man shorewall-routes"
#
# For additional information, see http://www.shorewall.net/MultiISP.html
#
###############################################################################
#PROVIDER DEST GATEWAY DEVICE OPTIONS

View File

@@ -1,16 +0,0 @@
#
# Shorewall - Routestopped File
#
# This file is deprecated in favor of the stoppedrules file
#
# For information about entries in this file, type "man shorewall-routestopped"
#
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall-routestopped.html
#
# See http://shorewall.net/starting_and_stopping_shorewall.htm for additional
# information.
#
###############################################################################
#INTERFACE HOST(S) OPTIONS PROTO DEST SOURCE
# PORT(S) PORT(S)

View File

@@ -1,8 +1,9 @@
#
# Shorewall - route rules File
# Shorewall -- /etc/shorewall/rtrules
#
# For information about entries in this file, type "man shorewall-rtrules"
#
# For additional information, see http://www.shorewall.net/MultiISP.html
#
####################################################################################
#SOURCE DEST PROVIDER PRIORITY MASK

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Rules File
# Shorewall -- /etc/shorewall/rules
#
# For information on the settings in this file, type "man shorewall-rules"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - Show Connections Filter
#
# /etc/shorewall/scfilter
# Shorewall -- /etc/shorewall/scfilter
#
# Replace the 'cat' command below to filter the output of
# 'show connections'.

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Secmarks File
# Shorewall -- /etc/shorewall/secmarks
#
# For information about entries in this file, type "man shorewall-secmarks"
#

View File

@@ -1,10 +1,8 @@
#
# Shorewall - Start File
# Shorewall -- /etc/shorewall/start
#
# /etc/shorewall/start
#
# Add commands below that you want to be executed after shorewall has
# been started, reloaded or restarted.
# Add commands below that you want to be executed after shorewall has
# been started, reloaded or restarted.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,17 +1,15 @@
#
# Shorewall - Started File
# Shorewall -- /etc/shorewall/started
#
# /etc/shorewall/started
# Add commands below that you want to be executed after shorewall has
# been completely started, reloaded or restarted. The difference between
# this extension script and /etc/shorewall/start is that this one is
# invoked after the 'shorewall' chain has been created (thus
# signaling that the firewall is completely up).
#
# Add commands below that you want to be executed after shorewall has
# been completely started, reloaded or restarted. The difference between
# this extension script and /etc/shorewall/start is that this one is
# invoked after the 'shorewall' chain has been created (thus
# signaling that the firewall is completely up).
#
# This script should not change the firewall configuration directly but
# may do so indirectly by running /sbin/shorewall with the 'nolock'
# option.
# This script should not change the firewall configuration directly but
# may do so indirectly by running /sbin/shorewall with the 'nolock'
# option.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,10 +1,8 @@
#
# Shorewall - Stop File
# Shorewall -- /etc/shorewall/stop
#
# /etc/shorewall/stop
#
# Add commands below that you want to be executed at the beginning of a
# "shorewall stop" command.
# Add commands below that you want to be executed at the beginning of a
# "shorewall stop" command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,10 +1,8 @@
#
# Shorewall - Stopped File
# Shorewall -- /etc/shorewall/stopped
#
# /etc/shorewall/stopped
#
# Add commands below that you want to be executed at the completion of a
# "shorewall stop" command.
# Add commands below that you want to be executed at the completion of a
# "shorewall stop" command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Stoppedrules File
# Shorewall -- /etc/shorewall/stoppedrules
#
# For information about entries in this file, type "man shorewall-stoppedrules"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tcclasses File
# Shorewall -- /etc/shorewall/tcclasses
#
# For information about entries in this file, type "man shorewall-tcclasses"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - tcclear File
#
# /etc/shorewall/tcclear
# Shorewall -- /etc/shorewall/tcclear
#
# Add commands below that you want to be executed before Shorewall clears
# the traffic shaping configuration.

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tcdevices File
# Shorewall -- /etc/shorewall/tcdevices
#
# For information about entries in this file, type "man shorewall-tcdevices"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tcfilters File
# Shorewall -- /etc/shorewall/tcfilters
#
# For information about entries in this file, type "man shorewall-tcfilters"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tcinterfaces File
# Shorewall -- /etc/shorewall/tcinterfaces
#
# For information about entries in this file, type "man shorewall-tcinterfaces"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tcpri File
# Shorewall -- /etc/shorewall/tcpri
#
# For information about entries in this file, type "man shorewall-tcpri"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Tunnels File
# Shorewall -- /etc/shorewall/tunnels
#
# For information about entries in this file, type "man shorewall-tunnels"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Zones File
# Shorewall -- /etc/shorewall/zones
#
# For information about this file, type "man shorewall-zones"
#

View File

@@ -1,237 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry>
<refmeta>
<refentrytitle>shorewall-routestopped</refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo>Configuration Files</refmiscinfo>
</refmeta>
<refnamediv>
<refname>routestopped</refname>
<refpurpose>The Shorewall file that governs what traffic flows through the
firewall while it is in the 'stopped' state.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>/etc/shorewall/routestopped</command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>This file is deprecated in favor of the <ulink
url="/manpages/shorewall-stoppedrules.html">shorewall-stoppedrules</ulink>(5)
file.</para>
<para>This file is used to define the hosts that are accessible when the
firewall is stopped or is being stopped.</para>
<warning>
<para>Changes to this file do not take effect until after the next
<command>shorewall start</command> or <command>shorewall
restart</command> command.</para>
</warning>
<para>The columns in the file are as follows (where the column name is
followed by a different name in parentheses, the different name is used in
the alternate specification syntax).</para>
<variablelist>
<varlistentry>
<term><emphasis role="bold">INTERFACE</emphasis> -
<emphasis>interface</emphasis></term>
<listitem>
<para>Interface through which host(s) communicate with the
firewall</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">HOST(S)</emphasis> (hosts) - [<emphasis
role="bold">-</emphasis>|<emphasis>address</emphasis>[,<emphasis>address</emphasis>]...]</term>
<listitem>
<para>Optional. Comma-separated list of IP/subnet addresses. If your
kernel and iptables include iprange match support, IP address ranges
are also allowed.</para>
<para>If left empty or supplied as "-", 0.0.0.0/0 is assumed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">OPTIONS</emphasis> - [<emphasis
role="bold">-</emphasis>|<emphasis>option</emphasis>[<emphasis
role="bold">,</emphasis><emphasis>option</emphasis>]...]</term>
<listitem>
<para>Optional. A comma-separated list of options. The order of the
options is not important but the list can contain no embedded
white-space. The currently-supported options are:</para>
<variablelist>
<varlistentry>
<term><emphasis role="bold">routeback</emphasis></term>
<listitem>
<para>Set up a rule to ACCEPT traffic from these hosts back to
themselves. Beginning with Shorewall 4.4.9, this option is
automatically set if <emphasis
role="bold">routeback</emphasis> is specified in <ulink
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>
(5) or if the rules compiler detects that the interface is a
bridge.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">source</emphasis></term>
<listitem>
<para>Allow traffic from these hosts to ANY destination.
Without this option or the <emphasis
role="bold">dest</emphasis> option, only traffic from this
host to other listed hosts (and the firewall) is allowed. If
<emphasis role="bold">source</emphasis> is specified then
<emphasis role="bold">routeback</emphasis> is
redundant.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">dest</emphasis></term>
<listitem>
<para>Allow traffic to these hosts from ANY source. Without
this option or the <emphasis role="bold">source</emphasis>
option, only traffic from this host to other listed hosts (and
the firewall) is allowed. If <emphasis
role="bold">dest</emphasis> is specified then <emphasis
role="bold">routeback</emphasis> is redundant.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">notrack</emphasis></term>
<listitem>
<para>The traffic will be exempted from connection
tracking.</para>
</listitem>
</varlistentry>
</variablelist>
<note>
<para>The <emphasis role="bold">source</emphasis> and <emphasis
role="bold">dest</emphasis> options work best when used in
conjunction with ADMINISABSENTMINDED=Yes in <ulink
url="shorewall6.conf.html">shorewall6.conf</ulink>(5).</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>PROTO (Optional)
<replaceable>protocol-name-or-number</replaceable></term>
<listitem>
<para>Protocol.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DEST PORT(S) (dport)
<replaceable>service-name/port-number-list</replaceable></term>
<listitem>
<para>Optional. A comma-separated list of port numbers and/or
service names from <filename>/etc/services</filename>. May also
include port ranges of the form
<replaceable>low-port</replaceable>:<replaceable>high-port</replaceable>
if your kernel and iptables include port range support.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SOURCE PORT(S) (sport)
<replaceable>service-name/port-number-list</replaceable></term>
<listitem>
<para>Optional. A comma-separated list of port numbers and/or
service names from <filename>/etc/services</filename>. May also
include port ranges of the form
<replaceable>low-port</replaceable>:<replaceable>high-port</replaceable>
if your kernel and iptables include port range support.</para>
<para>Beginning with Shorewall 4.5.15, you may place '=' in this
column, provided that the DEST PORT(S) column is non-empty. This
causes the rule to match when either the source port or the
destination port in a packet matches one of the ports specified in
DEST PORTS(S). Use of '=' requires multi-port match in your iptables
and kernel.</para>
</listitem>
</varlistentry>
</variablelist>
<note>
<para>The <emphasis role="bold">source</emphasis> and <emphasis
role="bold">dest</emphasis> options work best when used in conjunction
with ADMINISABSENTMINDED=Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5).</para>
</note>
</refsect1>
<refsect1>
<title>Example</title>
<variablelist>
<varlistentry>
<term>Example 1:</term>
<listitem>
<programlisting> #INTERFACE HOST(S) OPTIONS PROTO DEST SOURCE
# PORT(S) PORT(S)
eth2 192.168.1.0/24
eth0 192.0.2.44
br0 - routeback
eth3 - source
eth4 - notrack 41</programlisting>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>FILES</title>
<para>/etc/shorewall/routestopped</para>
</refsect1>
<refsect1>
<title>See ALSO</title>
<para><ulink
url="/starting_and_stopping_shorewall.htm">http://www.shorewall.net/starting_and_stopping_shorewall.htm</ulink></para>
<para><ulink
url="/configuration_file_basics.htm#Pairs">http://www.shorewall.net/configuration_file_basics.htm#Pairs</ulink></para>
<para>shorewall(8), shorewall-accounting(5), shorewall-actions(5),
shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5),
shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5),
shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5),
shorewall-rtrules(5), shorewall-rules(5), shorewall.conf(5),
shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5),
shorewall-mangle(5), shorewall-tos(5), shorewall-tunnels(5),
shorewall-zones(5)</para>
</refsect1>
</refentry>

View File

@@ -168,8 +168,8 @@ fi
rm -f ${SBINDIR}/shorewall
if [ -L ${SHAREDIR}/shorewall6/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6/init)
if [ -L ${SHAREDIR}/shorewall/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall/init)
elif [ -n "$INITFILE" ]; then
FIREWALL=${INITDIR}/${INITFILE}
fi
@@ -188,17 +188,19 @@ if [ -f "$FIREWALL" ]; then
remove_file $FIREWALL
fi
if [ -n "$SYSTEMD" ]; then
if [ -z "${SERVICEDIR}" ]; then
SERVICEDIR="$SYSTEMD"
fi
if [ -n "$SERVICEDIR" ]; then
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
rm -f $SYSTEMD/shorewall.service
rm -f $SERVICEDIR/shorewall.service
fi
rm -rf ${SHAREDIR}/shorewall/version
rm -rf ${CONFDIR}/shorewall
if [ -n "$SYSCONFDIR" ]; then
[ -n "$SYSCONFFILE" ] || SYSCONFFILE=${PRODUCT};
rm -f ${SYSCONFDIR}/${SYSCONFFILE}
[ -n "$SYSCONFFILE" ] && rm -f ${SYSCONFDIR}/${PRODUCT}
fi
rm -rf ${VARDIR}/shorewall

View File

@@ -0,0 +1,25 @@
# sysV init file script configuration(/etc/sysconfdir/shorewall-lite)
# startup option(default "-vvv")
OPTIONS=
# change default start run level(if none empty; /etc/init.d/shorewall-lite enable)
START=50
# change default stop run level(if none empty; /etc/init.d/shorewall-lite enable)
STOP=
# option to pass when shorewall start is executed
STARTOPTIONS=
# option to pass when shorewall restart is executed
RESTARTOPTIONS=
# option to pass when shorewall reload is executed
RELOADOPTIONS=
# option to pass when shorewall stop is executed
STOPOPTIONS=
# option to pass when shorewall status is executed
STATUSOPTIONS=

98
Shorewall6-lite/init.openwrt.sh Executable file
View File

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

View File

@@ -144,16 +144,16 @@ fi
if [ -f ${SHAREDIR}/shorewall6-lite/version ]; then
INSTALLED_VERSION="$(cat ${SHAREDIR}/shorewall6-lite/version)"
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed"
echo "WARNING: Shorewall6 Lite Version $INSTALLED_VERSION is installed"
echo " and this is the $VERSION uninstaller."
VERSION="$INSTALLED_VERSION"
fi
else
echo "WARNING: Shorewall Lite Version $VERSION is not installed"
echo "WARNING: Shorewall6 Lite Version $VERSION is not installed"
VERSION=""
fi
echo "Uninstalling Shorewall Lite $VERSION"
echo "Uninstalling Shorewall6 Lite $VERSION"
[ -n "$SANDBOX" ] && configure=0
@@ -164,7 +164,15 @@ if [ $configure -eq 1 ]; then
fi
if [ -f ${SHAREDIR}/shorewall6-lite/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init)
if [ $HOST = openwrt ]; then
if [ $configure -eq 1 ] && /etc/init.d/shorewall6-lite enabled; then
/etc/init.d/shorewall6-lite disable
fi
FIREWALL=$(readlink ${SHAREDIR}/shorewall6-lite/init)
else
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init)
fi
elif [ -n "$INITFILE" ]; then
FIREWALL=${INITDIR}/${INITFILE}
fi

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Accounting File
# Shorewall6 -- /etc/shorewall6/accounting
#
# For information about entries in this file, type "man shorewall6-accounting"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - Actions File
#
# /etc/shorewall6/actions
# Shorewall6 -- /etc/shorewall6/actions
#
# For information about entries in this file, type "man shorewall6-actions"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Blrules File
# Shorewall6 -- /etc/shorewall6/blrules
#
# For information about entries in this file, type "man shorewall6-blrules"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - clear File
#
# /etc/shorewall6/clear
# Shorewall6 -- /etc/shorewall6/clear
#
# Add commands below that you want to be executed after Shorewall6 has
# processed the 'clear' command.

View File

@@ -1,53 +1,54 @@
#
# Shorewall6 - conntrack File
# Shorewall6 -- /etc/shorewall6/conntrack
#
# For information about entries in this file, type "man shorewall6-conntrack"
#
##############################################################################################################
?FORMAT 2
?FORMAT 3
##############################################################################################################
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/ SWITCH
# PORT(S) PORT(S) GROUP
?if __CT_TARGET
?if $AUTOHELPERS && __CT_TARGET
?if __AMANDA_HELPER
CT:helper:amanda all - udp 10080
CT:helper:amanda:PO - - udp 10080
?endif
?if __FTP_HELPER
CT:helper:ftp all - tcp 21
CT:helper:ftp:PO - - tcp 21
?endif
?if __H323_HELPER
CT:helper:RAS all - udp 1719
CT:helper:Q.931 all - tcp 1720
CT:helper:RAS:PO - - udp 1719
CT:helper:Q.931:PO - - tcp 1720
?endif
?if __IRC_HELPER
CT:helper:irc all - tcp 6667
CT:helper:irc:PO - - tcp 6667
?endif
?if __NETBIOS_NS_HELPER
CT:helper:netbios-ns all - udp 137
CT:helper:netbios-ns:PO - - udp 137
?endif
?if __PPTP_HELPER
CT:helper:pptp all - tcp 1723
CT:helper:pptp:PO - - tcp 1723
?endif
?if __SANE_HELPER
CT:helper:sane all - tcp 6566
CT:helper:sane:PO - - tcp 6566
?endif
?if __SIP_HELPER
CT:helper:sip all - udp 5060
CT:helper:sip:PO - - udp 5060
?endif
?if __SNMP_HELPER
CT:helper:snmp all - udp 161
CT:helper:snmp:PO - - udp 161
?endif
?if __TFTP_HELPER
CT:helper:tftp all - udp 69
CT:helper:tftp:PO - - udp 69
?endif
?endif

View File

@@ -1,7 +1,5 @@
#
# Shorewall - Findgw File
#
# /etc/shorewall6/findgw
# Shorewall6 -- /etc/shorewall6/findgw
#
# The code in this file is executed when Shorewall is trying to detect the
# gateway through an interface in /etc/shorewall6/providers that has GATEWAY

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Hosts file
# Shorewall6 -- /etc/shorewall6/hosts
#
# For information about entries in this file, type "man shorewall6-hosts"
#

View File

@@ -1,10 +1,8 @@
#
# Shorewall6 - Init File
# Shorewall6 -- /etc/shorewall6/init
#
# /etc/shorewall6/init
#
# Add commands below that you want to be executed at the beginning of
# a "shorewall6 start" or "shorewall6 restart" command.
# Add commands below that you want to be executed at the beginning of
# a "shorewall6 start" or "shorewall6 restart" command.
#
# For additional information, see
# http://shorewall.net/shorewall_extension_scripts.htm

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Interfaces File
# Shorewall6 -- /etc/shorewall6/interfaces
#
# For information about entries in this file, type "man shorewall6-interfaces"
#

View File

@@ -1,15 +1,13 @@
#
# Shorewall6 - isusable File
# Shorewall6 -- /etc/shorewall6/isusable
#
# /etc/shorewall6/isusable
# This script is called when Shorewall6 is attempting to determine
# if an interface named in /etc/shorewall6/providers is usable.
#
# This script is called when Shorewall6 is attempting to determine
# if an interface named in /etc/shorewall6/providers is usable.
#
# The script is invoked inside a function that accepts an interface
# name as a single argument. The file below is designed to work with
# both swping and lsm as described at
# http://www.shorewall.net/MultiISP.html
# The script is invoked inside a function that accepts an interface
# name as a single argument. The file below is designed to work with
# both swping and lsm as described at
# http://www.shorewall.net/MultiISP.html
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - lib.private File
#
# /etc/shorewall6/lib.private
# Shorewall6 -- /etc/shorewall6/lib.private
#
# Use this file to declare shell functions to be called in the other
# run-time extension scripts. The file will be copied into the generated

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Maclist file
# Shorewall6 -- /etc/shorewall6/maclist
#
# For information about entries in this file, type "man shorewall6-maclist"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Mangle File
# Shorewall6 -- /etc/shorewall6/mangle
#
# For information about entries in this file, type "man shorewall6-mangle"
#
@@ -9,6 +9,7 @@
#
# See http://shorewall.net/PacketMarking.html for a detailed description of
# the Netfilter/Shorewall packet marking mechanism.
#
############################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE USER TEST LENGTH TOS CONNBYTES HELPER HEADERS PROBABILITY DSCP
# PORT(S) PORT(S)

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - MASQUERADE/SNAT file
# Shorewall6 -- /etc/shorewall6/masq
#
# For information about entries in this file, type "man shorewall6-masq"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Nat File
# Shorewall6 -- /etc/shorewall6/nat
#
# For information about entries in this file, type "man shorewall6-nat"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Netmap File
# Shorewall6 -- /etc/shorewall6/netmap
#
# For information about entries in this file, type "man shorewall-netmap"
#

View File

@@ -1,26 +1,24 @@
#
# Shorewall6 - Params File
# Shorewall6 -- /etc/shorewall6/params
#
# /etc/shorewall6/params
# Assign any variables that you need here.
#
# Assign any variables that you need here.
# It is suggested that variable names begin with an upper case letter
# to distinguish them from variables used internally within the
# Shorewall6 programs
#
# It is suggested that variable names begin with an upper case letter
# to distinguish them from variables used internally within the
# Shorewall6 programs
# Example:
#
# Example:
# NET_IF=eth0
# NET_OPTIONS=dhcp,nosmurfs
#
# NET_IF=eth0
# NET_OPTIONS=dhcp,nosmurfs
# Example (/etc/shorewall6/interfaces record):
#
# Example (/etc/shorewall6/interfaces record):
# net $NET_IF - $NET_OPTIONS
#
# net $NET_IF - $NET_OPTIONS
# The result will be the same as if the record had been written
#
# The result will be the same as if the record had been written
#
# net eth0 - dhcp,nosmurfs
# net eth0 - dhcp,nosmurfs
#
###############################################################################

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Policy File
# Shorewall6 -- /etc/shorewall6/policy
#
# For information about entries in this file, type "man shorewall6-policy"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Providers File
# Shorewall6 -- /etc/shorewall6/providers
#
# For information about entries in this file, type "man shorewall6-providers"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall - Proxyndp File
# Shorewall6 -- /etc/shorewall6/proxyndp
#
# For information about entries in this file, type "man shorewall6-proxyndp"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - refresh File
#
# /etc/shorewall6/refresh
# Shorewall6 -- /etc/shorewall6/refresh
#
# Add commands below that you want to be executed before Shorewall6 has
# processed the 'refresh' command.

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - refreshed File
#
# /etc/shorewall6/refreshed
# Shorewall6 -- /etc/shorewall6/refreshed
#
# Add commands below that you want to be executed after Shorewall6 has
# processed the 'refresh' command.

View File

@@ -1,10 +1,8 @@
#
# Shorewall6 - Restored File
# Shorewall6 -- /etc/shorewall6/restored
#
# /etc/shorewall6/restored
#
# Add commands below that you want to be executed after shorewall6 has
# completed a 'restore' command.
# Add commands below that you want to be executed after shorewall6 has
# completed a 'restore' command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,8 +1,9 @@
#
# Shorewall6 - routes File
# Shorewall6 -- /etc/shorewall6/routes
#
# For information about entries in this file, type "man shorewall6-routes"
#
# For additional information, see http://www.shorewall.net/MultiISP.html
#
###############################################################################
#PROVIDER DEST GATEWAY DEVICE OPTIONS

View File

@@ -1,15 +0,0 @@
#
# Shorewall6 - Routestopped File
#
# This file is deprecated in favor of the stoppedrules file.
#
# For information about entries in this file, type "man shorewall6-routestopped"
#
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall6-routestopped.html
#
# See http://shorewall.net/starting_and_stopping_shorewall.htm for additional
# information.
#
###############################################################################
#INTERFACE HOST(S) OPTIONS

View File

@@ -1,8 +1,9 @@
#
# Shorewall6 - route rules File
# Shorewall6 -- /etc/shorewall6/rtrules
#
# For information about entries in this file, type "man shorewall6-rtrules"
#
# For additional information, see http://www.shorewall.net/MultiISP.html
#
####################################################################################
#SOURCE DEST PROVIDER PRIORITY MASK

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Rules File
# Shorewall6 -- /etc/shorewall6/rules
#
# For information on the settings in this file, type "man shorewall6-rules"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall - Show Connections Filter
#
# /etc/shorewall/scfilter
# Shorewall6 -- /etc/shorewall6/scfilter
#
# Replace the 'cat' command below to filter the output of
# 'show connections'.

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Secmarks File
# Shorewall6 -- /etc/shorewall6/secmarks
#
# For information about entries in this file, type "man shorewall-secmarks"
#

View File

@@ -1,10 +1,8 @@
#
# Shorewall6 - Start File
# Shorewall6 -- /etc/shorewall6/start
#
# /etc/shorewall6/start
#
# Add commands below that you want to be executed after shorewall6 has
# been started or restarted.
# Add commands below that you want to be executed after shorewall6 has
# been started or restarted.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,17 +1,15 @@
#
# Shorewall6 - Started File
# Shorewall6 -- /etc/shorewall6/started
#
# /etc/shorewall6/started
# Add commands below that you want to be executed after shorewall6 has
# been completely started or restarted. The difference between this
# extension script and /etc/shorewall6/start is that this one is invoked
# after the 'shorewall' chain has been created (thus signaling that the
# firewall is completely up).
#
# Add commands below that you want to be executed after shorewall6 has
# been completely started or restarted. The difference between this
# extension script and /etc/shorewall6/start is that this one is invoked
# after the 'shorewall' chain has been created (thus signaling that the
# firewall is completely up).
#
# This script should not change the firewall configuration directly but
# may do so indirectly by running /sbin/shorewall6 with the 'nolock'
# option.
# This script should not change the firewall configuration directly but
# may do so indirectly by running /sbin/shorewall6 with the 'nolock'
# option.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,10 +1,8 @@
#
# Shorewall6 - Stop File
# Shorewall6 -- /etc/shorewall6/stop
#
# /etc/shorewall6/stop
#
# Add commands below that you want to be executed at the beginning of a
# "shorewall6 stop" command.
# Add commands below that you want to be executed at the beginning of a
# "shorewall6 stop" command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,10 +1,8 @@
#
# Shorewall6 - Stopped File
# Shorewall6 -- /etc/shorewall6/stopped
#
# /etc/shorewall6/stopped
#
# Add commands below that you want to be executed at the completion of a
# "shorewal6l stop" command.
# Add commands below that you want to be executed at the completion of a
# "shorewall6 stop" command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -1,7 +1,8 @@
#
# Shorewall6 - Stoppedrules File
# Shorewall6 -- /etc/shorewall6/stoppedrules
#
# For information about entries in this file, type "man shorewall6-stoppedrules"
# For information about entries in this file,
# type "man shorewall6-stoppedrules"
#
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall6-stoppedrules.html

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Tcclasses File
# Shorewall6 -- /etc/shorewall6/tcclasses
#
# For information about entries in this file, type "man shorewall6-tcclasses"
#

View File

@@ -1,7 +1,5 @@
#
# Shorewall6 - tcclear File
#
# /etc/shorewall6/tcclear
# Shorewall6 -- /etc/shorewall6/tcclear
#
# Add commands below that you want to be executed before Shorewall6 clears
# the traffic shaping configuration.

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Tcdevices File
# Shorewall6 -- /etc/shorewall6/tcdevices
#
# For information about entries in this file, type "man shorewall6-tcdevices"
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall6 - Tcfilters File
# Shorewall6 -- /etc/shorewall6/tcfilters
#
# For information about entries in this file, type "man shorewall6-tcfilters"
#

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