Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

(OT) Should I get a Linux box?

by willdooUK (Beadle)
on Oct 21, 2003 at 12:40 UTC ( #300890=perlmeditation: print w/replies, xml ) Need Help??

Howdy - this is perhaps a little OT for a Perlmonks node, but I think you guys can probably help.

I've just gotten ADSL at home, but I don't have a router or modem yet. I was going to just get something standard, but it occurs to me I could go techy and set up a wireless LAN at home. I've got three things to connect - PC, XBox and a Pocket PC - and my flat's pretty small so I don't think I'd have problems connecting from the other room.
I could do with learning a bit more about networks and so-on, and I was thinking I could buy an old PC, run Linux on it, and use it as the basis for a home LAN. Maybe I'd even run it as a web- or file-server (perhaps even run a Shoutcast station).

Are there any flaws to this plan? Specifically:
1) Would I be crazy to run a server from my house? Anyone else here do it?
2) Would I need a separate firewall, or could I use a software one running on Linux?
3) My box at work will soon have a fixed IP address - would that mean I could securely connect to the box at home?
4) There are plenty of sub-100 pound PC's in Loot around the 300Mhz mark - is that a suitable box?

Basically, what should I watch out for?

I hope it's cool to ask for advice in this detail - I'm kindof a dunce when it comes to networking.

willdooUK
--------------
"Home is a castle you built in my mind; I'm home anywhere, anytime."
Donny Hathaway

update (broquaint): title change (was Should I get a Linux box?)

Replies are listed 'Best First'.
Re: (OT) Should I get a Linux box?
by teabag (Pilgrim) on Oct 21, 2003 at 13:35 UTC
    Should I get a Linux box?

    In short: Yes! ;)

    1) Would I be crazy to run a server from my house? Anyone else here do it?
    Nope, that works excellent. /me does it with several servers. I even dug some SSH tunnels. ;)

    2) Would I need a separate firewall, or could I use a software one running on Linux?
    Go for the software firewall. iptables or ipchains does a great job. It's a standard package in Debian, which has a pretty smooth install nowadays.

    3) My box at work will soon have a fixed IP address - would that mean I could securely connect to the box at home?
    batkins is right. I'd advise you to disallow Telnet though and only use SSH (for more security).

    4) There are plenty of sub-100 pound PC's in Loot around the 300Mhz mark - is that a suitable box?
    Again, batkins is completely right. I've even got some 486DX's as servers, each of them working as a SAMBA domaincontroller, mailserver, web/ftpserver, fileserver, firewall and proxy.

    >(perhaps even run a Shoutcast station).
    ouch, shoutcast is not open source so EVIL! hehe, try the free alternative :icecast or even better, GNUMP3D. It has custom playlists, 3 different levels of compression, ogg vorbis and movie support and other very nifty features. I just installed it myself, very painless installation had it up and running in 5 minutes. check a sample here.

    I believe it's written by a monk, but I'm not sure.

    >One of the main things I'd like to do is have access to my home files while I'm at work - I don't reckon I'd bet getting many hits so a slow machine would be fine.
    Easy, you can use ftp for this.

    kind regards and good luck,


    Teabag
    Sure there's more than one way, but one just needs one anyway - Teabag
