Shorewall 2.0.0 Beta2

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1134 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2004-02-09 23:52:01 +00:00
parent b02506a47a
commit 5f2b0ad901
10 changed files with 269 additions and 233 deletions

View File

@ -11,5 +11,5 @@ dropBcast
RejectSMB RejectSMB
DropUPnP DropUPnP
dropNonSyn dropNonSyn
DropDNSRep DropDNSrep
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

View File

@ -20,7 +20,7 @@
# If you remove the following INCLUDE, you will need to copy the # If you remove the following INCLUDE, you will need to copy the
# definitions you need from the actions.std file into this one. # definitions you need from the actions.std file into this one.
# #
INCLUDE /etc/shorewall2/actions.std INCLUDE /etc/shorewall/actions.std
# #
# Add your entries below here # Add your entries below here
# #

View File

@ -28,7 +28,7 @@
# shown below. Simply run this script to revert to your prior version of # shown below. Simply run this script to revert to your prior version of
# Shoreline Firewall. # Shoreline Firewall.
VERSION=2.0.0-Alpha2 VERSION=2.0.0-Beta1
usage() # $1 = exit status usage() # $1 = exit status
{ {
@ -49,92 +49,94 @@ restore_file() # $1 = file to restore
fi fi
} }
if [ ! -f /usr/share/shorewall2/version-${VERSION}.bkout ]; then if [ ! -f /usr/share/shorewall/version-${VERSION}.bkout ]; then
echo "Shorewall Version $VERSION is not installed" echo "Shorewall Version $VERSION is not installed"
exit 1 exit 1
fi fi
echo "Backing Out Installation of Shorewall $VERSION" echo "Backing Out Installation of Shorewall $VERSION"
if [ -L /usr/share/shorewall2/init ]; then if [ -L /usr/share/shorewall/init ]; then
FIREWALL=$(ls -l /usr/share/shorewall2/firewall | sed 's/^.*> //') FIREWALL=$(ls -l /usr/share/shorewall/firewall | sed 's/^.*> //')
restore_file $FIREWALL restore_file $FIREWALL
else else
restore_file /etc/init.d/shorewall2 restore_file /etc/init.d/shorewall
fi fi
restore_file /usr/share/shorewall2/firewall restore_file /usr/share/shorewall/firewall
restore_file /sbin/shorewall2 restore_file /sbin/shorewall
restore_file /etc/shorewall2/shorewall.conf restore_file /etc/shorewall/shorewall.conf
restore_file /etc/shorewall2/functions restore_file /etc/shorewall/functions
restore_file /usr/lib/shorewall2/functions restore_file /usr/lib/shorewall/functions
restore_file /var/lib/shorewall2/functions restore_file /var/lib/shorewall/functions
restore_file /usr/lib/shorewall2/firewall restore_file /usr/lib/shorewall/firewall
restore_file /usr/lib/shorewall2/help restore_file /usr/lib/shorewall/help
restore_file /etc/shorewall2/common.def restore_file /etc/shorewall/common.def
restore_file /etc/shorewall2/icmp.def restore_file /etc/shorewall/icmp.def
restore_file /etc/shorewall2/zones restore_file /etc/shorewall/zones
restore_file /etc/shorewall2/policy restore_file /etc/shorewall/policy
restore_file /etc/shorewall2/interfaces restore_file /etc/shorewall/interfaces
restore_file /etc/shorewall2/hosts restore_file /etc/shorewall/hosts
restore_file /etc/shorewall2/rules restore_file /etc/shorewall/rules
restore_file /etc/shorewall2/nat restore_file /etc/shorewall/nat
restore_file /etc/shorewall2/params restore_file /etc/shorewall/params
restore_file /etc/shorewall2/proxyarp restore_file /etc/shorewall/proxyarp
restore_file /etc/shorewall2/routestopped restore_file /etc/shorewall/routestopped
restore_file /etc/shorewall2/maclist restore_file /etc/shorewall/maclist
restore_file /etc/shorewall2/masq restore_file /etc/shorewall/masq
restore_file /etc/shorewall2/modules restore_file /etc/shorewall/modules
restore_file /etc/shorewall2/tcrules restore_file /etc/shorewall/tcrules
restore_file /etc/shorewall2/tos restore_file /etc/shorewall/tos
restore_file /etc/shorewall2/tunnels restore_file /etc/shorewall/tunnels
restore_file /etc/shorewall2/blacklist restore_file /etc/shorewall/blacklist
restore_file /etc/shorewall2/whitelist restore_file /etc/shorewall/whitelist
restore_file /etc/shorewall2/rfc1918 restore_file /etc/shorewall/rfc1918
restore_file /etc/shorewall2/init restore_file /etc/shorewall/init
restore_file /etc/shorewall2/start restore_file /etc/shorewall/start
restore_file /etc/shorewall2/stop restore_file /etc/shorewall/stop
restore_file /etc/shorewall2/stopped restore_file /etc/shorewall/stopped
restore_file /etc/shorewall2/ecn restore_file /etc/shorewall/ecn
restore_file /etc/shorewall2/accounting restore_file /etc/shorewall/accounting
restore_file /etc/shorewall2/actions restore_file /etc/shorewall/actions.std
for f in /etc/shorewall2/action.*-${VERSION}.bkout; do restore_file /etc/shorewall/actions
for f in /etc/shorewall/action.*-${VERSION}.bkout; do
restore_file $(echo $f | sed "s/-${VERSION}.bkout//") restore_file $(echo $f | sed "s/-${VERSION}.bkout//")
done done
restore_file /usr/share/shorewall2/version restore_file /usr/share/shorewall/version
echo "Shorewall2 Restored to Version $oldversion" echo "Shorewall Restored to Version $oldversion"

