Compare commits

..

43 Commits

Author SHA1 Message Date
Tom Eastep
1c29240eb9 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2015-11-01 11:31:53 -08:00
Tom Eastep
2b733b610c Return proper exit status from the remote-* commands
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-01 07:53:31 -08:00
Tom Eastep
332f636d29 Adjust LOGFILE if circular log buffer
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-11-01 07:25:34 -08:00
Tom Eastep
d1bad364e9 Correct syntax error in installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 17:54:20 -07:00
Tom Eastep
1358ec2d87 Remove ${SYSCONFDIR}/$PRODUCT in the -lite uninstallers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 13:37:08 -07:00
Tom Eastep
5807d44733 Allow HOST=default in the configure scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 13:29:02 -07:00
Tom Eastep
209d5d0766 Make the -lite uninstallers work on OpenWRT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 13:23:19 -07:00
Tom Eastep
aa680d8472 Avoid double slashes in pathnames within the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 12:57:33 -07:00
Tom Eastep
3d06a75768 Remove more %_b instances
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 12:43:22 -07:00
Tom Eastep
073b2992cc Require the 'install' utility in the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 12:43:01 -07:00
Tom Eastep
27d94c8921 Improve check for circular log buffer
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 08:31:46 -07:00
Tom Eastep
460f4bc5b7 Correct defect in processing the 'persistent' route option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 08:15:10 -07:00
Tom Eastep
f90567abf1 Add support for OpenWRT BB and later
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-31 08:08:17 -07:00
Tom Eastep
74a839b12e Mention lib.cli-user in the extension script article.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-30 09:09:53 -07:00
Tom Eastep
c83536767e Move get_config() into the overloadable part of the file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-30 08:54:07 -07:00
Tom Eastep
6209616766 Add lib.cli-user support to the full products
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-30 08:47:16 -07:00
Tom Eastep
1848c3fa45 Add lib.cli-user support to the -lite products
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-30 08:47:01 -07:00
Tom Eastep
5a3589b9a6 Add some comments in get_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-30 08:18:45 -07:00
Tom Eastep
3973cdf0da Merge branch '5.0.1' 2015-10-28 14:35:27 -07:00
Tom Eastep
e39d405e86 More tweaks to params processing and exporting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-28 14:33:55 -07:00
Tom Eastep
239560be8d Add Cygwin-specific code in get_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-28 13:47:40 -07:00
Tom Eastep
3873ebe06a More param handling fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-28 09:37:52 -07:00
Tuomo Soini
31cdd6dbcb Shorewall6/configfiles/stoppedrules: use standard description
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-28 10:48:48 +02:00
Tuomo Soini
e987a11614 Shorewall/configfiles/stoppedrules: use standard description
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-28 10:48:27 +02:00
Tom Eastep
081cf30447 Don't export variables with parentheses in their names
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-27 17:45:22 -07:00
Tuomo Soini
8133de1695 Shorewall6/configfiles/conntrack: fix config file header to common format
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-27 22:08:38 +02:00
Tuomo Soini
74180f83b9 Shorewall6/configfiles: remove empty lines and fix blrules header to common format
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-27 22:04:49 +02:00
Tuomo Soini
d614081d55 Shorewall/configfiles: remove empty lines and fix blrules header to common format
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-27 22:03:28 +02:00
Tom Eastep
6535bb94c5 Merge branch 'master' of ssh://server.shorewall.net/home/teastep/shorewall/code 2015-10-27 07:18:06 -07:00
Tom Eastep
38049fd0df Correct "remote-" commands
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 20:06:10 -07:00
Tom Eastep
4f4358d4db Correct error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 13:07:40 -07:00
Tom Eastep
f822afef99 Issue warning if a persistent provider isn't optional
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 13:07:28 -07:00
Tom Eastep
514fe76fa5 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2015-10-26 07:55:30 -07:00
Tom Eastep
6e7fc9bee4 Correct L2TP documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 07:43:28 -07:00
Tom Eastep
56bf8b1572 Don't configure persistence if the interface has no address
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-26 07:42:47 -07:00
Tuomo Soini
2a064c7b7c macro.MSSQL: allow udp/1434
Reference: https://technet.microsoft.com/en-us/library/ms181087%28v=sql.105%29.aspx
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-26 10:22:37 +02:00
Tuomo Soini
30682e63d8 Shorewall/Macros: remove version number
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2015-10-26 10:20:11 +02:00
Tom Eastep
69dd7ce0b9 Add 'persistent' provider option - Phase II
- Also allow the creation of 'persistent' routing rules and routes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-25 16:45:11 -07:00
Tom Eastep
39f6c4e74c Merge branch 'master' of ssh://server.shorewall.net/home/teastep/shorewall/code 2015-10-22 06:59:11 -07:00
Tom Eastep
46c3db4f32 Add 'persistent' provider option - Phase I
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-22 06:58:32 -07:00
Tom Eastep
6e59fd5395 Correct permissions on certain files in $CONFDIR/$PRODUCT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-22 06:58:05 -07:00
Tom Eastep
1e2cfcd9a3 Deal with missing 'hostname' utility
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-21 17:41:01 -07:00
Tom Eastep
87d94ae004 Correct typo in Dynamic article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2015-10-21 17:32:57 -07:00
156 changed files with 724 additions and 382 deletions