Re: (OT) Should I get a Linux box?
by batkins (Chaplain) on Oct 21, 2003 at 13:08 UTC
    1) Probably not. I do. I say probably because running a server requires opening up certain ports on your box. If you run a sane Linux distro (like <plug>Gentoo</plug>), you can keep track of what network services you're installing and keep up fairly easily on any patches. If you go for RedHat, just keep in mind that you'll have all kinds of services running that you may or may not need. Just make sure you only run the bare minimum - you probably won't need more than SSH, FTP, HTTP, and your Shoutcast server.

    2) Most routers come with a firewall built in. I would recommend getting a Linksys router/switch/access point combo. By default, all your ports will be blocked from external access. Just open up the ones you need for your services.

    3) Depends on the firewall at work. It would have to allow external connections on the port you need.

    4) Sure. But I don't know how intense of a server you're planning to run here. If you're expecting some crazy hits, make sure you have a decent amount of RAM. And if you want to use your box for serious work, you'd of course want to use as much power as you can get - Linux won't magically make a 300MHz box work as fast as a 1.4GHz Windows box.

    And, yes, this is _very_ offtopic. :)

    Bill


    The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa

      RE: Red Hat you have heard of chkconfig? Here is a little chunk of our standard server setup docs:

      Now let's start shutting down excess services we don't need. Run chkconfig --list | grep on This will show you most of the default services ie [root@plain root]# chkconfig --list | grep on keytable 0:off 1:on 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off gpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off omawsd 0:off 1:off 2:off 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off random 0:off 1:off 2:on 3:on 4:on 5:on 6:off rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off ipchains 0:off 1:off 2:on 3:on 4:on 5:on 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off raidmon 0:off 1:off 2:on 3:off 4:off 5:off 6:off telnet: on [root@plain root]# Use chkconfig --help to see the options. We want to disable all unnece +ssary services. For example (using above config) [root@plain root]# chkconfig --help chkconfig version 1.3.5 - Copyright (C) 1997-2000 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public Lic +ense. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset>) [root@plain root]# chkconfig --level 2345 ipchains off [root@plain root]# chkconfig --level 345 xinetd off [root@plain root]# chkconfig telnet off [root@plain root]# chkconfig omawsd off

      Typically you will need a number of other services that you omit from your list like iptables for your firewall, syslog, network and crond to name a few. You definitely want iptables :-)

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Cool. One of the main things I'd like to do is have access to my home files while I'm at work - I don't reckon I'd bet getting many hits so a slow machine would be fine. Thanks for the advice.

      > And, yes, this is _very_ offtopic. :)

      Well, I think people speak more sense here than pretty much anywhere on the web. :-)

      EDIT - Big thanks also teabag and DrHyde. Thanks for advising me, everyone's gotta start somewhere!

      willdooUK
      --------------
      "Home is a castle you built in my mind; I'm home anywhere, anytime."
      Donny Hathaway
        Eh, I personally don't mind OT posts. I've been guilty of making a few in the past. I was mainly just joking around (hence the smiley). But the CB is good for this kind of stuff, as someone else mentioned. Bill

        The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa
Re: (OT) Should I get a Linux box?
by jeffa (Bishop) on Oct 21, 2003 at 16:08 UTC
    If you want to learn about networking, routing, DNS, etc. then i recommend starting with Linux (or FreeBSD for that matter). However, these days it's much more tempting to just buy a good DHCP router and use that as your basis for you home LAN. The one i linked to even has a built-in firewall.

    Still, even if you do choose a Linksys, you can still use your Linux box for running Apache, a database server like MySQL or PostreSQL, Shoutcast, etc.

    So, in conclusion - Yes! You should get a Linux box. :)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      Recommending a linksys router in a Linux thread? A little strange given some of linksys' (and their parent company's) actions lately isn't it? And recommending a wireless one is needless hassle. Better to grab and old computer, set that up as your (linux) router, and kill two birds with one stone.

