Announcement

Collapse
No announcement yet.

SmoothWall Installation and Setup.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SmoothWall Installation and Setup.

    How To: Build and Setup a SmoothWall Firewall/Router/DHCP server.

    These days, you can’t be too careful on the Internet. There always seems to be someone who will try to use this marvelous tool for their own malicious ends. This article will cover how to protect your network using old or obsolete equipment.

    For those of us who have 24/7 connections (Cable or DSL), network security is an important issue. Too many times we have read stories of newly-discovered exploits and ploys used to gain unauthorized access into someone’s personal, business and network information. What can be done? Obviously many things, but first and foremost should be a Router and a Firewall of some kind.

    Firewalls help protect against attacks and intrusions from the Internet. Routers allow a private network to exist separately from the Internet, and most also allow multiple users to share a single Internet Connection.

    Terms:

    The term “Firewall” comes from lessons learned in the real world: In some densely populated areas, buildings that are built in close proximity must be separated by a fire-resistant wall to keep a fire that started in one building from spreading to another. The analogy in terms of Networking is very apt; the “Firewall” being a shield against attacks/probes coming from the Internet. There are two basic types of Firewalls: Hardware-based and Software-based. This Article will be dealing primarily with what amounts to a Hardware-Based Firewall that has some important Software features as well.

    Comparisons:

    There are many small set-top Routers that tout themselves as Firewalls, and they are to a degree. But they tend to be elementary and limited in what they can do. In particular, rules for incoming and outgoing traffic are very basic and often arbitrary. Configuration of these units is limited due to the simple nature of their hardware; the lack of storage capability makes it impossible to log network traffic. On the other hand, there are Software Firewalls. Software Firewalls are run as an executable or as a service on individual PCs: most Software Firewalls have excellent logging capabilities, but are ill-equipped to deal with intrusion and denial of service attacks; many software firewalls require very complex configurations for controlling network traffic into and out of the PC effectively. What then is left?

    Alternatives and Options:

    Often overlooked are personal computers themselves: For many years, Microsoft has offered the ability for a host PC to serve as a Hardware Firewall using Internet Connection Sharing (ICS for short). Machines configured in this manner use a portion of their processing power to create a shared Internet Connection along with a rudimentary Hardware Firewall, the limitations of this form of Firewall are many: since the PC is “live” in the sense of having a user performing daily tasks on it while acting as a Firewall is a security hazard at best, and at worst, an outage waiting to happen if ever there were to be a runaway process or inadvertent mistake that forces the computer to a critical stop or a spontaneous reboot.

    SmoothWall:

    Enter SmoothWall; many PCs built in the past four years or so are a candidate for turning into a dedicated Hardware Firewall/Router/DHCP server. Most obsolete PCs out there are vastly overpowered for such a task, so with little or no cash outlay, one can reconfigure an older PC to do the job of a Mid-line Professional-Grade Router/Firewall. SmoothWall was designed specifically to turn a PC into a Network Appliance whose sole purpose it is to Route Network Traffic to and from the Internet, while assigning IP addresses and protecting the Private-side of the Network from Intrusion. SmoothWall is a preconfigured, optimized version of Redhat Linux (Version 2.2 Kernel), designed only to function as an Appliance. As most computer-savvy people know, Linux has a (deserved) reputation for reliability, stability and security. The kind people over at SmoothWall.Org have distilled this into a small, yet potent package: A mere 20.7 Megabyte ISO, ready for burning into a bootable CD.

    SmoothWall supports many different network types, which we will get into in a moment. First, a little jargon-busting: The Green NIC is the Private, trusted segment of the network, The (Optional) Orange NIC is not trusted, but does share the Internet Connection, the Red Interface is your connection to the Internet: this could be a dialup Modem, ISDN, USB ADSL or a conventional Ethernet Adapter.

    Requirements:

    The Hardware requirements are minimal: a 486DX4 processor fitted with 8MB RAM, and a ~200MB HDD. It goes without saying that you will need at least one network card (NIC), a keyboard (temporarily), a monitor (temporarily), a connection to the internet, a floppy drive (temporarily) and an ATAPI/IDE CDROM, (again, temporarily). Once SmoothWall is up and running, all regular maintenance can (and should) be performed remotely via the Web Interface.

    Preparation:

    I downloaded the ISO as well as the Installation Guide, Configuration Manual and FAQ documents from SmoothWall.org. A quick suggestion to the kind people over at SmoothWall: Why not package the User Manual and FAQ in PDF format as well as the latest Acrobat reader for Windows and Linux in the ISO? It may bloat the install a bit, but it would make it even faster and easier to setup. The ISO was burned to CD with Nero. Also, patch files numbers one ,two and three (All of them .tar.gz files) were also downloaded to update the machine in a timely manner after setup. I chose to go with the Triple Segmented Network: Green, Orange and Red, with the Red Interface being an Ethernet Card to my Cable Modem. I have a Private Network that I would like to keep private, but at the same time, have the need to share an Internet connection with any friends or acquaintances that may drop by for the odd LAN Party, some of whom I only know slightly. I have yet to have any wireless Ethernet in my home, but if I ever trod down that (mined) road, you can be sure it will be on the Orange NIC.
    Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

  • #2
    Continued....

    Test Rig:

    I built a test machine largely from spare parts to try SmoothWall: Built on a slightly fried* Gigabyte BX2000 Motherboard, and stuffed with a Pentium III 450MHz Processor, a stick of 128MB Registered ECC RAM, a 4MB 3D Vision SIS 6326-based AGP card, a pair of Linksys LNE100TX Version 2.0 10/100 NICs, a single Linksys LNEPCI2 10BaseT PCI card, a WDAC32100 2.1GB HDD drive, a temporary Floppy Disk Drive and CD-ROM were used for the initial setup. For even a medium to large-sized business, this configuration is overkill, but I was interested in giving SmoothWall as powerful and stable a platform as possible on which to work.

    Hardware Preparation and Setup:

    I am going into a great deal of detail here, because if the reader chooses to build a SmoothWall box, there are some things that will need to be done ahead of time to avoid common issues when setting up a PC for near-total autonomy.

    The First Step was to update the (Dual) BIOS on the Motherboard, as the BIOS was out of date: I flashed the Primary BIOS, then after verifying a good boot, I flashed the Secondary BIOS as well. With that, it was shutdown, the Floppy Disk Drive removed and a couple of PCI devices added: A PCI Soundcard and a PCI NIC.

    IRQ Mapping:

    The system was booted yet again…The boot halted at Verifying DMI Pool Data because I needed to know the IRQs used by each PCI slot. The breakdown was as follows – your motherboard will vary:

    The AGP Slot shared an IRQ with PCI#1
    PCI#2 did not share any IRQs,
    PCI#3 shared an IRQ with PCI Slot #5
    PCI Slot #4 Shared with the USB Controller.

    BIOS Configuration:

    That out of the way, I restarted one more time and went into the BIOS did the following (Most of the settings referenced are commonly available in most Phoenix/Award BIOS Releases):

    1) Set the BIOS to Halt On All But Keyboard Errors.
    2) Set the Boot Order to CD-ROM, C, A.
    3) Set the AGP Aperture to 4MB.
    4) Disabled IRQ usage on the VGA Adapter
    5) Enabled ECC RAM Checking.
    6) Disabled APM/ACPI Power Saver features
    7) Disabled the Secondary Onboard IDE Controller.
    8) Disabled the Floppy Disk Controller.
    9) Disabled both Serial Ports and the Parallel Port.
    10) Disabled IRQ Usage on the USB Controller.
    11) Set a Strong BIOS Setup Password**

    Final Hardware Layout:

    I settled on using the AGP Slot, PCI #1 for the Green NIC, PCI Slot#2 for the Orange NIC and PCI Slot #4 for the Red NIC. For reasons discussed later, I installed only a single LNE100TX NIC to start with. Shortly thereafter, SmoothWall setup commenced.

    SmoothWall Installation:

    Setup was very straightforward: Selecting your Keyboard Locale, Time Zone, Network Type and Passwords are quite easy and I am skipping most of the setup process to avoid redundancy: If you want to see the process step by step, please review the Installation Guide and the FAQ. I deliberately glossed over the process, because the Online Documentation provided by these people is so straightforward and complete that even a complete idiot (such as the author) can get it right the first time - Imagine That! SmoothWall automatically detects a wide range of NICs: this phase of the installation can be a source of some consternation. Just which NIC SmoothWall chooses as the Green NIC can be somewhat nebulous: This is why I took careful notes on which IRQs the NICs were going to receive.

    Which NIC Does What?

    I recommend setting up SmoothWall with only a single NIC (Green) initially and then shutting down, adding and configuring NICs one at a time until finished; that way there is no doubt as to which NIC performs what function. In any case, make sure you Label your NICs clearly. I labeled mine and dropped a printout of the card configurations in my Motherboard Manual along with the MAC address of each card in the system.



    Note: A good habit to have is to put the motherboard manual in a place where it will never get lost or misplaced: I place my motherboard manuals inside of the system they are installed in a Manila Envelope Velcroed to the inside of the side door.



    After selecting appropriate Strong Passwords** for the user, admin and root identities (and entering them into the Setup Sheet I had put into the Motherboard manual in the Case), the box was shutdown once more: the temporary CD-ROM was removed, the two drive IDE cable replaced with a single drive version (Yes, this is very nitpicky, but I am covering all of the bases here.) and the box was brought back into the BIOS where the Boot Order was set to C Only. One Final Boot and hardware setup was completed.



    From the Front, the SmoothWall Box is not the least bit pretentious...<See Below> That's about the same view an intruder is going to get of the inside of your network, too.



    Remote SmoothWall Configuration:

    On a Client PC I went to the Command Line, released my NIC, then renewed it…JOY!...an IP address was returned and assigned almost immediately. I double checked to make certain the IP address was in the correct range for the Green Interface.

    In my Internet Browser, I entered the address of the SmoothWall server and was rewarded with a SmoothWall’s Thank You Webpage…



    I then went and logged into the Web Interface and configured the Red NIC: a bare thirty seconds later, I had Internet Access.

    Tidying Up:

    The Web Interface reminded me that there were updates that needed to be installed. Since I had already taken the time to proactively download the fixes, I pointed the Browser to the required files to the updates and installed each in turn:



    After a quick reboot, I went about activating the features I wanted (Web Caching, Snort and tweaking the lease times a bit), configuration was then complete.

    SmoothWall Logging Features:

    The Logging features of SmoothWall is sobering: It detects and logs all network activity and reports back its findings…I was stunned to see my Red NIC getting hit with so many Port Scans and TCP Queries. Since Inbound and Outbound traffic is monitored, you can look for abnormal activity in the log to isolate specific problems or issues:



    This SmoothWall will probably find itself as the Router/Firewall/ DHCP server for a fairly large LAN Gathering in late spring. I’ll be looking forward to seeing it perform during some really heavy usage.
    Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

    Comment


    • #3
      And Yet some more!

      Added:

      For those of us who absolutely MUST Stay online I am adding another little tidbit to the Review: adding an Analog Modem to the system for alternate access.

      Now, I normally access the Internet through a Broadband Cable Connection, and I am deeply satisfied with my service, but tonight's weather brought me to the terrible realization of my deepest, darkest fear: my Broadband Internet Service Provider suffered an Outage. I had no Internet access...The Horror!

      Waitaminute...Or did I? I remembered my employer offered what amounts to a nearly-free dialup ISP service which is deducted from my paychecks: I haven't once in the past two years had to use a dialup account for any reason, but I kept the deduction anyway. Tonight's little fracas has forever erased any future payday deduction doubts!

      I dug out my account settings and went looking for a modem...Since this modem would be going into my SmoothWall box, it had to be a Linux-compatible Modem. This counts out about 95% of the PCI Modems out there. The Intel/Ambient HaM Modems and the (Very Pricey) US Robotics Hardware-Based PCI modems being notable exceptions. Lucent-based Modems can be made to work, but it requires installing some extra files.

      Fortunately, I did have a pair of old ISA US Robotics OEM Voice Modems still new in the box. For those of you too young to know (or too old to remember ), ISA Hardware-based modems generally can be jumpered for a specific IRQs and COM Port settings: Most are Plug and Play compatible, and don't require jumpering (all of the jumpers are left open), but for Linux, you definitely want them jumpered for sanity's sake.

      I remotely powered down my SmoothWall box, jumpered my Modem for COM3 and IRQ5, and installed it.

      No Drivers or Modules are required for a Hardware Modem in Linux, so I booted up SmoothWall as normal. I went into the Shell and opened up the Networking Settings and selected a Green-Orange Network (Red is Modem/ISDN), and selected eth1 as the Orange Interface (eth2 will stay unselected).

      I then exited setup and configured the Modem from the Dialup Page on the Web Interface. It's pretty Straightforward:



      Configure all of your PPP settings: COM Port, Phone Number, Connection Speed, Dialout Mode, etc... Make sure to SAVE your profile so Smoothwall will remember how to use your odem in the future. I named my Dialup Profile ATT DBU (AT&T Dial Back Up) and went back to the cover page: I immediately noticed a change:



      Ahh, now we're talking! (Again!) Clicking on Connect nearly brought a tear of nostalgia to my eye, hearing the reassuring sounds of a dialtone as the Modem picked up the line and dialed out (until I remembered how long graphics-laden webpages took to load on a 56k line). This was something I was wondering could be done without a reboot of SmoothWall, and the answer is Yes, you can reconfigure the network in a minute flat if your main connection should ever falter. And that's nice to know.

      As it is now, I am working on a script that will automatically reconfigure my SmoothWall to go to a Dial Back up posture with only a single click of the mouse, but that will take a while to work out. It will definitely be machine-specific however. (unless I were to make a script that would create the needed script comands for a given box - and that's something I'm not prepared to do - yet.)

      I hope you have found this article useful and informative, and as always, please post any questions or suggestions on this thread!

      Addendums and Etceteras:

      *Literally…the USB ports were toasted when a cheaply-built USB Keyboard attached to the system was dropped – this caused an internal short that took out a small resistor on the motherboard. Unfortunately, the resistor, being very small, and in a very difficult to get at spot was deemed irreparable. No matter: for this machine, USB is a non-issue.

      ** Strong Passwords: These are passwords that have case/character/number combinations. For example: “password” would be altered to “P@$$w0rd”.
      Last edited by MultimediaMan; 24 April 2003, 22:48.
      Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

      Comment


      • #4
        That was a very well done tutorial on SmoothWall... I'd consider using on my network, however, there are several issues that this would create

        Its a shame, becasue it looks like a good solution.
        P=I^2*R
        Antec SX1240|Asus A7V333WR|Athlon XP2200 1.80Ghz|512 MB PC2700|TDK VeloCD 24-10-40b|Samsung 16x DVD|SBAudigy2|ATI Radeon 8500 128MB|WinTV Theater|15/20/60GB Maxtor|3x 100GB WD100JB RAID0 on Promise Fastrak Lite|WinXP-Pro|Samsung SyncMaster 181T and 700p+|Watercooled

        IBM Thinkpad T22|900Mhz|256MB|32GB|14.1TFT|Gentoo

        Comment


        • #5
          Nice write up. Maybe I'll give it a go someday.

          Oh, also, I assume you need a hub or switch to go from green to share the connection?
          Last edited by Kooldino; 25 April 2003, 08:20.

          Comment


          • #6
            Koolindino: Yup, a Crossover cable, hub or a switch to share the Green, Or the Orange, for that matter.
            Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

            Comment


            • #7
              Looks like my candidate box isn't quite up to the task. Its a 80486DX2/66 with a SCSI CD-ROM; two strikes.
              <TABLE BGCOLOR=Red><TR><TD><Font-weight="+1"><font COLOR=Black>The world just changed, Sep. 11, 2001</font></Font-weight></TR></TD></TABLE>

              Comment


              • #8
                My current Firewall/Router is using Mandrake 9.1 and has a BP6 with Dual 466's in it. The drives are a 50x IDE CD-ROM, two 4.5gb 7200 RPM Ultra-Wide SCSI drives and one 9.1gb 7200RPM Ultra-Wide drive.

                It's a good thing I'm used to loud computer systems, 'cause it most certainly is (though I think most of the noise comes from that 9.1gb drive....)

                So far it's working for me quite well. I wanted to ask the question on Smoothwall though. How hard is it to set up a Netmeeting gateway or the upnpd (linux-igd) so that voice communications through MSN messenger might work?

                I also use filesharing, and sometimes the firewall has to be opened for that. it'd be great to add that to the configuration of things as well.

                All in all a GREAT tutorial though. :-) Killer web interface too. Wouldn't mind using it myself.

                Leech
                Wah! Wah!

                In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

                Comment


                • #9
                  nice!
                  The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England

                  Comment


                  • #10
                    Thanks MMM - great!
                    FT.

                    Comment


                    • #11
                      MultimediaMan: I wasn't to sure of the green/orange thing. Are they like two totally different subnets? Can a computer on green talk to orange w/o going out to the internet? I understand orange is there for security purposes...but why?

                      Comment


                      • #12
                        Kooldino:

                        The Green interface is secure, the Orange is secure as well, however, it is not on the same network as the Green. It is a different subnet. Nothing on the Orange Network is masked by default. The Orange cannot see the Green except through DMZ Pinholes. An Example: Green the Green Network default gateway is 192.168.0.1, while the Orange would be 192.168.1.1 or whatever you want it to be.

                        The idea is to have your Private LAN on the Green, your (Mail/FTP/Web/Game-) Servers on the Orange, and Administer the machines on the Orange through DMZ Pinholes through the Green.

                        I do it differently: I have guests use the Orange so I don't have to worry about giving anyone rights on my Domain. I can open and close ports from both internal and external access at will through the WebUI. The WebUI, while useful, could be made much more user friendly with only a little effort.
                        Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

                        Comment


                        • #13
                          I found a case with a half electrocuted gigabyte motherboard.
                          It had a p3_550mhz cpu, so i thought why not?
                          I rumaged around and found a 800mb maxtor, a 128mb mem stick and a vidcard

                          The only "new" stuff I used was the three Realtek nics. (ISA NIC's are a blody nightmare).

                          The install was easy and after I got it to activate the Orange and Red Nic. everything worked perfectly

                          Uppdating was a breese

                          Now the only thing that is bugging me is that SSH config it don't really work as the "tab" button dont register on the remote machine

                          Only thing left is to find out the command for setting time and date in linux
                          If there's artificial intelligence, there's bound to be some artificial stupidity.

                          Jeremy Clarkson "806 brake horsepower..and that on that limp wrist faerie liquid the Americans call petrol, if you run it on the more explosive jungle juice we have in Europe you'd be getting 850 brake horsepower..."

                          Comment


                          • #14
                            Try This:

                            Go to the Command Line, type: (No Quotes)

                            "date" <Enter>

                            then type (again using no Quotes)

                            "/usr/bin/rdate -s time.nist.gov" <Enter>

                            (This assumes you are in the U.S.)

                            Or for an automated method, try this:

                            http://martybugs.net/smoothwall/timesync.cgi has info on synchronising your Smoothwall's clock to an internet time server.

                            Either way, a reboot right after you reset your clock the first time is highly recommeded - Linux/Unix machines can get weird if you reset the clock in the middle of things...
                            Last edited by MultimediaMan; 5 May 2003, 09:50.
                            Hey, Donny! We got us a German who wants to die for his country... Oblige him. - Lt. Aldo Raine

                            Comment


                            • #15
                              Well I got help from Sasq
                              Restarting the server will have to wait untill I get to it tomorow
                              If there's artificial intelligence, there's bound to be some artificial stupidity.

                              Jeremy Clarkson "806 brake horsepower..and that on that limp wrist faerie liquid the Americans call petrol, if you run it on the more explosive jungle juice we have in Europe you'd be getting 850 brake horsepower..."

                              Comment

                              Working...
                              X