Shorewall Installation and Upgrade

Tom Eastep

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover, and with no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

2004-03-01


Table of Contents

Install using RPM
Install using tarball
Install the .lrp
Upgrade using RPM
Upgrade using tarball
Upgrade the .lrp
Configuring Shorewall
Uninstall/Fallback

Install using RPM

Important

Before attempting installation, I strongly urge you to read and print a copy of the Shorewall QuickStart Guide for the configuration that most closely matches your own.

Warning

If you have RedHat 7.2 and are running iptables version 1.2.3 (at a shell prompt, type “/sbin/iptables --version”), you must upgrade to version 1.2.4 either from the RedHat update site or from the Shorewall Errata page before attempting to start Shorewall.

To install Shorewall using the RPM:

  1. Install the RPM

    rpm -ivh <shorewall rpm>

    Note

    Some SuSE users have encountered a problem whereby rpm reports a conflict with kernel <= 2.2 even though a 2.4 kernel is installed. If this happens, simply use the --nodeps option to rpm.

    rpm -ivh --nodeps <shorewall rpm>

    Note

    Beginning with Shorewall 1.4.0, Shorewall is dependent on the iproute package. Unfortunately, some distributions call this package iproute2 which will cause the installation of Shorewall to fail with the diagnostic:

    error: failed dependencies:iproute is needed by shorewall-1.4.x-1

    This may be worked around by using the --nodeps option of rpm.

    rpm -ivh --nodeps <shorewall rpm>
  2. Edit the configuration files to match your configuration.

    Warning

    YOU CAN NOT SIMPLY INSTALL THE RPM AND ISSUE A “shorewall start” COMMAND. SOME CONFIGURATION IS REQUIRED BEFORE THE FIREWALL WILL START. IF YOU ISSUE A “start” COMMAND AND THE FIREWALL FAILS TO START, YOUR SYSTEM WILL NO LONGER ACCEPT ANY NETWORK TRAFFIC. IF THIS HAPPENS, ISSUE A “shorewall clear” COMMAND TO RESTORE NETWORK CONNECTIVITY.

  3. Start the firewall by typing

    shorewall start

Install using tarball

Important

Before attempting installation, I strongly urge you to read and print a copy of the Shorewall QuickStart Guide for the configuration that most closely matches your own.

To install Shorewall using the tarball and install script:

  1. unpack the tarball (tar -zxf shorewall-x.y.z.tgz).

  2. cd to the shorewall directory (the version is encoded in the directory name as in “shorewall-1.1.10”).

  3. If you are using Caldera, RedHat, Mandrake, Corel, SuSe, Slackware or Debian/Gentoo then type

    ./install.sh
  4. Edit the configuration files to match your configuration.

  5. Enable Startup by removing /etc/shorewall/startup_disabled (Debian users will edit /etc/default/shorewall and set startup=1).

  6. Start the firewall by typing

    shorewall start
  7. If the install script was unable to configure Shorewall to be started automatically at boot, see these instructions.

Install the .lrp

Important

Before attempting installation, I strongly urge you to read and print a copy of the Shorewall QuickStart Guide for the configuration that most closely matches your own.

To install my version of Shorewall on a fresh Bering disk, simply replace the “shorwall.lrp” file on the image with the file that you downloaded. See the two-interface QuickStart Guide for information about further steps required.

Upgrade using RPM

Important

Before upgrading, be sure to review the Upgrade Issues.

If you already have the Shorewall RPM installed and are upgrading to a new version:

Important

If you are upgrading from a 1.2 version of Shorewall to a 1.4 version or and you have entries in the /etc/shorewall/hosts file then please check your /etc/shorewall/interfaces file to be sure that it contains an entry for each interface mentioned in the hosts file. Also, there are certain 1.2 rule forms that are no longer supported under 1.4 (you must use the new 1.4 syntax). See the upgrade issues for details.

  1. Upgrade the RPM

    rpm -Uvh <shorewall rpm file>

    Note

    Some SuSE users have encountered a problem whereby rpm reports a conflict with kernel <= 2.2 even though a 2.4 kernel is installed. If this happens, simply use the --nodeps option to rpm.

    rpm -Uvh --nodeps <shorewall rpm>

    Note

    Beginning with Shorewall 1.4.0, Shorewall is dependent on the iproute package. Unfortunately, some distributions call this package iproute2 which will cause the upgrade of Shorewall to fail with the diagnostic:

    error: failed dependencies:iproute is needed by shorewall-1.4.0-1

    This may be worked around by using the --nodeps option of rpm.

    rpm -Uvh --nodeps <shorewall rpm>
  2. See if there are any incompatibilities between your configuration and the new Shorewall version and correct as necessary.

    shorewall check
  3. Restart the firewall.

    shorewall restart

Upgrade using tarball

Important

Before upgrading, be sure to review the Upgrade Issues.

If you already have Shorewall installed and are upgrading to a new version using the tarball:

Important

If you are upgrading from a 1.2 version of Shorewall to a 1.4 version and you have entries in the /etc/shorewall/hosts file then please check your /etc/shorewall/interfaces file to be sure that it contains an entry for each interface mentioned in the hosts file. Also, there are certain 1.2 rule forms that are no longer supported under 1.4 (you must use the new 1.4 syntax). See the upgrade issues for details.

  1. unpack the tarball.

    tar -zxf shorewall-x.y.z.tgz
  2. cd to the shorewall directory (the version is encoded in the directory name as in “shorewall-3.0.1”).

  3. If you are using Caldera, RedHat, Mandrake, Corel, SuSe, Slackware or Debian/Gentoo then type

    ./install.sh
  4. See if there are any incompatibilities between your configuration and the new Shorewall version and correct as necessary.

    shorewall check
  5. Start the firewall by typing

    shorewall start
  6. If the install script was unable to configure Shorewall to be started automatically at boot, see these instructions.

Upgrade the .lrp

Important

Before upgrading, be sure to review the Upgrade Issues.

There appears to be no standard method for upgrading LEAF/Bering packages — Sorry to be so unhelpful.

Configuring Shorewall

You will need to edit some or all of the configuration files to match your setup. In most cases, the Shorewall QuickStart Guides contain all of the information you need.

Uninstall/Fallback

See “Fallback and Uninstall”.