Re: (OT) Should I get a Linux box?
by hardburn (Abbot) on Oct 21, 2003 at 13:47 UTC

    1) Would I be crazy to run a server from my house? Anyone else here do it?

    I do it, though just for my private network and not for the outside world.

    2) Would I need a separate firewall, or could I use a software one running on Linux?

    Personally, I don't trust a firewall that comes in shrink wrap. I use either Linux 2.4's IPTables or OpenBSD. IMHO, Linux-based firewalls are more flexible and are extendable to more complex tasks via kernel modules, but the OpenBSD project cares very deeply about security, which is the ultimate goal of a firewall. You'll do fine either way.

    3) My box at work will soon have a fixed IP address - would that mean I could securely connect to the box at home?

    Yes, as long as you configure your firewall to allow it. Check with your ISP if they allow you to run a server or not though. If you don't use too much bandwidth and they don't get any complaints, ISPs usually leave you alone, but you never know.

    4) There are plenty of sub-100 pound PC's in Loot around the 300Mhz mark - is that a suitable box?

    Plenty, unless you get slashdotted and have lots of dynamic content (if its simple static content, you'll be OK--there have been Commadore 64s running webservers that took a slashdotting just fine since they were running static content).

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    :(){ :|:&};:

    Note: All code is untested, unless otherwise stated

Re: (OT) Should I get a Linux box?
by DrHyde (Prior) on Oct 21, 2003 at 13:36 UTC
    There's no reason not to run a server at home on the end of your DSL connection - provided that your ISP allows this, of course. My web, mail, ftp and shell machine sits on a table just outside my kitchen.

    Be careful about security though. If you are at all unsure of what you're doing including tightening up the OS, setting up a firewall and any routing, and so on, then don't just guess. If you get it wrong, the bad guys *will* get in to your machine. There's plenty of good books on the subject, and if you still need help, I'm sure there's a friendly local perlmonk/monger/LUGger with the right skills.

Re: (OT) Should I get a Linux box?
by liz (Monsignor) on Oct 21, 2003 at 13:46 UTC
    If you want to get your hands dirty, go for it!

    However, if you want to go for convenience, for about 100 pound it should be possible to buy a router/firewall/wifi basestation combo with web configuration in a single box, about twice the sice of a pack of cigarettes. Given the price of these combo's nowadays, it can't be beaten for price. And the same goes for convenience. And in a small space, not having the extra fan from the extra computer, sure is a thing to think about.

    When I was facing the same choice a few months ago, I went for the small box. In my case, it was 70 euro. You sure can't beat that. Only 3 years ago, a similar box would have costed more like 400 euro. In those days it would have made sense to use a Linux box. I don't think it does now. Unless you want to get your hands dirty, of course ;-)

    Liz

      You're right, but then again I think anyone posting here should have a linuxbox anyway ;)

      and dirty hands are a joy forever uhm, never mind


      Teabag
      Sure there's more than one way, but one just needs one anyway - Teabag
      Well, that's definitely part of it. I've come through a CompSci degree and working as a developer with pearly white, soap-scented hands. Having to set this stuff up myself would be very GOOD for me!

      Still, 70 euro is superb...
      ps - This node looks like it might get deleted for being OT.. just so I know better next time, is there a better place for it on the PM site (or should I have gone to RTFM.com?)

      willdooUK
      --------------
      "Home is a castle you built in my mind; I'm home anywhere, anytime."
      Donny Hathaway
        I'd say this is a typical Chatterbox question, where everyone's on top of Off Topic topics

        whether it's piercings, valves or the gentle art of breeding exotic insects, CB is your friend with the aswers...


        Teabag
        Sure there's more than one way, but one just needs one anyway - Teabag
Re: (OT) Should I get a Linux box?
by jdtoronto (Prior) on Oct 21, 2003 at 14:04 UTC
    You have already had some good responses, but let me add my 2p worth.

    The best way to learn anything is by trying and making mistakes. Get a cheap PC, put Linux on it and go exploring. At least with Linux you can get plenty of software and assistance for free.

    Have fun and enjoy learning!

    jdtoronto

Re: (OT) Should I get a Linux box?
by nimdokk (Vicar) on Oct 21, 2003 at 17:33 UTC
    My suggestions fall along the lines of security. You might want to consider hardening the router that you get. Depending on what you end up with, some might allow you into the guts more than others, this is true of the Cisco DSL Modem that I use at home. On top of this, you might add in the firewall rules on the linux box, further isolating your internal network with by a DMZ. Also, your boxen is only as secure as you make it. I would strongly recommend reading up on various procedures you can implement to strengthen your boxes. Practical Unix & Internet Security from O'Reilly is a pretty good resource. If you are just learning Linux (and it sounds like you are), I would recommend being overly cautious and not turning anything on (or installing it even) if you are uncertain what it is doing (although sometimes that is hard to do). Also, if you use Wireless, you might look at restricting access based on MAC/Ethernet addresses, so you don't get a bad-guy getting in that way. In short, be a paranoid penguin ;-)
    I'm not a security expert, but I've just done a bit of reading on the subject and am very conscious of it with my job.


    "Ex libris un peut de tout"
Re: (OT) Should I get a Linux box?
by lachoy (Parson) on Oct 21, 2003 at 22:12 UTC

    I run my website and mailserver on an ADSL line, plus DNS, CVS, shell access and firewalling. Once you get it up and running it's more or less hands-off. But getting to that point can be a huge PITA unless you've done it a number of times before. Like others here I recommend one of the standalone firewall/router boxes you can pick up for US$50 or so, US$120 if you want to also make it a wireless access point. Still build the Linux machine and have fun with it, but don't put pressure on yourself (and do something dumb security-wise) by having it be your only gateway.

    Chris
    M-x auto-bs-mode

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://300890]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-06-26 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (85 votes). Check out past polls.

    Notices?