Yet Another Linux Firewall -- by Ghosthawk

Intro, intermediate and advanced HOWTOs and discussion.
Post Reply
User avatar
weazy
Ex-Admin
Posts: 1688
Joined: Sun Jul 07, 2002 10:02 am
Location: any given
Contact:

Yet Another Linux Firewall -- by Ghosthawk

Post by weazy » Tue Aug 12, 2003 2:02 am

-------------------------------------------------------------------------------------------------------------
Building a Linux Firewall
By Ghost Hawk - Ghosthawk@theowned.net
http://www.theowned.net
July 2003
-------------------------------------------------------------------------------------------------------------

Contents
1. ...................................Introduction
2. ...................................Requirements
3. ...................................IPCop and Smoothwall
4. ...................................Assembling the Hardware
5. ...................................Installing the Software
6. ...................................Configuring the Network Settings
7. ...................................Administration
8. ...................................Last Words


------------------------------------------
1. Introduction
------------------------------------------
In this paper I will teach you how to build, setup, and install a
linux based firewall for your network. Who is this guide geared toward?
Anybody with a broadband connection. This guide will be helpful for
home users as well as large corporations. If you are concerned about
the security of your network, this just might be the answer. This wont
make your network completely secure, but it will provide the framework
for
a secure system, because nothing is totally secure. The firewall
shouldn't take more than a half hour to build. To build this firewall you do
need
to know some aspects of networks to be able to set it up, other than
that its pretty easy.

------------------------------------------
2. Requirements
------------------------------------------
1. An old PC. (486 or better)
2. 2 Network Cards ( I have had good luck with the 3COM 3C509b )
3. A Hard Drive ( The last one I build I used a 1 gig drive, but you
don't need that much )
4. A CD-ROM Drive
5. Smoothwall or IPCop
6. You must know the IP addresses of the Incoming line (T1, Cable
modem, etc.) and the destination ( PC or router its going to )

------------------------------------------
3. IPCop and Smoothwall
------------------------------------------
IPCop and Smoothwall are distributions of linux that are made just for
being a hardware firewall. You can pay thousands of dollars
for a hardware firewall. There are many other firewall distributions
but IPCop and Smoothwall are my top favorites, and the installation and
setup are almost identical. They are a free download, small and don't
take long to download. After you have it installed you don't need a
monitor or keyboard or anything. They are administered just through
your web browser. You connect to the firewall with Mozilla or Internet
Explorer and you can do everything you need to do from there.
Administering them is quite easy.
You can download IPCop and Smoothwall at:
IPCOP: http://www.ipcop.org
Smoothwall: http://www.smoothwall.org

------------------------------------------
4. Assembling the Hardware
------------------------------------------
This is the easiest part of the whole thing. The computer doesn't need
much in it. The only thing it needs is a video card just for
installation, the hard drive, cd-rom drive, and the two ethernet cards.
After installation and setup you can take the video card out. After
you install the two network cards the cd-rom and the HD, you're all
set.


------------------------------------------
5. Installing the Software
------------------------------------------
After you have downloaded and burned the cd of the version you picked
(IPCop or Smoothwall) you put the cd into the CD-ROM
drive and boot the computer. The installation is pretty self
explanatory. The only real hard part of the installation is configuring
the network setting which I will go into in the next section.

---------------------------------------------------
6. Configuring the Network Settings
---------------------------------------------------
IPCop and Smoothwall defines up to three network interfaces, RED,
GREEN and ORANGE.

GREEN: This interface only connects to the computer(s) that the
firewall is protecting. It is presumed to
be local. Traffic to it is routed though an Ethernet NIC on the
computer firewall.

ORANGE: This optional network allows you to place publicly accessible
servers on a separate network.
Computers on this network cannot get to the GREEN network, except
through tightly controlled "DMZ pinholes".
Traffic to this network is routed through an Ethernet NIC. The ORANGE
NIC must be different from the GREEN NIC

RED: This network is the Internet or other untrusted network. The
firewall's primary purpose is to protect the GREEN and ORANGE
networks and their computers from traffic originating on the RED
network. Your current connection method and hardware
are used to connect to this network.

There are two combinations allowed in the firewall. GREEN, RED is the
typical network combination specified for home and small offices.
GREEN, ORANGE, RED, is only specified when you wish to run publicly
accessible servers.

Since the RED interface can connect either by modem or by Ethernet,
there are four Network Configuration Types:

GREEN (RED is modem/ISDN)

GREEN + ORANGE (RED is modem/ISDN)

GREEN + RED (RED is Ethernet)

GREEN + ORANGE + RED (RED is Ethernet)
Most connections are going to be GREEN + RED. So if you are setting it
up the GREEN is going to the computer or router. So when
it asks for the IP address for the green it will be the ip of the
computer or firewall. RED is going to be the IP of the incoming line. ( The
Cable modem or the T1/ISDN line.)

Thats the basics of it. You connect the cables into the ethernet cards
and your ready to go.

-------------------------------------
7. Administration
-------------------------------------
During install of the firewall you get asked to make an IP and
hostname of the firewall. So when you want to do administration
on the firewall you fire up your web browser and type in the ip address
or the hostname of the firewall and you want to connect
on port 445 or 81:
ex. http://10.10.0.1:81 -or- http://10.10.0.1:445
ex http://firewall:81 -or- http://firewall:445


----------------------------------
8. Last Words
----------------------------------
I hope you have found this guide helpful and it made you ready to
start securing your network the right way. I didn't
go into incredible detail in this guide, but you can build, setup, and
install your firewall. If you have any questions, comments,
or anything else feel free to E-mail me at: Ghosthawk@theowned.net

-----------------------------------
References:
http://www.ipcop.org
http://www.smoothwall.org
--The Devil is in the Details--

Post Reply