View File

@@ -158,6 +158,9 @@ else
if [ ! -f $rcfile ]; then
echo "ERROR: $vendor is not a recognized host type" >&2
exit 1
elif [ $vendor = default ]; then
params[HOST]=linux
vendor=linux
fi
fi

View File

@@ -82,7 +82,11 @@ unless ( defined $vendor ) {
if ( defined $vendor ) {
$rcfilename = $vendor eq 'linux' ? 'shorewallrc.default' : 'shorewallrc.' . $vendor;
die qq("ERROR: $vendor" is not a recognized host type) unless -f $rcfilename;
unless ( -f $rcfilename ) {
die qq("ERROR: $vendor" is not a recognized host type);
} elsif ( $vendor eq 'default' ) {
$params{HOST} = $vendor = 'linux';
}
} else {
if ( -f '/etc/debian_version' ) {
$vendor = 'debian';

View File

@@ -133,6 +133,8 @@ while [ $finished -eq 0 ]; do
esac
done
[ -n $(mywhich install) ] || fatal_error "This installer requires the 'install' utility"
#
# Read the RC file
#
@@ -407,9 +409,9 @@ fi
if [ ${SHAREDIR} != /usr/share ]; then
for f in lib.*; do
if [ $BUILD != apple ]; then
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/shorewall/$f
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/$f
else
eval sed -i \'\' -e \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/shorewall/$f
eval sed -i \'\' -e \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/$f
fi
done
fi

View File

@@ -149,23 +149,56 @@ syslog_circular_buffer() {
local pid
local tty
local flags
local cputime
local time
local path
local args
local arg
ps ax 2> /dev/null | while read pid tty flags cputime path args; do
ps w 2> /dev/null | while read pid tty stat time path args; do
case $path in
syslogd|*/syslogd)
for arg in $args; do
if [ x$arg = x-C ]; then
echo Yes
return
fi
case $arg in
-C*)
return 0
;;
esac
done
;;
logd|*/logd)
for arg in $args; do
case $arg in
-S*)
return 0
;;
esac
done
;;
esac
done
return 1
}
setup_logread() {
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
if syslog_circular_buffer; then
LOGFILE=logread
if qt mywhich tac; then
g_logread="logread | tac"
else
g_logread="logread"
fi
elif [ -r $LOGFILE ]; then
if qt mywhich tac; then
g_logread="tac $LOGFILE"
else
g_logread="cat $LOGFILE"
fi
else
fatal_error "LOGFILE ($LOGFILE) does not exist or is not readable!"
fi
}
#
@@ -173,31 +206,59 @@ syslog_circular_buffer() {
#
packet_log() # $1 = number of messages
{
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
if qt mywhich tac; then
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | tail -n$1 | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | tail -n$1 | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | tail -n$1 | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | tail -n$1 | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
fi
}
search_log() # $1 = IP address to search for
{
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
if qt mywhich tac; then
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | tac | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then
if [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed -r 's/ kernel://; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
elif [ $g_family -eq 4 ]; then
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/
else
$g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | grep "$1" | sed -r 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] //; s/0000:/:/g; s/:::+/::/g; s/:0+/:/g' | sed s/" $host $LOGFORMAT"/" "/
fi
fi
}
@@ -280,17 +341,7 @@ show_bl() {
logwatch() # $1 = timeout -- if negative, prompt each time that
# an 'interesting' packet count changes
{
if [ -z "$LOGFILE" ]; then
LOGFILE=/var/log/messages
if [ -n "$(syslog_circular_buffer)" ]; then
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
g_logread="tac $LOGFILE"
else
fatal_error "LOGFILE ($LOGFILE) does not exist!"
fi
fi
setup_logread
host=$(echo $g_hostname | sed 's/\..*$//')
oldrejects=$($g_tool -L -v -n | grep 'LOG')
@@ -1038,17 +1089,7 @@ show_command() {
log)
[ $# -gt 2 ] && usage 1
if [ -z "$LOGFILE" ]; then
LOGFILE=/var/log/messages
if [ -n "$(syslog_circular_buffer)" ]; then
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
g_logread="tac $LOGFILE"
else
fatal_error "LOGFILE ($LOGFILE) does not exist!"
fi
fi
setup_logread
echo "$g_product $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
echo
@@ -1427,17 +1468,7 @@ do_dump_command() {
esac
done
if [ -z "$LOGFILE" ]; then
LOGFILE=/var/log/messages
if [ -n "$(syslog_circular_buffer)" ]; then
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
g_logread="tac $LOGFILE"
else
fatal_error "LOGFILE ($LOGFILE) does not exist! - See http://www.shorewall.net/shorewall_logging.html"
fi
fi
setup_logread
g_ipt_options="$g_ipt_options $g_ipt_options1"
@@ -3495,10 +3526,34 @@ noiptrace_command() {
fatal_error "$g_product is not started"
fi
}
#
# Set the configuration variables from shorewall-lite.conf
# Verify that we have a compiled firewall script
#
verify_firewall_script() {
if [ ! -f $g_firewall ]; then
echo " ERROR: $g_product is not properly installed" >&2
if [ -L $g_firewall ]; then
echo " $g_firewall is a symbolic link to a" >&2
echo " non-existant file" >&2
else
echo " The file $g_firewall does not exist" >&2
fi
exit 2
fi
}
################################################################################
# The remaining functions are used by the Lite cli - they are overloaded by
# the Standard CLI by loading lib.cli-std
################################################################################
#
# Set the configuration variables from shorewall[6]-lite.conf.
#
get_config() {
local config
local lib
ensure_config_path
@@ -3520,15 +3575,7 @@ get_config() {
[ -n "$PATH" ] || PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
if ( ps ax 2> /dev/null | grep -v grep | qt grep 'syslogd.*-C' ) ; then
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
g_logread="tac $LOGFILE"
else
fatal_error "LOGFILE ($LOGFILE) does not exist!"
fi
setup_logread
#
# See if we have a real version of "tail" -- use separate redirection so
# that ash (aka /bin/sh on LRP) doesn't crap
@@ -3590,7 +3637,13 @@ get_config() {
VERBOSITY=2
fi
g_hostname=$(hostname 2> /dev/null)
if qt mywhich hostname; then
g_hostname=$(hostname 2> /dev/null)
elif qt mywhich uname; then
g_hostname=$(uname -n 2> /dev/null)
else
g_hostname=localhost
fi
if [ -n "$IPSET" ]; then
case "$IPSET" in
@@ -3630,29 +3683,11 @@ get_config() {
g_loopback=$(find_loopback_interfaces)
lib=$(find_file lib.cli-user)
[ -f $lib ] && . $lib
}
#
# Verify that we have a compiled firewall script
#
verify_firewall_script() {
if [ ! -f $g_firewall ]; then
echo " ERROR: $g_product is not properly installed" >&2
if [ -L $g_firewall ]; then
echo " $g_firewall is a symbolic link to a" >&2
echo " non-existant file" >&2
else
echo " The file $g_firewall does not exist" >&2
fi
exit 2
fi
}
################################################################################
# The remaining functions are used by the Lite cli - they are overloaded by
# the Standard CLI by loading lib.cli-std
################################################################################
#
# Start Command Executor
#

View File

@@ -33,7 +33,7 @@ startup_error() # $* = Error Message
echo " ERROR: $@: Firewall state not changed" >&2
if [ $LOG_VERBOSITY -ge 0 ]; then
timestamp="$(date +'%_b %d %T') "
timestamp="$(date +'%b %d %T') "
echo "${timestamp} ERROR: $@" >> $STARTUP_LOG
fi
@@ -50,7 +50,7 @@ startup_error() # $* = Error Message
esac
if [ $LOG_VERBOSITY -ge 0 ]; then
timestamp="$(date +'%_b %d %T') "
timestamp="$(date +'%b %d %T') "
case $COMMAND in
start)

View File

@@ -151,6 +151,8 @@ while [ $finished -eq 0 ] ; do
esac
done
[ -n $(mywhich install) ] || fatal_error "This installer requires the 'install' utility"
#
# Read the RC file
#
@@ -187,7 +189,7 @@ elif [ -z "${VARDIR}" ]; then
VARDIR=${VARLIB}/${PRODUCT}
fi
for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARLIB VARDIR; do
for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARLIB VARDIR; do
require $var
done
@@ -316,7 +318,7 @@ if [ -n "$DESTDIR" ]; then
OWNERSHIP=""
fi
install -d $OWNERSHIP -m 755 ${DESTDIR}/${SBINDIR}
install -d $OWNERSHIP -m 755 ${DESTDIR}${SBINDIR}
install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
else
if [ ! -f ${SHAREDIR}/shorewall/coreversion ]; then
@@ -422,8 +424,8 @@ fi
# Install the Makefile
#
run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}${CONFDIR}/$PRODUCT
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${CONFDIR}/$PRODUCT/Makefile
[ $SBINDIR = /sbin ] || eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}/${CONFDIR}/$PRODUCT/Makefile
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
[ $SBINDIR = /sbin ] || eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile
echo "Makefile installed as ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile"
#
@@ -438,7 +440,7 @@ echo "Default config path file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/confi
for f in lib.* ; do
if [ -f $f ]; then
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
echo "Library ${f#*.} file installed as ${DESTDIR}/${SHAREDIR}/$PRODUCT/$f"
echo "Library ${f#*.} file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
fi
done
@@ -451,7 +453,7 @@ echo "Common functions linked through ${DESTDIR}${SHAREDIR}/$PRODUCT/functions"
#
install_file shorecap ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap 0755
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${LIBEXECDIR}/$PRODUCT/shorecap
[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap
echo
echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shorecap"
@@ -538,8 +540,8 @@ if [ -n "$SYSCONFFILE" -a -f "$SYSCONFFILE" -a ! -f ${DESTDIR}${SYSCONFDIR}/${PR
fi
if [ ${SHAREDIR} != /usr/share ]; then
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/${PRODUCT}/lib.base
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SBINDIR}/$PRODUCT
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.base
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SBINDIR}/$PRODUCT
fi
if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then

View File

@@ -168,7 +168,11 @@ if [ $configure -eq 1 ]; then
fi
if [ -L ${SHAREDIR}/shorewall-lite/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)
if [ $HOST = "linux" ] && [ -f /etc/openwrt_release -o -f /etc/openwrt_version ]; then
FIREWALL=$(readlink ${SHAREDIR}/shorewall-lite/init)
else
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)
fi
elif [ -n "$INITFILE" ]; then
FIREWALL=${INITDIR}/${INITFILE}
fi
@@ -199,6 +203,7 @@ rm -rf ${VARDIR}/shorewall-lite
rm -rf ${SHAREDIR}/shorewall-lite
rm -rf ${LIBEXECDIR}/shorewall-lite
rm -f ${CONFDIR}/logrotate.d/shorewall-lite
rm -f ${SYSCONFDIR}/shorewall-lite
rm -f ${MANDIR}/man5/shorewall-lite*
rm -f ${MANDIR}/man8/shorewall-lite*

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - AMQP Macro
# Shorewall - AMQP Macro
#
# /usr/share/shorewall/macro.AMQP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Audited AllowICMPs Macro
# Shorewall - Audited AllowICMPs Macro
#
# /usr/share/shorewall/macro.A_AllowICMPs
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Audited DropDNSrep Macro
# Shorewall - Audited DropDNSrep Macro
#
# /usr/share/shorewall/macro.A_DropDNSrep
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - ADropUPnP Macro
# Shorewall - ADropUPnP Macro
#
# /usr/share/shorewall/macro.A_DropUPnP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Samba 4 Macro
# Shorewall - Samba 4 Macro
#
# /usr/share/shorewall/macro.ActiveDir
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - AllowICMPs Macro
# Shorewall - AllowICMPs Macro
#
# /usr/share/shorewall/macro.AllowICMPs
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Amanda Macro
# Shorewall - Amanda Macro
#
# /usr/share/shorewall/macro.Amanda
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Auth Macro
# Shorewall - Auth Macro
#
# /usr/share/shorewall/macro.Auth
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - BGP Macro
# Shorewall - BGP Macro
#
# /usr/share/shorewall/macro.BGP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - blacklist Macro
# Shorewall - blacklist Macro
#
# /usr/share/shorewall/macro.blacklist
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - BitTorrent Macro
# Shorewall - BitTorrent Macro
#
# /usr/share/shorewall/macro.BitTorrent
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - BitTorrent 3.2 Macro
# Shorewall - BitTorrent 3.2 Macro
#
# /usr/share/shorewall/macro.BitTorrent32
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - CVS Macro
# Shorewall - CVS Macro
#
# /usr/share/shorewall/macro.CVS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Citrix/ICA Macro
# Shorewall - Citrix/ICA Macro
#
# /usr/share/shorewall/macro.Citrix
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DAAP Macro
# Shorewall - DAAP Macro
#
# /usr/share/shorewall/macro.DAAP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DCC Macro
# Shorewall - DCC Macro
#
# /usr/share/shorewall/macro.DCC
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DHCPfwd Macro
# Shorewall - DHCPfwd Macro
#
# /usr/share/shorewall/macro.DHCPfwd
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DNS Macro
# Shorewall - DNS Macro
#
# /usr/share/shorewall/macro.DNS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Distcc Macro
# Shorewall - Distcc Macro
#
# /usr/share/shorewall/macro.Distcc
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Drop Macro
# Shorewall - Drop Macro
#
# /usr/share/shorewall/macro.Drop
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DropDNSrep Macro
# Shorewall - DropDNSrep Macro
#
# /usr/share/shorewall/macro.DropDNSrep
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - DropUPnP Macro
# Shorewall - DropUPnP Macro
#
# /usr/share/shorewall/macro.DropUPnP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Edonkey Macro
# Shorewall - Edonkey Macro
#
# /usr/share/shorewall/macro.Edonkey
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - FTP Macro
# Shorewall - FTP Macro
#
# /usr/share/shorewall/macro.FTP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Finger Macro
# Shorewall - Finger Macro
#
# /usr/share/shorewall/macro.Finger
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - GNUnet Macro
# Shorewall - GNUnet Macro
#
# /usr/share/shorewall/macro.GNUnet
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - GRE Macro
# Shorewall - GRE Macro
#
# /usr/share/shorewall/macro.GRE
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Git Macro
# Shorewall - Git Macro
#
# /usr/share/shorewall/macro.Git
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Gnutella Macro
# Shorewall - Gnutella Macro
#
# /usr/share/shorewall/macro.Gnutella
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Citrix/Goto Meeting macro
# Shorewall - Citrix/Goto Meeting macro
#
# /usr/share/shorewall/macro.Goto-Meeting
# by Eric Teeter

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - HKP Macro
# Shorewall - HKP Macro
#
# /usr/share/shorewall/macro.HKP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - HTTP Macro
# Shorewall - HTTP Macro
#
# /usr/share/shorewall/macro.HTTP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - HTTPS Macro
# Shorewall - HTTPS Macro
#
# /usr/share/shorewall/macro.HTTPS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - ICPV2 Macro
# Shorewall - ICPV2 Macro
#
# /usr/share/shorewall/macro.ICPV2
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - ICQ Macro
# Shorewall - ICQ Macro
#
# /usr/share/shorewall/macro.ICQ
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - ILO Macro
# Shorewall - ILO Macro
#
# /usr/share/shorewall/macro.ILO
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IMAP Macro
# Shorewall - IMAP Macro
#
# /usr/share/shorewall/macro.IMAP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IMAPS Macro
# Shorewall - IMAPS Macro
#
# /usr/share/shorewall/macro.IMAPS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPIP Macro
# Shorewall - IPIP Macro
#
# /usr/share/shorewall/macro.IPIP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPMI Macro
# Shorewall - IPMI Macro
#
# /usr/share/shorewall/macro.IPMI
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 3.2 - IPP Macro
# Shorewall - IPP Macro
#
# /usr/share/shorewall/macro.IPP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPP Broadcast Macro
# Shorewall - IPP Broadcast Macro
#
# /usr/share/shorewall/macro.IPPbrd
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPPserver Macro
# Shorewall - IPPserver Macro
#
# /usr/share/shorewall/macro.IPPserver
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPsec Macro
# Shorewall - IPsec Macro
#
# /usr/share/shorewall/macro.IPsec
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPsecah Macro
# Shorewall - IPsecah Macro
#
# /usr/share/shorewall/macro.IPsecah
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - IPsecnat Macro
# Shorewall - IPsecnat Macro
#
# /usr/share/shorewall/macro.IPsecnat
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 IRC Macro
# Shorewall IRC Macro
#
# /usr/share/shorewall/macro.IRC
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - JAP Macro
# Shorewall - JAP Macro
#
# /usr/share/shorewall/macro.JAP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Jabber Macro
# Shorewall - Jabber Macro
#
# /usr/share/shorewall/macro.Jabber
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - JabberPlain Macro
# Shorewall - JabberPlain Macro
#
# /usr/share/shorewall/macro.JabberPlain
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - JabberSecure (SSL) Macro
# Shorewall - JabberSecure (SSL) Macro
#
# /usr/share/shorewall/macro.JabberSecure
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 3.4 - Jabberd (server intercommunication)
# Shorewall - Jabberd (server intercommunication)
#
# /usr/share/shorewall/macro.Jabberd
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 3.2 - Jetdirect Macro
# Shorewall - Jetdirect Macro
#
# /usr/share/shorewall/macro.Jetdirect
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Kerberos Macro
# Shorewall - Kerberos Macro
#
# /usr/share/shorewall/macro.Kerberos
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - L2TP Macro
# Shorewall - L2TP Macro
#
# /usr/share/shorewall/macro.L2TP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - LDAP Macro
# Shorewall - LDAP Macro
#
# /usr/share/shorewall/macro.LDAP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - LDAPS Macro
# Shorewall - LDAPS Macro
#
# /usr/share/shorewall/macro.LDAPS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - MSNP Macro
# Shorewall - MSNP Macro
#
# /usr/share/shorewall/macro.MSNP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - MSSQL Macro
# Shorewall - MSSQL Macro
#
# /usr/share/shorewall/macro.MSSQL
#
@@ -9,3 +9,4 @@
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGIN RATE USER/
# PORT(S) PORT(S) DEST LIMIT GROUP
PARAM - - tcp 1433
PARAM - - udp 1434

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Mail Macro
# Shorewall - Mail Macro
#
# /usr/share/shorewall/macro.Mail
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - MongoDB Macro
# Shorewall - MongoDB Macro
#
# /usr/share/shorewall/macro.MongoDB
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Munin Macro
# Shorewall - Munin Macro
#
# /usr/share/shorewall/macro.Munin
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - MySQL Macro
# Shorewall - MySQL Macro
#
# /usr/share/shorewall/macro.MySQL
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 NNTP Macro
# Shorewall NNTP Macro
#
# /usr/share/shorewall/macro.NNTP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 NNTPS Macro
# Shorewall NNTPS Macro
#
# /usr/share/shorewall/macro.NNTPS
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - NTP Macro
# Shorewall - NTP Macro
#
# /usr/share/shorewall/macro.NTP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - NTPbi Macro
# Shorewall - NTPbi Macro
#
# /usr/share/shorewall/macro.NTPbi
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - NTPbrd Macro
# Shorewall - NTPbrd Macro
#
# /usr/share/shorewall/macro.NTPbrd
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - OSPF Macro
# Shorewall - OSPF Macro
#
# /usr/share/shorewall/macro.OSPF
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - OpenVPN Macro
# Shorewall - OpenVPN Macro
#
# /usr/share/shorewall/macro.OpenVPN Macro
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - PCA Macro
# Shorewall - PCA Macro
#
# /usr/share/shorewall/macro.PCA
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - POP3 Macro
# Shorewall - POP3 Macro
#
# /usr/share/shorewall/macro.POP3
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - POP3S Macro
# Shorewall - POP3S Macro
#
# /usr/share/shorewall/macro.POP3S
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - PPTP Macro
# Shorewall - PPTP Macro
#
# /usr/share/shorewall/macro.PPtP Macro
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Ping Macro
# Shorewall - Ping Macro
#
# /usr/share/shorewall/macro.Ping
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - PostgreSQL Macro
# Shorewall - PostgreSQL Macro
#
# /usr/share/shorewall/macro.PostgreSQL
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 3.2 - Printer Macro
# Shorewall - Printer Macro
#
# /usr/share/shorewall/macro.Printer
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Puppet Macro
# Shorewall - Puppet Macro
#
# /usr/share/shorewall/macro.Puppet
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - QUIC Macro
# Shorewall - QUIC Macro
#
# /usr/share/shorewall/macro.QUIC
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 3.2 - RDP Macro
# Shorewall - RDP Macro
#
# /usr/share/shorewall/macro.RDP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - RIPbi Macro
# Shorewall - RIPbi Macro
#
# /usr/share/shorewall/macro.RIPbi
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - RNDC Macro
# Shorewall - RNDC Macro
#
# /usr/share/shorewall/macro.RNDC
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Razor Macro
# Shorewall - Razor Macro
#
# /usr/share/shorewall/macro.Razor
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Rdate Macro
# Shorewall - Rdate Macro
#
# /usr/share/shorewall/macro.Rdate
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Redis Macro
# Shorewall - Redis Macro
#
# /usr/share/shorewall/macro.Redis
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Reject Macro
# Shorewall - Reject Macro
#
# /usr/share/shorewall/macro.Reject
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Macro Template
# Shorewall - Macro Template
#
# /usr/share/shorewall/macro.Rfc1918
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - Rsync Macro
# Shorewall - Rsync Macro
#
# /usr/share/shorewall/macro.Rsync
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - SANE Macro
# Shorewall - SANE Macro
#
# /usr/share/shorewall/macro.SANE
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - SIP Macro
# Shorewall - SIP Macro
#
# /usr/share/shorewall/macro.SIP
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - SMB Macro
# Shorewall - SMB Macro
#
# /usr/share/shorewall/macro.SMB
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - SMB Bi-directional Macro
# Shorewall - SMB Bi-directional Macro
#
# /usr/share/shorewall/macro.SMBBI
#

View File

@@ -1,5 +1,5 @@
#
# Shorewall version 5 - SMBswat Macro
# Shorewall - SMBswat Macro
#
# /usr/share/shorewall/macro.SMBswat
#

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