TechSpot

Linux Router Project

By PanicX
May 31, 2004
Topic Status:
Not open for further replies.
  1. Hey all, I've got a rather daunting task I'd like to undertake but will need some serious handholding to get through. For those of you willing to take the time to help me out, here's the scenario.

    A few months ago, a buddy of mine rented the apartment next door. We both have cable internet connections, and we drilled through the wall to connect our LANs for fast easy sharing. What I would like to do is replace both our Linksys Routers with a single linux box that would route/loadbalance the cable connections, provide firewall security, network monitoring, DHCP, SFTP, and a massive file share (SAMBA?).

    I have about 3 PC's running Windows XP, and he has about 4 PC's running Windows 2000. We both have friends drop by often with Laptops running either Windows XP, Slackware Linux, or OSX.

    Now, I'm presuming the most difficult function involved is loadbalancing the connections. With this in mind, is there any particular linux distro that would be best for this scenario? I also want to avoid installing a GUI to save resources, however I'm not sure how to do this with modern distro setup utilities I've seen.

    Any and all help is greatly appreciated.
  2. Nodsu

    Nodsu Newcomer, in training Posts: 9,431

    Making your network server also your file server is not such a good idea. You should keep the file server separate so you don't lose everything at once when you get hacked or mess up the server yourself.

    You don't need much CPU power to run Samba - you could get some old rig for (almost) nothing to do the file serving. Some >32MB of RAM and any Pentium CPU will suffice for you if you don't hog it too much.

    I'd recommend some less desktop oriented distribution like Debian or Slackware. A Debian install set should come with every utility you could dream of so you don't have to make separate downloads.

    When setting up the server, take it one step at the time. E.g. first make sure you have cable connectivity from the server only without Linksys. Then make two cable connections. Then set up routing/load balancing and test it. Then connect the local network, add firewall and other services.

    You don't need a top of the line machine for any of the network services either except maybe for SFTP to help with compression/encryption.
  3. PanicX

    PanicX TechSpot Ambassador Topic Starter Posts: 829

    Filesharing isn't the main intent of this PC, however I was thinking it'd be nice to consolidate 2 machines into 1. The files hosted also wouldn't be any sort of critical files, most likely music or videos. If it was hacked or crashed, it would just mean a few weeks of downloading to start over. I'd be more concerned with if theres a major performance hit on the box hindering traffic routing.


    The system I'm trying to do all this on is a Celeron 533 with 256MBs of RAM, a 40Gb Harddrive and 3 NICs.

    I've taken your advice and setup Slackware 9.1 on this machine. Gave it a 3gb root partition (reiserfs) and a 1gb swap. Just to comment, Slackware has an excellent setup utility. Its not as pretty as all the desktop distros, but if you go through Newbie mode, it explains every package before you chose to install it. My only complaint is that it's not very easy to backstep out once you've made a selection you weren't sure about. Pretty much have to restart that part of the setup process.

    Basically during setup, I didn't install the X server or any packages related to it. I didn't install any sound or audio utility packages (theres a whole lot of em). I DID install DHCP client, DHCP server, SSH, iptables & ipchains, SAMBA, and a few network monitoring utilities.

    My first hitch is this, during the install, Slackware detected and configured one of my network cards, but didn't attempt to search for more network cards after finding this first one. ifconfig -a shows only eth0 and le0. How do I install the remaining two cards?
  4. Nodsu

    Nodsu Newcomer, in training Posts: 9,431

    I don't know if Slackware has any hardware detection utilities to automate this for you..

    You should check the dmesg buffer (/var/log/dmesg) to see if the kernel has found the network interfaces. If not, then you have to tell the kernel to probe for more NICs with a boot parameter (can't remember it offhand, but you should read Linux networking HOWTOs anyway).

    If the cards are detected, use ifconfig to bring up the interfaces manually and give them IPs and such.
  5. Mictlantecuhtli

    Mictlantecuhtli TechSpot Evangelist Posts: 4,916   +9

    To combine multiple connections, use kernel's Ethernet Bonding Driver. It's in Networking support - Network device support - Bonding driver support, documentation is in kernel source directory, Documentation/networking/bonding.txt.
  6. MattG

    MattG Newcomer, in training Posts: 147

    I use slackware to NAT, Firewall my cable connection. I dont DHCP though, i use static addresses. DHCP is easy though.

    iptables will NAT and firewall for you.
  7. loadbalancer

    loadbalancer Newcomer, in training

    I'm new to Slackware myself but think its great..

    Your netcards will probably be auto detected but in order to actually
    bring them up just edit : /etc/rc.d/rc.inet1.conf
    Most stuff in Slackware is extremley standard so you just need to guess
    which text file to edit.
    :chef:
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.