View File

@ -421,8 +421,6 @@ first_chains() #$1 = interface
echo ${c}_fwd ${c}_in echo ${c}_fwd ${c}_in
} }
#
# #
# Find hosts in a given zone # Find hosts in a given zone
# #
@ -573,7 +571,7 @@ validate_interfaces_file() {
error_message \ error_message \
"Warning: The 'dropunclean' and 'logunclean' options are not supported by Shorewall 2.0" "Warning: The 'dropunclean' and 'logunclean' options are not supported by Shorewall 2.0"
error_message \ error_message \
" PLEASE STAND BY WHILE SHOREWALL2 REFORMATS YOUR HARD DRIVE TO REMOVE THESE OPTIONS..." " PLEASE STAND BY WHILE shorewall REFORMATS YOUR HARD DRIVE TO REMOVE THESE OPTIONS..."
sleep 5 sleep 5
error_message "GOTCHA!!!! :-)" error_message "GOTCHA!!!! :-)"
error_message \ error_message \
@ -1399,7 +1397,7 @@ setup_mac_lists() {
# #
for interface in $maclist_interfaces; do for interface in $maclist_interfaces; do
case $interface in case $interface in
eth*|wlan*|br[0-9]) eth*|wlan*|br[0-9]|ath[0-9])
;; ;;
*) *)
fatal_error "MAC verification is only supported on ethernet and 802.11b devices: $interface" fatal_error "MAC verification is only supported on ethernet and 802.11b devices: $interface"
@ -2320,8 +2318,8 @@ process_action() # $1 = action
} }
# #
# Read /etc/shorewall2/actions and for each defined <action>, process # Read /etc/shorewall/actions and for each defined <action>, process
# /etc/shorewall2/action.<action> # /etc/shorewall/action.<action>
# #
process_actions() { process_actions() {
@ -3755,7 +3753,7 @@ setup_masq()
chain=$newchain chain=$newchain
destnets=0.0.0.0/0 destnets=0.0.0.0/0
if [ -n "$nonmasq" ]; then if [ -n "$nomasq" ]; then
for addr in $(separate_list $nomasq); do for addr in $(separate_list $nomasq); do
addnatrule $chain -s $addr -j RETURN addnatrule $chain -s $addr -j RETURN
done done
@ -4780,10 +4778,10 @@ activate_rules()
# Check for disabled startup # Check for disabled startup
# #
check_disabled_startup() { check_disabled_startup() {
if [ -f /etc/shorewall2/startup_disabled ]; then if [ -f /etc/shorewall/startup_disabled ]; then
echo " Shorewall Startup is disabled -- to enable startup" echo " Shorewall Startup is disabled -- to enable startup"
echo " after you have completed Shorewall configuration," echo " after you have completed Shorewall configuration,"
echo " remove the file /etc/shorewall2/startup_disabled" echo " remove the file /etc/shorewall/startup_disabled"
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR [ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
my_mutex_off my_mutex_off
@ -5347,7 +5345,7 @@ do_initialize() {
TCP_FLAGS_LOG_LEVEL= TCP_FLAGS_LOG_LEVEL=
RFC1918_LOG_LEVEL= RFC1918_LOG_LEVEL=
MARK_IN_FORWARD_CHAIN= MARK_IN_FORWARD_CHAIN=
SHARED_DIR=/usr/share/shorewall2 SHARED_DIR=/usr/share/shorewall
FUNCTIONS= FUNCTIONS=
VERSION_FILE= VERSION_FILE=
LOGFORMAT= LOGFORMAT=

View File

@ -83,7 +83,7 @@ fix_bang() {
} }
# #
# Find a File -- For relative file name, look first in $SHOREWALL_DIR then in /etc/shorewall2 # Find a File -- For relative file name, look first in $SHOREWALL_DIR then in /etc/shorewall
# #
find_file() find_file()
{ {
@ -95,7 +95,7 @@ find_file()
if [ -n "$SHOREWALL_DIR" -a -f $SHOREWALL_DIR/$1 ]; then if [ -n "$SHOREWALL_DIR" -a -f $SHOREWALL_DIR/$1 ]; then
echo $SHOREWALL_DIR/$1 echo $SHOREWALL_DIR/$1
else else
echo /etc/shorewall2/$1 echo /etc/shorewall/$1
fi fi
;; ;;
esac esac
@ -201,7 +201,7 @@ get_statedir()
if [ -f $config ]; then if [ -f $config ]; then
. $config . $config
else else
echo "/etc/shorewall2/shorewall.conf does not exist!" >&2 echo "/etc/shorewall/shorewall.conf does not exist!" >&2
exit 2 exit 2
fi fi

View File

@ -54,7 +54,7 @@
# /etc/rc.d/rc.local file is modified to start the firewall. # /etc/rc.d/rc.local file is modified to start the firewall.
# #
VERSION=2.0.0-Alpha2 VERSION=2.0.0-Beta1
usage() # $1 = exit status usage() # $1 = exit status
{ {
@ -77,7 +77,7 @@ run_install()
cant_autostart() cant_autostart()
{ {
echo echo
echo "WARNING: Unable to configure Shorewall2 to start" echo "WARNING: Unable to configure shorewall to start"
echo " automatically at boot" echo " automatically at boot"
} }
@ -185,8 +185,6 @@ elif [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
DEBIAN=yes DEBIAN=yes
fi fi
FIREWALL="shorewall2"
# #
# Change to the directory containing this script # Change to the directory containing this script
# #
@ -195,85 +193,85 @@ cd "$(dirname $0)"
echo "Installing Shorewall Version $VERSION" echo "Installing Shorewall Version $VERSION"
# #
# Check for /etc/shorewall2 # Check for /etc/shorewall
# #
if [ -d ${PREFIX}/etc/shorewall2 ]; then if [ -d ${PREFIX}/etc/shorewall ]; then
first_install="" first_install=""
else else
first_install="Yes" first_install="Yes"
fi fi
install_file_with_backup shorewall ${PREFIX}/sbin/shorewall2 0544 install_file_with_backup shorewall ${PREFIX}/sbin/shorewall 0544
echo echo
echo "Shorewall2 control program installed in ${PREFIX}/sbin/shorewall2" echo "shorewall control program installed in ${PREFIX}/sbin/shorewall"
# #
# Install the Firewall Script # Install the Firewall Script
# #
if [ -n "$DEBIAN" ]; then if [ -n "$DEBIAN" ]; then
install_file_with_backup init.debian.sh /etc/init.d/shorewall2 install_file_with_backup init.debian.sh /etc/init.d/shorewall 0544
else else
install_file_with_backup init.sh ${PREFIX}${DEST}/$FIREWALL 0544 install_file_with_backup init.sh ${PREFIX}${DEST}/shorewall 0544
fi fi
echo echo
echo "Shorewall script installed in ${PREFIX}${DEST}/$FIREWALL" echo "Shorewall script installed in ${PREFIX}${DEST}/shorewall"
# #
# Create /etc/shorewall2, /usr/share/shorewall2 and /var/shorewall if needed # Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed
# #
mkdir -p ${PREFIX}/etc/shorewall2 mkdir -p ${PREFIX}/etc/shorewall
mkdir -p ${PREFIX}/usr/share/shorewall2 mkdir -p ${PREFIX}/usr/share/shorewall
mkdir -p ${PREFIX}/var/lib/shorewall mkdir -p ${PREFIX}/var/lib/shorewall
# #
# Install the config file # Install the config file
# #
if [ -f ${PREFIX}/etc/shorewall2/shorewall.conf ]; then if [ -f ${PREFIX}/etc/shorewall/shorewall.conf ]; then
backup_file /etc/shorewall2/shorewall.conf backup_file /etc/shorewall/shorewall.conf
else else
run_install -o $OWNER -g $GROUP -m 0744 shorewall.conf ${PREFIX}/etc/shorewall2/shorewall.conf run_install -o $OWNER -g $GROUP -m 0744 shorewall.conf ${PREFIX}/etc/shorewall/shorewall.conf
echo echo
echo "Config file installed as ${PREFIX}/etc/shorewall2/shorewall.conf" echo "Config file installed as ${PREFIX}/etc/shorewall/shorewall.conf"
fi fi
# #
# Install the zones file # Install the zones file
# #
if [ -f ${PREFIX}/etc/shorewall2/zones ]; then if [ -f ${PREFIX}/etc/shorewall/zones ]; then
backup_file /etc/shorewall2/zones backup_file /etc/shorewall/zones
else else
run_install -o $OWNER -g $GROUP -m 0744 zones ${PREFIX}/etc/shorewall2/zones run_install -o $OWNER -g $GROUP -m 0744 zones ${PREFIX}/etc/shorewall/zones
echo echo
echo "Zones file installed as ${PREFIX}/etc/shorewall2/zones" echo "Zones file installed as ${PREFIX}/etc/shorewall/zones"
fi fi
# #
# Install the functions file # Install the functions file
# #
if [ -f ${PREFIX}/etc/shorewall2/functions ]; then if [ -f ${PREFIX}/etc/shorewall/functions ]; then
backup_file ${PREFIX}/etc/shorewall2/functions backup_file ${PREFIX}/etc/shorewall/functions
rm -f ${PREFIX}/etc/shorewall2/functions rm -f ${PREFIX}/etc/shorewall/functions
fi fi
install_file_with_backup functions ${PREFIX}/usr/share/shorewall2/functions 0444 install_file_with_backup functions ${PREFIX}/usr/share/shorewall/functions 0444
echo echo
echo "Common functions installed in ${PREFIX}/usr/share/shorewall2/functions" echo "Common functions installed in ${PREFIX}/usr/share/shorewall/functions"
# #
# Install the Help file # Install the Help file
# #
install_file_with_backup help ${PREFIX}/usr/share/shorewall2/help 0544 install_file_with_backup help ${PREFIX}/usr/share/shorewall/help 0544
echo echo
echo "Help command executor installed in ${PREFIX}/usr/share/shorewall2/help" echo "Help command executor installed in ${PREFIX}/usr/share/shorewall/help"
# #
# Install the common.def file # Install the common.def file
# #
install_file_with_backup common.def ${PREFIX}/etc/shorewall2/common.def 0444 install_file_with_backup common.def ${PREFIX}/etc/shorewall/common.def 0444
echo echo
echo "Common rules installed in ${PREFIX}/etc/shorewall2/common.def" echo "Common rules installed in ${PREFIX}/etc/shorewall/common.def"
# #
# Delete the icmp.def file # Delete the icmp.def file
@ -283,310 +281,320 @@ delete_file icmp.def
# #
# Install the policy file # Install the policy file
# #
if [ -f ${PREFIX}/etc/shorewall2/policy ]; then if [ -f ${PREFIX}/etc/shorewall/policy ]; then
backup_file /etc/shorewall2/policy backup_file /etc/shorewall/policy
else else
run_install -o $OWNER -g $GROUP -m 0600 policy ${PREFIX}/etc/shorewall2/policy run_install -o $OWNER -g $GROUP -m 0600 policy ${PREFIX}/etc/shorewall/policy
echo echo
echo "Policy file installed as ${PREFIX}/etc/shorewall2/policy" echo "Policy file installed as ${PREFIX}/etc/shorewall/policy"
fi fi
# #
# Install the interfaces file # Install the interfaces file
# #
if [ -f ${PREFIX}/etc/shorewall2/interfaces ]; then if [ -f ${PREFIX}/etc/shorewall/interfaces ]; then
backup_file /etc/shorewall2/interfaces backup_file /etc/shorewall/interfaces
else else
run_install -o $OWNER -g $GROUP -m 0600 interfaces ${PREFIX}/etc/shorewall2/interfaces run_install -o $OWNER -g $GROUP -m 0600 interfaces ${PREFIX}/etc/shorewall/interfaces
echo echo
echo "Interfaces file installed as ${PREFIX}/etc/shorewall2/interfaces" echo "Interfaces file installed as ${PREFIX}/etc/shorewall/interfaces"
fi fi
# #
# Install the hosts file # Install the hosts file
# #
if [ -f ${PREFIX}/etc/shorewall2/hosts ]; then if [ -f ${PREFIX}/etc/shorewall/hosts ]; then
backup_file /etc/shorewall2/hosts backup_file /etc/shorewall/hosts
else else
run_install -o $OWNER -g $GROUP -m 0600 hosts ${PREFIX}/etc/shorewall2/hosts run_install -o $OWNER -g $GROUP -m 0600 hosts ${PREFIX}/etc/shorewall/hosts
echo echo
echo "Hosts file installed as ${PREFIX}/etc/shorewall2/hosts" echo "Hosts file installed as ${PREFIX}/etc/shorewall/hosts"
fi fi
# #
# Install the rules file # Install the rules file
# #
if [ -f ${PREFIX}/etc/shorewall2/rules ]; then if [ -f ${PREFIX}/etc/shorewall/rules ]; then
backup_file /etc/shorewall2/rules backup_file /etc/shorewall/rules
else else
run_install -o $OWNER -g $GROUP -m 0600 rules ${PREFIX}/etc/shorewall2/rules run_install -o $OWNER -g $GROUP -m 0600 rules ${PREFIX}/etc/shorewall/rules
echo echo
echo "Rules file installed as ${PREFIX}/etc/shorewall2/rules" echo "Rules file installed as ${PREFIX}/etc/shorewall/rules"
fi fi
# #
# Install the NAT file # Install the NAT file
# #
if [ -f ${PREFIX}/etc/shorewall2/nat ]; then if [ -f ${PREFIX}/etc/shorewall/nat ]; then
backup_file /etc/shorewall2/nat backup_file /etc/shorewall/nat
else else
run_install -o $OWNER -g $GROUP -m 0600 nat ${PREFIX}/etc/shorewall2/nat run_install -o $OWNER -g $GROUP -m 0600 nat ${PREFIX}/etc/shorewall/nat
echo echo
echo "NAT file installed as ${PREFIX}/etc/shorewall2/nat" echo "NAT file installed as ${PREFIX}/etc/shorewall/nat"
fi fi
# #
# Install the Parameters file # Install the Parameters file
# #
if [ -f ${PREFIX}/etc/shorewall2/params ]; then if [ -f ${PREFIX}/etc/shorewall/params ]; then
backup_file /etc/shorewall2/params backup_file /etc/shorewall/params
else else
run_install -o $OWNER -g $GROUP -m 0600 params ${PREFIX}/etc/shorewall2/params run_install -o $OWNER -g $GROUP -m 0600 params ${PREFIX}/etc/shorewall/params
echo echo
echo "Parameter file installed as ${PREFIX}/etc/shorewall2/params" echo "Parameter file installed as ${PREFIX}/etc/shorewall/params"
fi fi
# #
# Install the proxy ARP file # Install the proxy ARP file
# #
if [ -f ${PREFIX}/etc/shorewall2/proxyarp ]; then if [ -f ${PREFIX}/etc/shorewall/proxyarp ]; then
backup_file /etc/shorewall2/proxyarp backup_file /etc/shorewall/proxyarp
else else
run_install -o $OWNER -g $GROUP -m 0600 proxyarp ${PREFIX}/etc/shorewall2/proxyarp run_install -o $OWNER -g $GROUP -m 0600 proxyarp ${PREFIX}/etc/shorewall/proxyarp
echo echo
echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall2/proxyarp" echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall/proxyarp"
fi fi
# #
# Install the Stopped Routing file # Install the Stopped Routing file
# #
if [ -f ${PREFIX}/etc/shorewall2/routestopped ]; then if [ -f ${PREFIX}/etc/shorewall/routestopped ]; then
backup_file /etc/shorewall2/routestopped backup_file /etc/shorewall/routestopped
else else
run_install -o $OWNER -g $GROUP -m 0600 routestopped ${PREFIX}/etc/shorewall2/routestopped run_install -o $OWNER -g $GROUP -m 0600 routestopped ${PREFIX}/etc/shorewall/routestopped
echo echo
echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall2/routestopped" echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall/routestopped"
fi fi
# #
# Install the Mac List file # Install the Mac List file
# #
if [ -f ${PREFIX}/etc/shorewall2/maclist ]; then if [ -f ${PREFIX}/etc/shorewall/maclist ]; then
backup_file /etc/shorewall2/maclist backup_file /etc/shorewall/maclist
else else
run_install -o $OWNER -g $GROUP -m 0600 maclist ${PREFIX}/etc/shorewall2/maclist run_install -o $OWNER -g $GROUP -m 0600 maclist ${PREFIX}/etc/shorewall/maclist
echo echo
echo "MAC list file installed as ${PREFIX}/etc/shorewall2/maclist" echo "MAC list file installed as ${PREFIX}/etc/shorewall/maclist"
fi fi
# #
# Install the Masq file # Install the Masq file
# #
if [ -f ${PREFIX}/etc/shorewall2/masq ]; then if [ -f ${PREFIX}/etc/shorewall/masq ]; then
backup_file /etc/shorewall2/masq backup_file /etc/shorewall/masq
else else
run_install -o $OWNER -g $GROUP -m 0600 masq ${PREFIX}/etc/shorewall2/masq run_install -o $OWNER -g $GROUP -m 0600 masq ${PREFIX}/etc/shorewall/masq
echo echo
echo "Masquerade file installed as ${PREFIX}/etc/shorewall2/masq" echo "Masquerade file installed as ${PREFIX}/etc/shorewall/masq"
fi fi
# #
# Install the Modules file # Install the Modules file
# #
if [ -f ${PREFIX}/etc/shorewall2/modules ]; then if [ -f ${PREFIX}/etc/shorewall/modules ]; then
backup_file /etc/shorewall2/modules backup_file /etc/shorewall/modules
else else
run_install -o $OWNER -g $GROUP -m 0600 modules ${PREFIX}/etc/shorewall2/modules run_install -o $OWNER -g $GROUP -m 0600 modules ${PREFIX}/etc/shorewall/modules
echo echo
echo "Modules file installed as ${PREFIX}/etc/shorewall2/modules" echo "Modules file installed as ${PREFIX}/etc/shorewall/modules"
fi fi
# #
# Install the TC Rules file # Install the TC Rules file
# #
if [ -f ${PREFIX}/etc/shorewall2/tcrules ]; then if [ -f ${PREFIX}/etc/shorewall/tcrules ]; then
backup_file /etc/shorewall2/tcrules backup_file /etc/shorewall/tcrules
else else
run_install -o $OWNER -g $GROUP -m 0600 tcrules ${PREFIX}/etc/shorewall2/tcrules run_install -o $OWNER -g $GROUP -m 0600 tcrules ${PREFIX}/etc/shorewall/tcrules
echo echo
echo "TC Rules file installed as ${PREFIX}/etc/shorewall2/tcrules" echo "TC Rules file installed as ${PREFIX}/etc/shorewall/tcrules"
fi fi
# #
# Install the TOS file # Install the TOS file
# #
if [ -f ${PREFIX}/etc/shorewall2/tos ]; then if [ -f ${PREFIX}/etc/shorewall/tos ]; then
backup_file /etc/shorewall2/tos backup_file /etc/shorewall/tos
else else
run_install -o $OWNER -g $GROUP -m 0600 tos ${PREFIX}/etc/shorewall2/tos run_install -o $OWNER -g $GROUP -m 0600 tos ${PREFIX}/etc/shorewall/tos
echo echo
echo "TOS file installed as ${PREFIX}/etc/shorewall2/tos" echo "TOS file installed as ${PREFIX}/etc/shorewall/tos"
fi fi
# #
# Install the Tunnels file # Install the Tunnels file
# #
if [ -f ${PREFIX}/etc/shorewall2/tunnels ]; then if [ -f ${PREFIX}/etc/shorewall/tunnels ]; then
backup_file /etc/shorewall2/tunnels backup_file /etc/shorewall/tunnels
else else
run_install -o $OWNER -g $GROUP -m 0600 tunnels ${PREFIX}/etc/shorewall2/tunnels run_install -o $OWNER -g $GROUP -m 0600 tunnels ${PREFIX}/etc/shorewall/tunnels
echo echo
echo "Tunnels file installed as ${PREFIX}/etc/shorewall2/tunnels" echo "Tunnels file installed as ${PREFIX}/etc/shorewall/tunnels"
fi fi
# #
# Install the blacklist file # Install the blacklist file
# #
if [ -f ${PREFIX}/etc/shorewall2/blacklist ]; then if [ -f ${PREFIX}/etc/shorewall/blacklist ]; then
backup_file /etc/shorewall2/blacklist backup_file /etc/shorewall/blacklist
else else
run_install -o $OWNER -g $GROUP -m 0600 blacklist ${PREFIX}/etc/shorewall2/blacklist run_install -o $OWNER -g $GROUP -m 0600 blacklist ${PREFIX}/etc/shorewall/blacklist
echo echo
echo "Blacklist file installed as ${PREFIX}/etc/shorewall2/blacklist" echo "Blacklist file installed as ${PREFIX}/etc/shorewall/blacklist"
fi fi
# #
# Backup and remove the whitelist file # Backup and remove the whitelist file
# #
if [ -f ${PREFIX}/etc/shorewall2/whitelist ]; then if [ -f ${PREFIX}/etc/shorewall/whitelist ]; then
backup_file /etc/shorewall2/whitelist backup_file /etc/shorewall/whitelist
rm -f ${PREFIX}/etc/shorewall2/whitelist rm -f ${PREFIX}/etc/shorewall/whitelist
fi fi
# #
# Install the rfc1918 file # Install the rfc1918 file
# #
if [ -f ${PREFIX}/etc/shorewall2/rfc1918 ]; then if [ -f ${PREFIX}/etc/shorewall/rfc1918 ]; then
backup_file /etc/shorewall2/rfc1918 backup_file /etc/shorewall/rfc1918
else else
run_install -o $OWNER -g $GROUP -m 0600 rfc1918 ${PREFIX}/etc/shorewall2/rfc1918 run_install -o $OWNER -g $GROUP -m 0600 rfc1918 ${PREFIX}/etc/shorewall/rfc1918
echo echo
echo "RFC 1918 file installed as ${PREFIX}/etc/shorewall2/rfc1918" echo "RFC 1918 file installed as ${PREFIX}/etc/shorewall/rfc1918"
fi fi
# #
# Install the init file # Install the init file
# #
if [ -f ${PREFIX}/etc/shorewall2/init ]; then if [ -f ${PREFIX}/etc/shorewall/init ]; then
backup_file /etc/shorewall2/init backup_file /etc/shorewall/init
else else
run_install -o $OWNER -g $GROUP -m 0600 init ${PREFIX}/etc/shorewall2/init run_install -o $OWNER -g $GROUP -m 0600 init ${PREFIX}/etc/shorewall/init
echo echo
echo "Init file installed as ${PREFIX}/etc/shorewall2/init" echo "Init file installed as ${PREFIX}/etc/shorewall/init"
fi fi
# #
# Install the start file # Install the start file
# #
if [ -f ${PREFIX}/etc/shorewall2/start ]; then if [ -f ${PREFIX}/etc/shorewall/start ]; then
backup_file /etc/shorewall2/start backup_file /etc/shorewall/start
else else
run_install -o $OWNER -g $GROUP -m 0600 start ${PREFIX}/etc/shorewall2/start run_install -o $OWNER -g $GROUP -m 0600 start ${PREFIX}/etc/shorewall/start
echo echo
echo "Start file installed as ${PREFIX}/etc/shorewall2/start" echo "Start file installed as ${PREFIX}/etc/shorewall/start"
fi fi
# #
# Install the stop file # Install the stop file
# #
if [ -f ${PREFIX}/etc/shorewall2/stop ]; then if [ -f ${PREFIX}/etc/shorewall/stop ]; then
backup_file /etc/shorewall2/stop backup_file /etc/shorewall/stop
else else
run_install -o $OWNER -g $GROUP -m 0600 stop ${PREFIX}/etc/shorewall2/stop run_install -o $OWNER -g $GROUP -m 0600 stop ${PREFIX}/etc/shorewall/stop
echo echo
echo "Stop file installed as ${PREFIX}/etc/shorewall2/stop" echo "Stop file installed as ${PREFIX}/etc/shorewall/stop"
fi fi
# #
# Install the stopped file # Install the stopped file
# #
if [ -f ${PREFIX}/etc/shorewall2/stopped ]; then if [ -f ${PREFIX}/etc/shorewall/stopped ]; then
backup_file /etc/shorewall2/stopped backup_file /etc/shorewall/stopped
else else
run_install -o $OWNER -g $GROUP -m 0600 stopped ${PREFIX}/etc/shorewall2/stopped run_install -o $OWNER -g $GROUP -m 0600 stopped ${PREFIX}/etc/shorewall/stopped
echo echo
echo "Stopped file installed as ${PREFIX}/etc/shorewall2/stopped" echo "Stopped file installed as ${PREFIX}/etc/shorewall/stopped"
fi fi
# #
# Install the ECN file # Install the ECN file
# #
if [ -f ${PREFIX}/etc/shorewall2/ecn ]; then if [ -f ${PREFIX}/etc/shorewall/ecn ]; then
backup_file /etc/shorewall2/ecn backup_file /etc/shorewall/ecn
else else
run_install -o $OWNER -g $GROUP -m 0600 ecn ${PREFIX}/etc/shorewall2/ecn run_install -o $OWNER -g $GROUP -m 0600 ecn ${PREFIX}/etc/shorewall/ecn
echo echo
echo "ECN file installed as ${PREFIX}/etc/shorewall2/ecn" echo "ECN file installed as ${PREFIX}/etc/shorewall/ecn"
fi fi
# #
# Install the Accounting file # Install the Accounting file
# #
if [ -f ${PREFIX}/etc/shorewall2/accounting ]; then if [ -f ${PREFIX}/etc/shorewall/accounting ]; then
backup_file /etc/shorewall2/accounting backup_file /etc/shorewall/accounting
else else
run_install -o $OWNER -g $GROUP -m 0600 accounting ${PREFIX}/etc/shorewall2/accounting run_install -o $OWNER -g $GROUP -m 0600 accounting ${PREFIX}/etc/shorewall/accounting
echo echo
echo "Accounting file installed as ${PREFIX}/etc/shorewall2/accounting" echo "Accounting file installed as ${PREFIX}/etc/shorewall/accounting"
fi fi
# #
# #
# Install the Standard Actions file
#
if [ -f ${PREFIX}/etc/shorewall/actions.std ]; then
backup_file /etc/shorewall/actions.std
else
run_install -o $OWNER -g $GROUP -m 0600 actions.std ${PREFIX}/etc/shorewall/actions.std
echo
echo "Standard actions file installed as ${PREFIX}/etc/shorewall/actions.std"
fi
#
# Install the Actions file # Install the Actions file
# #
if [ -f ${PREFIX}/etc/shorewall2/actions ]; then if [ -f ${PREFIX}/etc/shorewall/actions ]; then
backup_file /etc/shorewall2/actions backup_file /etc/shorewall/actions
else else
run_install -o $OWNER -g $GROUP -m 0600 actions ${PREFIX}/etc/shorewall2/actions run_install -o $OWNER -g $GROUP -m 0600 actions ${PREFIX}/etc/shorewall/actions
echo echo
echo "Actions file installed as ${PREFIX}/etc/shorewall2/actions" echo "Actions file installed as ${PREFIX}/etc/shorewall/actions"
fi fi
# #
# Install the Action files # Install the Action files
# #
for f in action.* ; do for f in action.* ; do
if [ -f ${PREFIX}/etc/shorewall2/$f ]; then if [ -f ${PREFIX}/etc/shorewall/$f ]; then
backup_file /etc/shorewall2/$f backup_file /etc/shorewall/$f
else else
run_install -o $OWNER -g $GROUP -m 0600 $f ${PREFIX}/etc/shorewall2/$f run_install -o $OWNER -g $GROUP -m 0600 $f ${PREFIX}/etc/shorewall/$f
echo echo
echo "Action ${f#*.} file installed as ${PREFIX}/etc/shorewall2/$f" echo "Action ${f#*.} file installed as ${PREFIX}/etc/shorewall/$f"
fi fi
done done
# #
# Backup the version file # Backup the version file
# #
if [ -z "$PREFIX" ]; then if [ -z "$PREFIX" ]; then
if [ -f /usr/share/shorewall2/version ]; then if [ -f /usr/share/shorewall/version ]; then
backup_file /usr/share/shorewall2/version backup_file /usr/share/shorewall/version
fi fi
fi fi
# #
# Create the version file # Create the version file
# #
echo "$VERSION" > ${PREFIX}/usr/share/shorewall2/version echo "$VERSION" > ${PREFIX}/usr/share/shorewall/version
chmod 644 ${PREFIX}/usr/share/shorewall2/version chmod 644 ${PREFIX}/usr/share/shorewall/version
# #
# Remove and create the symbolic link to the init script # Remove and create the symbolic link to the init script
# #
if [ -z "$PREFIX" ]; then if [ -z "$PREFIX" ]; then
rm -f /usr/share/shorewall2/init rm -f /usr/share/shorewall/init
ln -s ${DEST}/${FIREWALL} /usr/share/shorewall2/init ln -s ${DEST}/firewall /usr/share/shorewall/init
fi fi
# #
# Install the firewall script # Install the firewall script
# #
install_file_with_backup firewall ${PREFIX}/usr/share/shorewall2/firewall 0544 install_file_with_backup firewall ${PREFIX}/usr/share/shorewall/firewall 0544
if [ -z "$PREFIX" -a -n "$first_install" ]; then if [ -z "$PREFIX" -a -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then if [ -n "$DEBIAN" ]; then
run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall2 run_install -o $OWNER -g $GROUP -m 0644 default.debian /etc/default/shorewall
ln -s ../init.d/shorewall2 /etc/rcS.d/S40shorewall2 ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
echo echo
echo "Shorewall2 will start automatically at boot" echo "shorewall will start automatically at boot"
echo "Set startup=1 in /etc/default/shorewall2 to enable" echo "Set startup=1 in /etc/default/shorewall to enable"
else else
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if insserv /etc/init.d/shorewalls ; then if insserv /etc/init.d/shorewalls ; then
echo echo
echo "Shorewall2 will start automatically at boot" echo "shorewall will start automatically at boot"
echo "Remove /etc/shorewall2/startup_disabled in /etc/default/shorewall2 to enable" echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
else else
cant_autostart cant_autostart
fi fi
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
if chkconfig --add shorewall2 ; then if chkconfig --add shorewall ; then
echo echo
echo "Shorewall2 will start automatically in run levels as follows:" echo "shorewall will start automatically in run levels as follows:"
echo "Remove /etc/shorewall2/startup_disabled in /etc/default/shorewall2 to enable" echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
chkconfig --list $FIREWALL chkconfig --list shorewall
else else
cant_autostart cant_autostart
fi fi
elif [ -x /sbin/rc-update ]; then elif [ -x /sbin/rc-update ]; then
if rc-update add shorewall2 default; then if rc-update add shorewall default; then
echo echo
echo "Shorewall2 will start automatically at boot" echo "shorewall will start automatically at boot"
echo "Remove /etc/shorewall2/startup_disabled in /etc/default/shorewall2 to enable" echo "Remove /etc/shorewall/startup_disabled in /etc/default/shorewall to enable"
else else
cant_autostart cant_autostart
fi fi
@ -597,7 +605,7 @@ if [ -z "$PREFIX" -a -n "$first_install" ]; then
echo \ echo \
"######################################################################## "########################################################################
# REMOVE THIS FILE AFTER YOU HAVE CONFIGURED SHOREWALL # # REMOVE THIS FILE AFTER YOU HAVE CONFIGURED SHOREWALL #
########################################################################" > /etc/shorewall2/startup_disabled ########################################################################" > /etc/shorewall/startup_disabled
fi fi
fi fi
@ -605,4 +613,4 @@ fi
# Report Success # Report Success
# #
echo echo
echo "Shorewall2 Version $VERSION Installed" echo "shorewall Version $VERSION Installed"

View File

@ -1,4 +1,4 @@
Shorewall 2.0.0-Alpha2 Shorewall 2.0.0-Beta1
This is a major release of Shorewall. During the Alpha and Beta stages, This is a major release of Shorewall. During the Alpha and Beta stages,
the product name is changed to "Shorewall2" so that Shorewall version 1 the product name is changed to "Shorewall2" so that Shorewall version 1

View File

@ -27,7 +27,7 @@
# If an error occurs while starting or restarting the firewall, the # If an error occurs while starting or restarting the firewall, the
# firewall is automatically stopped. # firewall is automatically stopped.
# #
# The firewall uses configuration files in /etc/shorewall2/ - skeleton # The firewall uses configuration files in /etc/shorewall/ - skeleton
# files is included with the firewall. # files is included with the firewall.
# #
# Commands are: # Commands are:
@ -621,7 +621,7 @@ fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
MUTEX_TIMEOUT= MUTEX_TIMEOUT=
SHARED_DIR=/usr/share/shorewall2 SHARED_DIR=/usr/share/shorewall
FIREWALL=$SHARED_DIR/firewall FIREWALL=$SHARED_DIR/firewall
FUNCTIONS=$SHARED_DIR/functions FUNCTIONS=$SHARED_DIR/functions
VERSION_FILE=$SHARED_DIR/version VERSION_FILE=$SHARED_DIR/version
@ -944,7 +944,7 @@ case "$1" in
;; ;;
call) call)
# #
# Undocumented way to call functions in /usr/share/shorewall2/functions directly # Undocumented way to call functions in /usr/share/shorewall/functions directly
# #
shift; shift;
$@ $@

View File

@ -1,6 +1,6 @@
%define name shorewall %define name shorewall
%define version 1.4.9 %define version 2.0.0
%define release 0Beta2 %define release 0Beta1
%define prefix /usr %define prefix /usr
Summary: Shoreline Firewall is an iptables-based firewall for Linux systems. Summary: Shoreline Firewall is an iptables-based firewall for Linux systems.
@ -98,10 +98,36 @@ fi
%attr(0600,root,root) %config(noreplace) /etc/shorewall/stopped %attr(0600,root,root) %config(noreplace) /etc/shorewall/stopped
%attr(0600,root,root) %config(noreplace) /etc/shorewall/ecn %attr(0600,root,root) %config(noreplace) /etc/shorewall/ecn
%attr(0600,root,root) %config(noreplace) /etc/shorewall/accounting %attr(0600,root,root) %config(noreplace) /etc/shorewall/accounting
%attr(0600,root,root) %config(noreplace) /etc/shorewall/usersets %attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowAuth
%attr(0600,root,root) %config(noreplace) /etc/shorewall/users %attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowDNS
%attr(0600,root,root) %config(noreplace) /etc/shorewall/actions %attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowFTP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowIMAP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowNNTP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowNTP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowPing
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowPOP3
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowRdate
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowSMB
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowSMTP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowSNMP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowSSH
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowTelnet
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowTrcrt
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowVNC
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowVNCL*
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.AllowWeb
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.Drop
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.DropDNSrep
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.DropPing
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.DropSMB
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.DropUPnP
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.Reject
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.RejectAuth
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.RejectSMB
%attr(0600,root,root) %config(noreplace) /etc/shorewall/action.template %attr(0600,root,root) %config(noreplace) /etc/shorewall/action.template
%attr(0600,root,root) %config(noreplace) /etc/shorewall/actions
%attr(0600,root,root) %config(noreplace) /etc/shorewall/actions.std
%attr(0544,root,root) /sbin/shorewall %attr(0544,root,root) /sbin/shorewall
%attr(0444,root,root) /usr/share/shorewall/functions %attr(0444,root,root) /usr/share/shorewall/functions
%attr(0544,root,root) /usr/share/shorewall/firewall %attr(0544,root,root) /usr/share/shorewall/firewall
@ -109,6 +135,8 @@ fi
%doc COPYING INSTALL changelog.txt releasenotes.txt tunnel %doc COPYING INSTALL changelog.txt releasenotes.txt tunnel
%changelog %changelog
* Sun Feb 08 2004 Tom Eastep <tom@shorewall.net>
- Updates for Shorewall 2.0.0.
* Mon Dec 29 2003 Tom Eastep <tom@shorewall.net> * Mon Dec 29 2003 Tom Eastep <tom@shorewall.net>
- Remove Documentation from this RPM - Remove Documentation from this RPM
* Sun Dec 28 2003 Tom Eastep <tom@shorewall.net> * Sun Dec 28 2003 Tom Eastep <tom@shorewall.net>

View File

@ -26,7 +26,7 @@
# You may only use this script to uninstall the version # You may only use this script to uninstall the version
# shown below. Simply run this script to remove Seattle Firewall # shown below. Simply run this script to remove Seattle Firewall
VERSION=2.0.0-Alpha2 VERSION=2.0.0-Beta1
usage() # $1 = exit status usage() # $1 = exit status
{ {
@ -60,8 +60,8 @@ remove_file() # $1 = file to restore
fi fi
} }
if [ -f /usr/share/shorewall2/version ]; then if [ -f /usr/share/shorewall/version ]; then
INSTALLED_VERSION="$(cat /usr/share/shorewall2/version)" INSTALLED_VERSION="$(cat /usr/share/shorewall/version)"
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
echo "WARNING: Shorewall Version $INSTALLED_VERSION is installed" echo "WARNING: Shorewall Version $INSTALLED_VERSION is installed"
echo " and this is the $VERSION uninstaller." echo " and this is the $VERSION uninstaller."
@ -72,16 +72,16 @@ else
VERSION="" VERSION=""
fi fi
echo "Uninstalling Shorewall2 $VERSION" echo "Uninstalling shorewall $VERSION"
if qt iptables -L shorewall -n; then if qt iptables -L shorewall -n; then
/sbin/shorewall2 clear /sbin/shorewall clear
fi fi
if [ -L /usr/share/shorewall2/init ]; then if [ -L /usr/share/shorewall/init ]; then
FIREWALL=$(ls -l /usr/share/shorewall2/init | sed 's/^.*> //') FIREWALL=$(ls -l /usr/share/shorewall/init | sed 's/^.*> //')
else else
FIREWALL=/etc/init.d/shorewall2 FIREWALL=/etc/init.d/shorewall
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
@ -97,13 +97,13 @@ if [ -n "$FIREWALL" ]; then
rm -f ${FIREWALL}-*.bkout rm -f ${FIREWALL}-*.bkout
fi fi
rm -f /sbin/shorewall2 rm -f /sbin/shorewall
rm -f /sbin/shorewall2-*.bkout rm -f /sbin/shorewall-*.bkout
rm -rf /etc/shorewall2 rm -rf /etc/shorewall
rm -rf /var/lib/shorewall2 rm -rf /var/lib/shorewall
rm -rf /usr/share/shorewall2 rm -rf /usr/share/shorewall
echo "Shorewall2 Uninstalled" echo "Shorewall Uninstalled"