We are updating this howto to support CentOS 5. Red Hat released the RHEL 5 source in April 2007, and in early April the CentOS project provided a final release of CentOS 5. We are in the process of running through the base installation & detailed configuration to confirm all the directions.
The following How-to is a Work-in-progress based on CentOS 5. It will have typos, spelling errors, gaps & errors until we have completed a detailed run-through and updated the steps. While this is underway we are mainatianing the legacy open-source howtos at www.old.hornfordassociates.com.
At the completion of this Perimter Security How-to you will have a multiple-zone Firewall, Virtual Private Network and Proxy Server.
This provides a basic Perimeter Security environment. Where appropriate the How-to is integrated with a Windows desktop environment.
For detailed configuration options please have a look at www.shorewall.net. This how-to is derived from the Shorewall two-interface sample.
For an overview discussion of why these applications were used look here. Core application list:
The following link provides step-by-step instructions to install and perform a base configuration of a CentOS 5 server.
These steps are common to several CentOS How-tos
Shorewall is another application where we are not going to use the repository for the RPM.
The project website is available at www.shorewall.net - at the project website make sure you subscribe to the announce mailing list - without receiving the announce messages you WILL fall behind and miss important changes, updates and patches to the product.
This announce mailing list is used only to announce upgrades, fixes and known issues with Shorewall and is available at:http://sourceforge.net/mail/?group_id=22587
CentOS RPMs for Shorewall are available courtesy of Simon Matter. He maintains the RPMs at: www.invoca.ch/pub/packages/shorewall/. Look here for the current version of Shorewall.
Webmin's software installation will then prompt you for confirmation of the installation. Review the options, as with most defaults don't change them unless you understand the implications.
With Shorewall installed the next step is to configure your firewall. Refer to the basic firewall planning performed in 'thinking about your firewall'
Note: With Shorewall 3.4.2 and Webmin 1.330 we are seeing errors in the Network Interfaces configuration. This may be a real error or an artefact of configuring Shorewall in a virtual machine. We suspect it is a real error, it would not be the first time that Webmin & Shorewall options have been out-of-step.
Before going any further it is time to CYA. Errors in Firewall configurations result in firewalls that drop all connections, including your attempts to fix the problem. To avoid this Shorewall supports a CYA that ensures connections from specified IP addresses always can talk to the firewall.
This ensures that if you do something bad, then the Firewall will still allow connections from your system.
Policies configure the default actions for traffic between different firewall zones. They can be overridden for particular hosts or types of traffic on the Firewall Rules page.
These policies will write to /etc/shorewall/policy
############################################
#SOURCE DEST POLICY LOG LIMIT:BURST
# LEVEL
fw red ACCEPT info
red all DROP crit
off all ACCEPT crit
all all REJECT warning
#LAST LINE -- DO NOT REMOVE
This set of rules will allow basic traffic and management. You will have SSH & Webmin access to the Firewall, DNS connections and office-side ping and Firewall-based ping is enabled.
#########################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/
# PORT PORT(S) DEST LIMIT GROUP
#SECTION ESTABLISHED
#SECTION RELATED
SECTION NEW
ACCEPT:crit all red tcp 53
ACCEPT:crit all red udp 53
ACCEPT:crit off fw tcp 22
ACCEPT:crit off fw all 443,10000
ACCEPT:crit off all icmp 8
ACCEPT:crit $FW all icmp 8
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
Return to the Shorewall Module main page and click the Check Button. Assuming no error conditions are reported, return to the page and click start. Once you have confirmed that the firewall is behaving. You may want to consider returning to the CYA stage and undo the CYA - if you created remote management this may be a good idea. The further you are from the firewall the worse the idea. There is always a security/usability trade-off.
To enable startup you need to enable Shorewall
For a list of layered applications used and a limited discussion covering why they were slected see Applications Used.
We no longer maintain the Debian option for this How-to.
We stopped working with Debian during the long, painful transition from Debian 2.0 in 1998 to Debian 3.0 in 2002 and Debian 3.1 in 2005. The Debian project's long struggle with responsible release cycles, odd personality battles and obscure internal fights caused us to look elsewhere.
We follow the Debian project closely, hoping for the development of a reasonable release cycle, and a decline in internal politics. We are reminded of Steve Jobs statement to the Macintosh team "real artists ship".
Debian 4, shipped on the day this section was composed (8 April 2007). To help support Debian we maintain a bittorrent peer for the Debian Network Install and the 3 DVD Debian set.
This directory of Linux commands is from Linux in a Nutshell, 5th Edition
www.linuxdevcenter.com/linux/cmd/