[XenoCafe Logo] Click for Homepage
Home Tutorials Forum Blog Advertising Links Contact About



Setting up a Firewall in RedHat Linux using IPTables
Part 1 - Starting IPTables

Written by Tony Bhimani
October 4, 2004

Requirements
RedHat Linux 9
iptables 1.2.7a

I am not an iptables expert by any means and nor do I claim to be (which explains the limited scope of this document). This tutorial describes the steps for a basic configuration for the iptables firewall on RedHat Linux 9. I will only give instructions for opening certain ports on a single ethernet adapter and conclude with blocking IP's of hosts you want to disallow access. Iptables allows for much more than mentioned here, but this should be enough to get you started in opening ports for specific services and protecting your server from unauthorized access. I will not be going into the details of installing iptables, so it is assumed you already have it since the RedHat 9 installation includes it typically by default.

The first thing we want to do is make sure iptables is running and that it will always start at bootup. If you are not root then become root and issue the following command.

/etc/init.d/iptables start

You should see something similar to this.

Now we will make sure it starts at bootup. In my previous tutorials I have used chkconfig, but this time I will use the RedHat Text Mode Setup Utility. Issue the following command.

setup

The RedHat Text Mode Setup Utility should start.

Scroll down to System Services and press enter. Then scroll down the list of services till you reach iptables. If it is not selected, press the spacebar to select it.

Tab to the OK button then press enter. Tab to the Quit button and press enter. Iptables will now start everytime you boot up.

Next we will create some rules for our firewall.



How would you rate the usefulness of this content?

Poor 1
2
3
4
5
6
7
8
9
Outstanding

Optional: Tell us why you rated the content this way.
Characters remaining: 1024
Average rating: 5.15 out of 9.

1 2 3 4 5 6 7 8 9
20 people have rated this content.
[ 1 ] [ 2 ] [ 3 ] [ Next Page ] This page has been viewed 16,286 times
Copyright © 2004-2010 XenoCafe. All Rights Reserved. XenoCafe is Powered by Linux. Free your mind and your wallet. Switch to Linux.