From 365ca76fe1dce206d53689cad051dfca08f018dc Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 10 Dec 2008 00:33:55 +0000 Subject: [PATCH] installer and init script changes git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8965 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall6-lite/init.debian.sh | 20 +-- Shorewall6-lite/init.sh | 28 ++-- Shorewall6-lite/install.sh | 126 ++++++++--------- Shorewall6-lite/shorewall6-lite.conf | 6 +- Shorewall6-lite/shorewall6-lite.spec | 195 +++++---------------------- Shorewall6-lite/uninstall.sh | 48 +++---- Shorewall6/init.debian.sh | 36 ++--- Shorewall6/init.sh | 30 ++--- 8 files changed, 175 insertions(+), 314 deletions(-) diff --git a/Shorewall6-lite/init.debian.sh b/Shorewall6-lite/init.debian.sh index a6b5fbc36..beb75c075 100755 --- a/Shorewall6-lite/init.debian.sh +++ b/Shorewall6-lite/init.debian.sh @@ -1,23 +1,23 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: shorewall-lite +# Provides: shorewall6-lite # Required-Start: $network # Required-Stop: $network # Default-Start: S # Default-Stop: 0 6 # Short-Description: Configure the firewall at boot time # Description: Configure the firewall according to the rules specified in -# /etc/shorewall-lite +# /etc/shorewall6-lite ### END INIT INFO -SRWL=/sbin/shorewall-lite +SRWL=/sbin/shorewall6-lite SRWL_OPTS="-tvv" # Note, set INITLOG to /dev/null if you do not want to # keep logs of the firewall (not recommended) -INITLOG=/var/log/shorewall-lite-init.log +INITLOG=/var/log/shorewall6-lite-init.log test -x $SRWL || exit 0 test -x $WAIT_FOR_IFUP || exit 0 @@ -49,7 +49,7 @@ not_configured () { then echo "" echo "Please read about Debian specific customization in" - echo "/usr/share/doc/shorewall/README.Debian.gz." + echo "/usr/share/doc/shorewall6-lite/README.Debian.gz." fi echo "#################" exit 0 @@ -63,7 +63,7 @@ then fi # check if shorewall is configured or not -if [ -f "/etc/default/shorewall-lite" ] +if [ -f "/etc/default/shorewall6-lite" ] then . /etc/default/shorewall-lite SRWL_OPTS="$SRWL_OPTS $OPTIONS" @@ -77,7 +77,7 @@ fi # start the firewall shorewall_start () { - echo -n "Starting \"Shorewall firewall\": " + echo -n "Starting \"Shorewall6 Lite firewall\": " $SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } @@ -91,14 +91,14 @@ shorewall_stop () { # restart the firewall shorewall_restart () { - echo -n "Restarting \"Shorewall firewall\": " + echo -n "Restarting \"Shorewall6 Lite firewall\": " $SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } # refresh the firewall shorewall_refresh () { - echo -n "Refreshing \"Shorewall firewall\": " + echo -n "Refreshing \"Shorewall6 Lite firewall\": " $SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } @@ -117,7 +117,7 @@ case "$1" in shorewall_restart ;; *) - echo "Usage: /etc/init.d/shorewall-lite {start|stop|refresh|restart|force-reload}" + echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload}" exit 1 esac diff --git a/Shorewall6-lite/init.sh b/Shorewall6-lite/init.sh index 60e53e5b7..17a01bb2e 100755 --- a/Shorewall6-lite/init.sh +++ b/Shorewall6-lite/init.sh @@ -29,19 +29,19 @@ RCDLINKS="2,S41 3,S41 6,K41" # # Commands are: # -# shorewall start Starts the firewall -# shorewall restart Restarts the firewall -# shorewall reload Reload the firewall -# (same as restart) -# shorewall stop Stops the firewall -# shorewall status Displays firewall status +# 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 # # chkconfig: 2345 25 90 # description: Packet filtering firewall ### BEGIN INIT INFO -# Provides: shorewall-lite +# Provides: shorewall6-lite # Required-Start: $network # Required-Stop: # Default-Start: 2 3 5 @@ -61,10 +61,10 @@ usage() { # Get startup options (override default) ################################################################################ OPTIONS= -if [ -f /etc/sysconfig/shorewall ]; then - . /etc/sysconfig/shorewall -elif [ -f /etc/default/shorewall ] ; then - . /etc/default/shorewall +if [ -f /etc/sysconfig/shorewall6-lite ]; then + . /etc/sysconfig/shorewall6-lite +elif [ -f /etc/default/shorewall6-lite ] ; then + . /etc/default/shorewall6-lite fi ################################################################################ @@ -74,14 +74,14 @@ command="$1" case "$command" in start) - exec /sbin/shorewall-lite $OPTIONS $@ + exec /sbin/shorewall6-lite $OPTIONS $@ ;; stop|restart|status) - exec /sbin/shorewall-lite $@ + exec /sbin/shorewall6-lite $@ ;; reload) shift - exec /sbin/shorewall-lite restart $@ + exec /sbin/shorewall6-lite restart $@ ;; *) usage diff --git a/Shorewall6-lite/install.sh b/Shorewall6-lite/install.sh index a0dfe7e01..e0afc793c 100755 --- a/Shorewall6-lite/install.sh +++ b/Shorewall6-lite/install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Script to install Shoreline Firewall Lite +# Script to install Shoreline Firewall 6 Lite # # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # @@ -22,7 +22,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -VERSION=4.2.1 +VERSION=4.3.0 usage() # $1 = exit status { @@ -73,7 +73,7 @@ run_install() cant_autostart() { echo - echo "WARNING: Unable to configure shorewall to start automatically at boot" >&2 + echo "WARNING: Unable to configure shorewall6-lite to start automatically at boot" >&2 } backup_directory() # $1 = directory to backup @@ -142,7 +142,7 @@ if [ -z "$DEST" ] ; then fi if [ -z "$INIT" ] ; then - INIT="shorewall-lite" + INIT="shorewall6-lite" fi if [ -z "$RUNLEVELS" ] ; then @@ -165,7 +165,7 @@ while [ $# -gt 0 ] ; do usage 0 ;; -v) - echo "Shorewall Lite Firewall Installer Version $VERSION" + echo "Shorewall6 Lite Firewall Installer Version $VERSION" exit 0 ;; -n) @@ -203,7 +203,7 @@ elif [ -f /etc/slackware-version ] ; then INIT="rc.firewall" elif [ -f /etc/arch-release ] ; then DEST="/etc/rc.d" - INIT="shorewall-lite" + INIT="shorewall6-lite" ARCHLINUX=yes fi @@ -212,122 +212,122 @@ fi # cd "$(dirname $0)" -echo "Installing Shorewall Lite Version $VERSION" +echo "Installing Shorewall6 Lite Version $VERSION" # # First do Backups # # -# Check for /etc/shorewall-lite +# Check for /etc/shorewall6-lite # -if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then +if [ -z "$PREFIX" -a -d /etc/shorewall6-lite ]; then first_install="" if [ -z "$NOBACKUP" ]; then - backup_directory /etc/shorewall-lite - backup_directory /usr/share/shorewall-lite - backup_directory /var/lib/shorewall-lite + backup_directory /etc/shorewall6-lite + backup_directory /usr/share/shorewall6-lite + backup_directory /var/lib/shorewall6-lite fi - [ -f /etc/shorewall-lite/shorewall.conf ] && \ - mv -f /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall-lite.conf + [ -f /etc/shorewall6-lite/shorewall.conf ] && \ + mv -f /etc/shorewall6-lite/shorewall.conf /etc/shorewall6-lite/shorewall6-lite.conf else first_install="Yes" - rm -rf ${PREFIX}/etc/shorewall-lite - rm -rf ${PREFIX}/usr/share/shorewall-lite - rm -rf ${PREFIX}/var/lib/shorewall-lite + rm -rf ${PREFIX}/etc/shorewall6-lite + rm -rf ${PREFIX}/usr/share/shorewall6-lite + rm -rf ${PREFIX}/var/lib/shorewall6-lite fi -delete_file ${PREFIX}/usr/share/shorewall-lite/xmodules +delete_file ${PREFIX}/usr/share/shorewall6-lite/xmodules -install_file_with_backup shorewall-lite ${PREFIX}/sbin/shorewall-lite 0544 ${PREFIX}/var/lib/shorewall-lite-${VERSION}.bkout +install_file_with_backup shorewall6-lite ${PREFIX}/sbin/shorewall6-lite 0544 ${PREFIX}/var/lib/shorewall6-lite-${VERSION}.bkout -echo "Shorewall Lite control program installed in ${PREFIX}/sbin/shorewall-lite" +echo "Shorewall6 Lite control program installed in ${PREFIX}/sbin/shorewall6-lite" # # Install the Firewall Script # if [ -n "$DEBIAN" ]; then - install_file_with_backup init.debian.sh /etc/init.d/shorewall-lite 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout + install_file_with_backup init.debian.sh /etc/init.d/shorewall6-lite 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout elif [ -n "$ARCHLINUX" ]; then - install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout + install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout else - install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout + install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout fi -echo "Shorewall Lite script installed in ${PREFIX}${DEST}/$INIT" +echo "Shorewall6 Lite script installed in ${PREFIX}${DEST}/$INIT" # -# Create /etc/shorewall-lite, /usr/share/shorewall-lite and /var/lib/shorewall-lite if needed +# Create /etc/shorewall6-lite, /usr/share/shorewall6-lite and /var/lib/shorewall6-lite if needed # -mkdir -p ${PREFIX}/etc/shorewall-lite -mkdir -p ${PREFIX}/usr/share/shorewall-lite -mkdir -p ${PREFIX}/var/lib/shorewall-lite +mkdir -p ${PREFIX}/etc/shorewall6-lite +mkdir -p ${PREFIX}/usr/share/shorewall6-lite +mkdir -p ${PREFIX}/var/lib/shorewall6-lite -chmod 755 ${PREFIX}/etc/shorewall-lite -chmod 755 ${PREFIX}/usr/share/shorewall-lite +chmod 755 ${PREFIX}/etc/shorewall6-lite +chmod 755 ${PREFIX}/usr/share/shorewall6-lite # # Install the config file # -if [ ! -f ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf ]; then - run_install $OWNERSHIP -m 0744 shorewall-lite.conf ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf - echo "Config file installed as ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf" +if [ ! -f ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf ]; then + run_install $OWNERSHIP -m 0744 shorewall6-lite.conf ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf + echo "Config file installed as ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf" fi if [ -n "$ARCHLINUX" ] ; then - sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall-lite/shorewall.conf + sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall6-lite/shorewall.conf fi # # Install the Makefile # -run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall-lite/Makefile -echo "Makefile installed as ${PREFIX}/etc/shorewall-lite/Makefile" +run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall6-lite/Makefile +echo "Makefile installed as ${PREFIX}/etc/shorewall6-lite/Makefile" # # Install the default config path file # -install_file configpath ${PREFIX}/usr/share/shorewall-lite/configpath 0644 -echo "Default config path file installed as ${PREFIX}/usr/share/shorewall-lite/configpath" +install_file configpath ${PREFIX}/usr/share/shorewall6-lite/configpath 0644 +echo "Default config path file installed as ${PREFIX}/usr/share/shorewall6-lite/configpath" # # Install the libraries # for f in lib.* ; do if [ -f $f ]; then - install_file $f ${PREFIX}/usr/share/shorewall-lite/$f 0644 - echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall-lite/$f" + install_file $f ${PREFIX}/usr/share/shorewall6-lite/$f 0644 + echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6-lite/$f" fi done -ln -sf lib.base ${PREFIX}/usr/share/shorewall-lite/functions +ln -sf lib.base ${PREFIX}/usr/share/shorewall6-lite/functions -echo "Common functions linked through ${PREFIX}/usr/share/shorewall-lite/functions" +echo "Common functions linked through ${PREFIX}/usr/share/shorewall6-lite/functions" # # Install Shorecap # -install_file shorecap ${PREFIX}/usr/share/shorewall-lite/shorecap 0755 +install_file shorecap ${PREFIX}/usr/share/shorewall6-lite/shorecap 0755 echo -echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall-lite/shorecap" +echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall6-lite/shorecap" # # Install wait4ifup # -install_file wait4ifup ${PREFIX}/usr/share/shorewall-lite/wait4ifup 0755 +install_file wait4ifup ${PREFIX}/usr/share/shorewall6-lite/wait4ifup 0755 echo -echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall-lite/wait4ifup" +echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall6-lite/wait4ifup" # # Install the Modules file # -run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall-lite/modules -echo "Modules file installed as ${PREFIX}/usr/share/shorewall-lite/modules" +run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall6-lite/modules +echo "Modules file installed as ${PREFIX}/usr/share/shorewall6-lite/modules" # # Install the Man Pages @@ -354,40 +354,40 @@ echo "Man Pages Installed" # # Create the version file # -echo "$VERSION" > ${PREFIX}/usr/share/shorewall-lite/version -chmod 644 ${PREFIX}/usr/share/shorewall-lite/version +echo "$VERSION" > ${PREFIX}/usr/share/shorewall6-lite/version +chmod 644 ${PREFIX}/usr/share/shorewall6-lite/version # # Remove and create the symbolic link to the init script # if [ -z "$PREFIX" ]; then - rm -f /usr/share/shorewall-lite/init - ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init + rm -f /usr/share/shorewall6-lite/init + ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init fi if [ -z "$PREFIX" -a -n "$first_install" ]; then if [ -n "$DEBIAN" ]; then - run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite - ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite - echo "Shorewall Lite will start automatically at boot" + run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite + ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite + echo "Shorewall6 Lite will start automatically at boot" touch /var/log/shorewall-init.log else if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then - if insserv /etc/init.d/shorewall-lite ; then - echo "Shorewall Lite will start automatically at boot" + if insserv /etc/init.d/shorewall6-lite ; then + echo "Shorewall6 Lite will start automatically at boot" else cant_autostart fi elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then - if chkconfig --add shorewall-lite ; then - echo "Shorewall Lite will start automatically in run levels as follows:" - chkconfig --list shorewall-lite + if chkconfig --add shorewall6-lite ; then + echo "Shorewall6 Lite will start automatically in run levels as follows:" + chkconfig --list shorewall6-lite else cant_autostart fi elif [ -x /sbin/rc-update ]; then - if rc-update add shorewall-lite default; then - echo "Shorewall Lite will start automatically at boot" + if rc-update add shorewall6-lite default; then + echo "Shorewall6 Lite will start automatically at boot" else cant_autostart fi @@ -400,4 +400,4 @@ fi # # Report Success # -echo "shorewall Lite Version $VERSION Installed" +echo "shorewall6 Lite Version $VERSION Installed" diff --git a/Shorewall6-lite/shorewall6-lite.conf b/Shorewall6-lite/shorewall6-lite.conf index df37ce7b9..28645c05f 100644 --- a/Shorewall6-lite/shorewall6-lite.conf +++ b/Shorewall6-lite/shorewall6-lite.conf @@ -1,5 +1,5 @@ ############################################################################### -# /etc/shorewall-lite/shorewall-lite.conf Version 4 - Change the following +# /etc/shorewall6-lite/shorewall-lite.conf Version 4 - Change the following # variables to override the values in the shorewall.conf file used to # compile /var/lib/shorewall-lite/firewall. Those values may be found in # /var/lib/shorewall-lite/firewall.conf. @@ -8,7 +8,7 @@ # # This file should be placed in /etc/shorewall-lite # -# (c) 2006,2007 - Tom Eastep (teastep@shorewall.net) +# (c) 2006,2007,2008 - Tom Eastep (teastep@shorewall.net) # ############################################################################### # N 0 T E @@ -36,7 +36,7 @@ LOGFORMAT= # L O C A T I O N O F F I L E S A N D D I R E C T O R I E S ############################################################################### -IPTABLES= +IP6TABLES= PATH= diff --git a/Shorewall6-lite/shorewall6-lite.spec b/Shorewall6-lite/shorewall6-lite.spec index 1ee6b99b5..73db1bddc 100644 --- a/Shorewall6-lite/shorewall6-lite.spec +++ b/Shorewall6-lite/shorewall6-lite.spec @@ -1,8 +1,8 @@ -%define name shorewall-lite -%define version 4.2.1 +%define name shorewall6-lite +%define version 4.3.0 %define release 0base -Summary: Shoreline Firewall Lite is an iptables-based firewall for Linux systems. +Summary: Shoreline Firewall 6 Lite is an ip6tables-based firewall for Linux systems. Name: %{name} Version: %{version} Release: %{release} @@ -17,12 +17,12 @@ Requires: iptables iproute %description -The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter -(iptables) based firewall that can be used on a dedicated firewall system, +The Shoreline Firewall 6, more commonly known as "Shorewall6", is a Netfilter +(ip6tables) based firewall that can be used on a dedicated firewall system, a multi-function gateway/ router/server or on a standalone GNU/Linux system. -Shorewall Lite is a companion product to Shorewall that allows network -administrators to centralize the configuration of Shorewall-based firewalls. +Shorewall Lite is a companion product to Shorewall6 that allows network +administrators to centralize the configuration of Shorewall6-based firewalls. %prep @@ -41,184 +41,57 @@ rm -rf $RPM_BUILD_ROOT %pre -if [ -f /etc/shorewall-lite/shorewall.conf ]; then - cp -fa /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall.conf.rpmsave -fi - %post if [ $1 -eq 1 ]; then if [ -x /sbin/insserv ]; then - /sbin/insserv /etc/rc.d/shorewall-lite + /sbin/insserv /etc/rc.d/shorewall6-lite elif [ -x /sbin/chkconfig ]; then - /sbin/chkconfig --add shorewall-lite; + /sbin/chkconfig --add shorewall6-lite; fi -elif [ -f /etc/shorewall-lite/shorewall.conf.rpmsave ]; then - mv -f /etc/shorewall-lite/shorewall-lite.conf /etc/shorewall-lite/shorewall-lite.conf.rpmnew - mv -f /etc/shorewall-lite/shorewall.conf.rpmsave /etc/shorewall-lite/shorewall-lite.conf - echo "/etc/shorewall-lite/shorewall.conf retained as /etc/shorewall-lite/shorewall-lite.conf" - echo "/etc/shorewall-lite/shorewall-lite.conf installed as /etc/shorewall-lite/shorewall-lite.conf.rpmnew" +elif [ -f /etc/shorewall6-lite/shorewall.conf.rpmsave ]; then + mv -f /etc/shorewall6-lite/shorewall6-lite.conf /etc/shorewall6-lite/shorewall6-lite.conf.rpmnew + mv -f /etc/shorewall6-lite/shorewall.conf.rpmsave /etc/shorewall6-lite/shorewall6-lite.conf + echo "/etc/shorewall6-lite/shorewall.conf retained as /etc/shorewall6-lite/shorewall6-lite.conf" + echo "/etc/shorewall6-lite/shorewall6-lite.conf installed as /etc/shorewall6-lite/shorewall6-lite.conf.rpmnew" fi %preun if [ $1 -eq 0 ]; then if [ -x /sbin/insserv ]; then - /sbin/insserv -r /etc/init.d/shorewall-lite + /sbin/insserv -r /etc/init.d/shorewall6-lite elif [ -x /sbin/chkconfig ]; then - /sbin/chkconfig --del shorewall-lite + /sbin/chkconfig --del shorewall6-lite fi fi %files %defattr(0644,root,root,0755) -%attr(0755,root,root) %dir /etc/shorewall-lite -%attr(0644,root,root) %config(noreplace) /etc/shorewall-lite/shorewall-lite.conf -%attr(0644,root,root) /etc/shorewall-lite/Makefile -%attr(0544,root,root) /etc/init.d/shorewall-lite -%attr(0755,root,root) %dir /usr/share/shorewall-lite -%attr(0700,root,root) %dir /var/lib/shorewall-lite +%attr(0755,root,root) %dir /etc/shorewall6-lite +%attr(0644,root,root) %config(noreplace) /etc/shorewall6-lite/shorewall6-lite.conf +%attr(0644,root,root) /etc/shorewall6-lite/Makefile +%attr(0544,root,root) /etc/init.d/shorewall6-lite +%attr(0755,root,root) %dir /usr/share/shorewall6-lite +%attr(0700,root,root) %dir /var/lib/shorewall6-lite -%attr(0755,root,root) /sbin/shorewall-lite +%attr(0755,root,root) /sbin/shorewall6-lite -%attr(0644,root,root) /usr/share/shorewall-lite/version -%attr(0644,root,root) /usr/share/shorewall-lite/configpath -%attr(- ,root,root) /usr/share/shorewall-lite/functions -%attr(0644,root,root) /usr/share/shorewall-lite/lib.base -%attr(0644,root,root) /usr/share/shorewall-lite/lib.cli -%attr(0644,root,root) /usr/share/shorewall-lite/modules -%attr(0544,root,root) /usr/share/shorewall-lite/shorecap -%attr(0755,root,root) /usr/share/shorewall-lite/wait4ifup +%attr(0644,root,root) /usr/share/shorewall6-lite/version +%attr(0644,root,root) /usr/share/shorewall6-lite/configpath +%attr(- ,root,root) /usr/share/shorewall6-lite/functions +%attr(0644,root,root) /usr/share/shorewall6-lite/lib.base +%attr(0644,root,root) /usr/share/shorewall6-lite/lib.cli +%attr(0644,root,root) /usr/share/shorewall6-lite/modules +%attr(0544,root,root) /usr/share/shorewall6-lite/shorecap +%attr(0755,root,root) /usr/share/shorewall6-lite/wait4ifup -%attr(0644,root,root) %{_mandir}/man5/shorewall-lite.conf.5.gz -%attr(0644,root,root) %{_mandir}/man5/shorewall-lite-vardir.5.gz - -%attr(0644,root,root) %{_mandir}/man8/shorewall-lite.8.gz +%attr(0644,root,root) %{_mandir}/man8/shorewall6-lite.8.gz %doc COPYING changelog.txt releasenotes.txt %changelog -* Wed Oct 08 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.1-0base -* Fri Oct 03 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0base -* Tue Sep 23 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0RC4 -* Mon Sep 15 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0RC3 -* Mon Sep 08 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0RC2 -* Tue Aug 19 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0RC1 -* Thu Jul 03 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0Beta3 -* Mon Jun 02 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0Beta2 -* Wed May 07 2008 Tom Eastep tom@shorewall.net -- Updated to 4.2.0-0Beta1 -* Mon Apr 28 2008 Tom Eastep tom@shorewall.net -- Updated to 4.1.8-0base -* Mon Mar 24 2008 Tom Eastep tom@shorewall.net -- Updated to 4.1.7-0base -* Thu Mar 13 2008 Tom Eastep tom@shorewall.net -- Updated to 4.1.6-0base -* Tue Feb 05 2008 Tom Eastep tom@shorewall.net -- Updated to 4.1.5-0base -* Fri Jan 04 2008 Tom Eastep tom@shorewall.net -- Updated to 4.1.4-0base -* Wed Dec 12 2007 Tom Eastep tom@shorewall.net -- Updated to 4.1.3-0base -* Fri Dec 07 2007 Tom Eastep tom@shorewall.net -- Updated to 4.1.3-1 -* Tue Nov 27 2007 Tom Eastep tom@shorewall.net -- Updated to 4.1.2-1 -* Wed Nov 21 2007 Tom Eastep tom@shorewall.net -- Updated to 4.1.1-1 -* Mon Nov 19 2007 Tom Eastep tom@shorewall.net -- Updated to 4.1.0-1 -* Thu Nov 15 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.6-1 -* Sat Nov 10 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.6-0RC3 -* Wed Nov 07 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.6-0RC2 -* Thu Oct 25 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.6-0RC1 -* Tue Oct 03 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.5-1 -* Wed Sep 05 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.4-1 -* Mon Aug 13 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.3-1 -* Thu Aug 09 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.2-1 -* Sat Jul 21 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.1-1 -* Wed Jul 11 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-1 -* Sun Jul 08 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0RC2 -* Mon Jul 02 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0RC1 -* Sun Jun 24 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta7 -* Wed Jun 20 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta6 -* Thu Jun 14 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta5 -* Fri Jun 08 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta4 -* Tue Jun 05 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta3 -* Tue May 15 2007 Tom Eastep tom@shorewall.net -- Updated to 4.0.0-0Beta1 -* Fri May 11 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.7-1 -* Sat May 05 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.6-1 -* Mon Apr 30 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.5-1 -* Mon Apr 23 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.4-1 -* Wed Apr 18 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.3-1 -* Sat Apr 14 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.2-1 -* Sat Apr 07 2007 Tom Eastep tom@shorewall.net -- Updated to 3.9.1-1 -* Thu Mar 15 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.1-1 -* Sat Mar 10 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-1 -* Sun Feb 25 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0RC3 -* Sun Feb 04 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0RC2 -* Wed Jan 24 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0RC1 -* Mon Jan 22 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0Beta3 -* Wed Jan 03 2007 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0Beta2 -- Handle rename of shorewall.conf -* Thu Dec 14 2006 Tom Eastep tom@shorewall.net -- Updated to 3.4.0-0Beta1 -* Sat Nov 25 2006 Tom Eastep tom@shorewall.net -- Added shorewall-exclusion(5) -- Updated to 3.3.6-1 -* Sun Nov 19 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.5-1 -* Sun Oct 29 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.4-1 -* Mon Oct 16 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.3-1 -* Sat Sep 30 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.2-1 -* Wed Aug 30 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.1-1 -* Wed Aug 09 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.0-1 -* Wed Aug 09 2006 Tom Eastep tom@shorewall.net -- Updated to 3.3.0-1 +* Tue Dec 09 2008 Tom Eastep tom@shorewall.net +- Initial Version diff --git a/Shorewall6-lite/uninstall.sh b/Shorewall6-lite/uninstall.sh index 5916160a0..c810e882b 100755 --- a/Shorewall6-lite/uninstall.sh +++ b/Shorewall6-lite/uninstall.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Script to back uninstall Shoreline Firewall +# Script to back uninstall Shoreline Firewall 6 Lite # # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # @@ -26,7 +26,7 @@ # You may only use this script to uninstall the version # shown below. Simply run this script to remove Shorewall Firewall -VERSION=4.2.1 +VERSION=4.3.0 usage() # $1 = exit status { @@ -40,18 +40,6 @@ qt() "$@" >/dev/null 2>&1 } -restore_file() # $1 = file to restore -{ - if [ -f ${1}-shorewall.bkout ]; then - if (mv -f ${1}-shorewall-lite.bkout $1); then - echo - echo "$1 restored" - else - exit 1 - fi - fi -} - remove_file() # $1 = file to restore { if [ -f $1 -o -L $1 ] ; then @@ -60,8 +48,8 @@ remove_file() # $1 = file to restore fi } -if [ -f /usr/share/shorewall-lite/version ]; then - INSTALLED_VERSION="$(cat /usr/share/shorewall-lite/version)" +if [ -f /usr/share/shorewall6-lite/version ]; then + INSTALLED_VERSION="$(cat /usr/share/shorewall6-lite/version)" if [ "$INSTALLED_VERSION" != "$VERSION" ]; then echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed" echo " and this is the $VERSION uninstaller." @@ -74,14 +62,14 @@ fi echo "Uninstalling Shorewall Lite $VERSION" -if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall ]; then - /sbin/shorewall-lite clear +if qt ip6tables -L shorewall -n && [ ! -f /sbin/shorewall6 ]; then + /sbin/shorewall6-lite clear fi -if [ -L /usr/share/shorewall-lite/init ]; then - FIREWALL=$(ls -l /usr/share/shorewall-lite/init | sed 's/^.*> //') +if [ -L /usr/share/shorewall6-lite/init ]; then + FIREWALL=$(ls -l /usr/share/shorewall6-lite/init | sed 's/^.*> //') else - FIREWALL=/etc/init.d/shorewall-lite + FIREWALL=/etc/init.d/shorewall6-lite fi if [ -n "$FIREWALL" ]; then @@ -97,16 +85,16 @@ if [ -n "$FIREWALL" ]; then rm -f ${FIREWALL}-*.bkout fi -rm -f /sbin/shorewall-lite -rm -f /sbin/shorewall-lite-*.bkout +rm -f /sbin/shorewall6-lite +rm -f /sbin/shorewall6-lite-*.bkout -rm -rf /etc/shorewall-lite -rm -rf /etc/shorewall-lite-*.bkout -rm -rf /var/lib/shorewall-lite -rm -rf /var/lib/shorewall-lite-*.bkout -rm -rf /usr/share/shorewall-lite -rm -rf /usr/share/shorewall-lite-*.bkout +rm -rf /etc/shorewall6-lite +rm -rf /etc/shorewall6-lite-*.bkout +rm -rf /var/lib/shorewall6-lite +rm -rf /var/lib/shorewall6-lite-*.bkout +rm -rf /usr/share/shorewall6-lite +rm -rf /usr/share/shorewall6-lite-*.bkout -echo "Shorewall Uninstalled" +echo "Shorewall6 Lite Uninstalled" diff --git a/Shorewall6/init.debian.sh b/Shorewall6/init.debian.sh index 7f5667c85..9d9994ddf 100755 --- a/Shorewall6/init.debian.sh +++ b/Shorewall6/init.debian.sh @@ -1,18 +1,18 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: shorewall +# Provides: shorewall6 # Required-Start: $network # Required-Stop: $network # Default-Start: S # Default-Stop: 0 6 # Short-Description: Configure the firewall at boot time # Description: Configure the firewall according to the rules specified in -# /etc/shorewall +# /etc/shorewall6 ### END INIT INFO -SRWL=/sbin/shorewall +SRWL=/sbin/shorewall6 SRWL_OPTS="-tvv" WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup # Note, set INITLOG to /dev/null if you do not want to @@ -28,7 +28,7 @@ test -n $INITLOG || { if [ "$(id -u)" != "0" ] then - echo "You must be root to start, stop or restart \"Shorewall firewall\"." + echo "You must be root to start, stop or restart \"Shorewall6 firewall\"." exit 1 fi @@ -49,14 +49,14 @@ not_configured () { then echo "" echo "Please read about Debian specific customization in" - echo "/usr/share/doc/shorewall-common/README.Debian.gz." + echo "/usr/share/doc/shorewall6/README.Debian.gz." fi echo "#################" exit 0 } # check if shorewall is configured or not -if [ -f "/etc/default/shorewall" ] +if [ -f "/etc/default/shorewall6" ] then . /etc/default/shorewall SRWL_OPTS="$SRWL_OPTS $OPTIONS" @@ -80,49 +80,49 @@ wait_for_pppd () { } # start the firewall -shorewall_start () { - echo -n "Starting \"Shorewall firewall\": " +shorewall6_start () { + echo -n "Starting \"Shorewall6 firewall\": " wait_for_pppd $SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } # stop the firewall -shorewall_stop () { +shorewall6_stop () { echo -n "Stopping \"Shorewall firewall\": " $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } # restart the firewall -shorewall_restart () { - echo -n "Restarting \"Shorewall firewall\": " +shorewall6_restart () { + echo -n "Restarting \"Shorewall6 firewall\": " $SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } # refresh the firewall -shorewall_refresh () { - echo -n "Refreshing \"Shorewall firewall\": " +shorewall6_refresh () { + echo -n "Refreshing \"Shorewall6 firewall\": " $SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone return 0 } case "$1" in start) - shorewall_start + shorewall6_start ;; stop) - shorewall_stop + shorewall6_stop ;; refresh) - shorewall_refresh + shorewall6_refresh ;; force-reload|restart) - shorewall_restart + shorewall6_restart ;; *) - echo "Usage: /etc/init.d/shorewall {start|stop|refresh|restart|force-reload}" + echo "Usage: /etc/init.d/shorewall6 {start|stop|refresh|restart|force-reload}" exit 1 esac diff --git a/Shorewall6/init.sh b/Shorewall6/init.sh index c3956d2d2..9ccd55b50 100755 --- a/Shorewall6/init.sh +++ b/Shorewall6/init.sh @@ -1,7 +1,7 @@ #!/bin/sh RCDLINKS="2,S41 3,S41 6,K41" # -# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.2 +# The Shoreline Firewall (Shorewall6) Packet Filtering Firewall - V4.4 # # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # @@ -29,25 +29,25 @@ RCDLINKS="2,S41 3,S41 6,K41" # # Commands are: # -# shorewall start Starts the firewall -# shorewall restart Restarts the firewall -# shorewall reload Reload the firewall +# shorewall6 start Starts the firewall +# shorewall6 restart Restarts the firewall +# shorewall6 reload Reload the firewall # (same as restart) -# shorewall stop Stops the firewall -# shorewall status Displays firewall status +# shorewall6 stop Stops the firewall +# shorewall6 status Displays firewall status # # chkconfig: 2345 25 90 # description: Packet filtering firewall ### BEGIN INIT INFO -# Provides: shorewall +# Provides: shorewall6 # Required-Start: $local_fs $remote_fs $syslog # Should-Start: VMware $time $named # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: 0 1 6 -# Description: starts and stops the shorewall firewall +# Description: starts and stops the shorewall6 firewall ### END INIT INFO ################################################################################ @@ -62,10 +62,10 @@ usage() { # Get startup options (override default) ################################################################################ OPTIONS="-v0" -if [ -f /etc/sysconfig/shorewall ]; then - . /etc/sysconfig/shorewall -elif [ -f /etc/default/shorewall ] ; then - . /etc/default/shorewall +if [ -f /etc/sysconfig/shorewall6 ]; then + . /etc/sysconfig/shorewall6 +elif [ -f /etc/default/shorewall6 ] ; then + . /etc/default/shorewall6 fi ################################################################################ @@ -75,14 +75,14 @@ command="$1" case "$command" in start|restart|stop) - exec /sbin/shorewall $OPTIONS $@ + exec /sbin/shorewall6 $OPTIONS $@ ;; stop|restart|status) - exec /sbin/shorewall $@ + exec /sbin/shorewall6 $@ ;; reload) shift - exec /sbin/shorewall $OPTIONS restart $@ + exec /sbin/shorewall6 $OPTIONS restart $@ ;; *) usage