Slashdot Mirror


Installing A Secure FreeBSD Box

ltwally writes "The guys over at LittleWhiteDog have a how-to on securing FreeBSD. Topics range from the basics to custom kernels, blowfish encryption, smtp, and custom firewall scripts. Definitely worth a look if you're running a FreeBSD box, or are interested in *nix security in general."

131 comments

  1. Re-worded a bit to help make the parent clearer by Anonymous Coward · · Score: 2, Funny
    The last time I tried to use FreeBSD as a firewall [circa FreeBSD 4.8.x], you had to recompile the kernel just to get a NAT router.

    Recompile the kernel? Give me a friggin' break. And there were like a gazillion how-to's all over the web, no two of which bore any resemblance whatsoever.
    To secure my box I had to understand security! I attempted to read a How-To that would tell me the command to secure my box, but the How-To's were so LONG and complicated. I tried this to no avail:
    $ secure box
    secure: not found
    Where the hell is SECURE?

    I also had to compile in IPv4-to-IPv6 translation support. It wasn't even in the default kernel! Give me a friggin' break. And I suppose I'm going to have to read something to figure out how recompile my kernel!

    To parent: I think I see a nice shiny new Windows box in your future! You don't have to understand security with Windows. And don't worry, I think they got the last of the bugs worked out. No more security problems now!
  2. One thing I hate... by MazTaim · · Score: 2, Interesting
    I don't mind opinions, but for heaven's sake...BACK THEM UP!!!
    "And the best part is, things are easily installed and kept up to date, unlike your Linux systems out there. Don't get me wrong, Linux is great and all, but about 75% of the packages I install are custom based and, well, RedHat sucks when it comes to that."
    Never heard of Gentoo? How about LFS? How about downloading the source and compiling it yourself?
    "What's so bad about the Linux updating system?
    Well, you need to keep in mind that the BSD distros are mostly source-based, from the packages you install to updating the operating system."
    I didn't know that packages in FreeBSD were actually source! I thought ports were source?
    "And when you're dealing with source-based you can completely configure the application to do what you want and not what the person who made the package intended."
    Why not just write your own code, after all, you wouldn't want to do what the author wanted to do, now would you?"
    "So when you're using services such as up2date, you're using pre-packaged binaries that just don't suit my needs."
    Now that just hurts. Obviously there is no consideration of SRPMS? What about Portage? It can't be THAT bad, after all, they did port it to FreeBSD.
    1. Re:One thing I hate... by Anonymous Coward · · Score: 2, Funny
      Well, you need to keep in mind that the BSD distros are mostly source-based, from the packages you install to updating the operating system."

      I didn't know that packages in FreeBSD were actually source! I thought ports were source?

      No no no, the author means that BSD programs originate with source code which is then compiled and distributed via packages, whereas linux binaries are generated by 1 million monkeys randomly typing bits until something useful emerges.

      Hence, nothing in linux comes from source.

      It's irrelevant, anyways, as BSD is dead. Darl killed it, Verisign buried it, and like a tortured flower, Microsoft sprang from its grave (that's why MS tcp stack and ftp cmd client is BSD based).

      Our only hope these days is from BeOS, preferably running on direct-interconnect amigas.

    2. Re:One thing I hate... by scrytch · · Score: 3, Insightful

      > Never heard of Gentoo? How about LFS? How about downloading the source and compiling it yourself?

      First: Haven't heard of LFS, so please elucidate. TLA's don't google well (now there's an idiomatic phrase). As for downloading and compiling the source: that's precisely what ports do. More to the point that they download, patch, configure, compile, package, and install automatically but that you can manually intervene in any of these steps, and that you need only edit very modular and flexible makefiles to do so. Gentoo requires a special tool, and if emerge doesn't fit your needs for one purpose or another for a particular package, let's hope you're a very dedicated python hacker. There's a lot of very neat stuff portage does but it looks to have started complex, not based on anything all that simple or flexible.

      > I didn't know that packages in FreeBSD were actually source! I thought ports were source?

      Packages are binaries. Ports builds and installs a package. If you want custom, you just cd to the work/src/ directory and you have the source tree just like the author made it (modulo any patches) from which you're free to do the usual configure && make before going up to the port dir and doing a "make package" (or just "make install" if you want to auto install it). Compare this to the tedium of customizing a source RPM.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    3. Re:One thing I hate... by sirket · · Score: 0, Flamebait

      Never heard of Gentoo?

      Yes and it is the only Linux distribution worth using.

      How about downloading the source and compiling it yourself?

      That's a good point. There is nothing I like better than searching through my system for all the files and libraries a program installs so that I can remove it or upgrade it. No to mention getting dependencies right. Yeah, I really don't know why we bother with packages at all. Hell, let's go back to Slackware!

      Obviously there is no consideration of SRPMS?

      First, F@*$! SRPMS. Second, the author was pointing out the problems with the number one Linux Distro. Are there some cool Linux admins/users? Sure. Most of the Linux world, however, is composed of children who simply hate Microsoft and wouldn't know what a good Unix system looked like if it hit them on the head. Like anything popular, Linux is currently suffering from posers, groupies and wannabes.

      What about Portage?

      As has already been conceded, Gentoo is a cool Linux distro.

      -sirket

    4. Re:One thing I hate... by Prior+Restraint · · Score: 1

      Haven't heard of LFS, so please elucidate.

      Linux From Scratch, a source-based disto. I used it for a while, and was quite happy with it, right up until I needed to uninstall some stuff.

    5. Re:One thing I hate... by Anonymous Coward · · Score: 0

      I don't think you could have replied any better!

    6. Re:One thing I hate... by Anonymous Coward · · Score: 0

      Hell, let's go back to Slackware!


      I like slackware.

      The initialization scripts are easily editable and it's much easier to configure a daemon on slackware than in redhat or gentoo in my opinion.

      As for the lack of a package system, it may be partially true but I just don't care.

      When I install linux on my home router/web server, I just install the basic stuff then I compile a recent kernel with all the drivers modules I need and I compile the important software it will run.

      By doing so, I can configure it precisely the way I want. I can also upgrade my important programs without having to wait for a binary package to be released.

      On my workstation I do about the same thing although I install nearly all the packages because it will have many different uses. Yet if I need something specific I can just install it manualy.

      But there are many slackware packages on the net and you can uninstall them with pkgconifg if you want. I just prefere to compile stuff myself.

      Even source package can be uninstalled without "searching through for all the files".

      Simply install the program in a separate directory and set PATH, LD_LIBRARY_PATH and the like accordingly. Or if you kept the source tree 'make unsinstall' will often work.

      Anyway, sometimes you have to compile stuff. You wont find packages for minor projects or the CVS version of something. This is tuyre even on the most popular dist.

      Some people hate Slackware because it takes time to see a new program apear in the distro.

      Personally, I prefere it that way. You don't need stuff like xinetd or vsftpd to be available right away. Sure they are good programs and I may chose to install them individually if the service they provide is critical.

      But mature programs are reasonably secure when proprely configured and I prefer not having to learn everything 'new' each time I update my system.

      Dropline gnome is alost a great desktop for slackware. And it has a wonderful install system.

      Finally, I know you talk in favor of FreeBSD and that is probably a great OS too. I just had to say something against your Slackware remark as I love it. Hope you don't blame me for that.. You will I guess.

    7. Re:One thing I hate... by Ricin · · Score: 1

      There's also a BSD from scratch somewhere (google). But what I wanted to add was that portage is modeled after pkgsrc's (NetBSD) way.

      It's not that different from ports, ports integrated with portupgrade is about the same thing in functionality (only portage allows more than one version installed at a time but I'm not sure if that's really an advantage because it's also an invitation to breakage).

      make world somewhat resembles emerge world or emerge system or whatever it was called (I played with it briefly and quite liked it, made a few "ebuilds" but then moved back to FreeBSD 5.0 to catch up there).

      It's interesting to note that the new "build.sh" in NetBSD (Note: I don't run it myself) very much resembles "emerge".

    8. Re:One thing I hate... by nyteroot · · Score: 2, Informative
      So you have a reasonably good, insightful comment, but for one utterly brain-dead comment:
      Hell, let's go back to Slackware!


      I can only assume, given the context, that you meant that sarcastically, as though Slackware were something that hardly deserved to be mentioned as an option. I'll have you know that Slakcware is one of three distros I would ever consider using (the other two being Debian and Gentoo) for much the same reason that you hate RedHat. Slackware has a package system that works just fine, thank you very much, and if you don't like it you can use some other distro's fairly easily too (yes, even your beloved portage). But Slackware and Debian are the only two major distributions that actually try to be Operating Systems and not Windows. Gentoo's sole raison d'etre is to provide an entire distribution built from source, which quite frankly is only something worth doing on a hobbyist level; for any sort of production box, the focus needs to be on simplicity, security and stability, precisely what Slack focusses on. So before you get on your high horse about Gentoo, consider that.

      --
      Ratio of replies to old sig content : replies to actual post content > 0.5. Sig changed.
    9. Re:One thing I hate... by Anonymous Coward · · Score: 0
      The number one problem with FreeBSD is that it is a failure. Almost every problem with FreeBSD relates back to that. It becomes a vicious cycle--it continues to self-destruct because it is a failure, and it is a failure because it continues to self-destruct.

      The old saying that "nothing succeeds like success" has a flip side--failure breeds more failure.

    10. Re:One thing I hate... by Anonymous Coward · · Score: 0
      "[Gentoo] is the only distribution worth using."

      What the fuck? Can you even imagine what would happen if RH, SuSE, Mandrake and Debian closed up? Those distros put huge amounts of money and effort into GCC, glibc, XFree86, GNOME and KDE, and more... Gentoo contributes very little apart from wannabe-l33t-d00ds like yourself.

      Equally, if Gentoo was the only distro, you can say goodbye to Linux in business. It's not well tested, it has no proper long-terms support structure or marketing edge.

      Honestly, sometimes I wish you Gentoo fanboys could live in a world where there's only Gentoo, and watch as Linux's marketshare collapses, stability goes down the drain, funding disappears and development pace becomes much slower.

      You're obviously some kid who likes playing with his CFLAGS and hasn't been using UNIX long in a proper setting, but sheesh... get out more.

    11. Re:One thing I hate... by sirket · · Score: 1

      You're obviously some kid who likes playing with his CFLAGS and hasn't been using UNIX long in a proper setting, but sheesh... get out more.

      Actually I prefer to use real Unix systems like Solaris. I have worked on: HP/UX, Solaris, SunOS, IRIX, AIX, BSD/OS, Open/Net/Free BSD and far too many Linux distributions. If you think RedHat is a well put together system, you need your head examined. To be honest, if you hadn't posted as an AC then perhaps someone would have cared what you think.

      I also never suggested that RedHat, Debian or anyone else close up shop. I suggested that they start organizing their systems a little better. I don't for a second believe Gentoo is a technically superior distribution, just that they figured out how to organize things.

      Honestly, sometimes I wish you Gentoo fanboy
      I am hardly a Gentoo fanboy. I am a BSD user who thinks Gentoo is the closest any Linux distro has gotten to "getting it right."

      -sirket

    12. Re:One thing I hate... by Anonymous Coward · · Score: 0

      The *BSD Wailing Song

      What's left for me to see
      In my ship I sailed so far
      What can the answer be
      Don't know what the questions are.
      And after all I've done
      Still I cannot feel the sun
      Tell me save me
      In the end our lost souls must repent.
      I must know it is for certain
      Can it be the final curtain
      As long as the wind will blow
      I'll be searching high and low.
      Who knows what's really true
      They say the end is so near
      Why are we all so cruel
      We just fill ourselves with fear.
      And heaven and hell will turn
      All that we love shall burn
      Hear me trust me
      In the end our lost soul must repent.
      I must know it is for certain
      Can it be the final curtain
      As long as the wind will blow
      I'll be searching high and low
      Final curtain
      Final curtain

  3. Interesting by pkplex · · Score: 3, Insightful

    But unless one really needs something special out of FreeBSD ( eg, SMP ) why not start with OpenBSD?

    OpenBSD's security is alot more than just services disabled by default, and is usefull well beyond a firewall. /me likes OpenBSD :)

    1. Re:Interesting by Anonymous Coward · · Score: 0

      There are still a few high profile applications that don't have native OpenBSD support (such as OpenOffice -- although I'm sure I've read that you can run the Linux binaries). Admittedly, OpenBSD has been rapidly closing the application gap -- they will turn it into a warm&fuzzy desktop OS yet =) FreeBSD is a little bit faster too, and some may value a small edge in speed over an edge in security when it comes to a desktop. Lots of other reasons too ...

    2. Re:Interesting by rsax · · Score: 3, Interesting
      1. Hardware Support: If a vendor chooses to support a piece of hardware for a BSD OS (beyond Windows, Mac and maybe Linux) then most likely it will be FreeBSD.
      2. Jails: Man page
      3. Applications: FreeBSD has way more ports than OpenBSD. Whether someone uses most of them or not is another topic, but chances are what you need you will probably find ported for FreeBSD already
      4. FreeBSD 5.* onward: Nuff said
      FreeBSD and NetBSD are just as secure as OpenBSD so stick with what you're comfortable with. As for new users I'll turn the question around to you: why OpenBSD? You've already mentioned security (which I've addressed, if you think I'm wrong then point out how so) and pf doesn't count since it's already ported or being ported to the other BSD's.
    3. Re:Interesting by Anonymous Coward · · Score: 0

      OpenBSD is more focused on security than FreeBSD, and makes some performance trade-offs you aren't likely to see in FreeBSD (such as the default stack protection shit, bounds checking, etc.). They have and are doing things such as replacing string functions (safely used or not) with safe alternatives. I can't see FreeBSD developers bothering with that one. FreeBSDs security is quite good (very good if you configure it to be so!), and NetBSD's security is excellent (the best OpenBSD stuff tends to quickly find it's way into NetBSD, and visa versa -- politics be damned! A little less exchange takes place with Free) However, OpenBSD still puts the most into security (argueably, of all current 'ix OSes), and at any given time generally has an always changing edge or two *somewhere*.

      To be fair though, A diminishing returns arguement probably has validity for most users, and added security benefits of OpenBSD become a very theoretical moot point. But also to be fair, OpenBSD has more going for it than just security (eg. wonderfully cohesive setup, great man-pages. Performance is still very good, even if not quite as good as FreeBSD. OpenBSD people have as little reason to change to Free, as FreeBSD people have to change to Open).

    4. Re:Interesting by uberdood · · Score: 1
      RSAX wrote:

      Applications: FreeBSD has way more ports than OpenBSD.


      That's all fine and dandy. But the article was talking about SECURING FREEBSD. Installing ports is pretty much guaranteed to UNsecure FreeBSD (or Net, or Open...)

      FreeBSD and NetBSD are just as secure as OpenBSD


      Is that your opinion or are you willing to back that up with errata logs? Are you sure that Free/Net has had no more than one remote exploit in more than seven years?

      and pf doesn't count since it's already ported or being ported to the other BSD


      Oh? Why's that? Not happy with Darren Reed?
      --
      "Population 1,656"
    5. Re:Interesting by Anonymous Coward · · Score: 0

      Cuz eye 0wnz0rr3d theo the rat.

    6. Re:Interesting by Anonymous Coward · · Score: 0

      It doesn't seem like BSD has made any progress. It could be dead in that sense.

    7. Re:Interesting by Anonymous Coward · · Score: 0

      OpenBSD has had more root exploits than 1 in 7 years. They just sweep it under the carpet and hope nobody notices. Also, if FreeBSD were to install with a kernel and a shell by default, it would be just as secure.

    8. Re:Interesting by Anonymous Coward · · Score: 0

      According the criteria the OpenBSD developers set, they have had only 1 root exploit in 7 years. If you are claiming otherwise, either you are: A) not qualifying your claims using the same restrictions (i.e. if you install OpenBSD 2.3 today, it will have *many* known root exploits, but the OpenBSD developers have not otherwise!), or B) you are just completely full of shit.

    9. Re:Interesting by essdodson · · Score: 1

      Because Theo is bordering on being just as annoying as RMS?

      --
      scott
    10. Re:Interesting by BSD+Yoda · · Score: 1
      FreeBSD and NetBSD are just as secure as OpenBSD

      You might also say that Windows 95 and Windows 98 are just as secure as Windows 2000.

  4. Security and Windows by Anonymous Coward · · Score: 0

    "You don't have to understand security with Windows"

    You got that right. "Not understanding security" is the dominant paradigm form the very top of Microsoft on down.

  5. Interesting piece, but by Anonymous Coward · · Score: 5, Insightful

    ...still needs work.

    NitPick 1: a cvsup cron job every 3 hours? Cvsup traffic is always high at the top of the hour because everyone does this. Fix: Look at the second hand / second readout on your watch right now. Pick that value as the minute your cron job does its thing. It's a simple psuedo-randomizer that makes things a little easier on the cvsup.freebsd.org servers.

    NitPick 2: a cvsup cron job every 3 hours? (Is there an echo?) freefall.freebsd.org is the authoritative cvsup source. Its only client is cvs-master.freebsd.org, which checks freefall every 6 minutes. Official mirrors are allowed access to cvs-master, and generally update between 1 hour and 4 hours. If you're updating more often than once a day via cron, maybe you need to think about becoming a mirror. Besides, the smart thing to do is do a cvsup on your src and ports trees and keep it back a day and watch the mail lists to see if anyone else's machine burnt their toast. If there aren't (m)any complaints, go for it.

    Nit 3: An official warning and a gruff "who the heck are you" getty message aren't going to keep kids from nmapping you. Try Fooling Nmap for Whatever Reason. If you're worried your OS and your kernel version will give you away, maybe you aren't keeping as up-to-date on your security lists?

    Nit 4: Sendmail. Sure. You could run sendmail, but why not look into qmail, written by djb. While you're there, check out djbdns if you need DNS services.

    1. Re:Interesting piece, but by kirkjobsluder · · Score: 2, Informative

      Nit 4: Sendmail. Sure. You could run sendmail, but why not look into qmail, written by djb. While you're there, check out djbdns if you need DNS services.

      Actually, a bit further down they the author recommends postfix. But gee, there is just so much ground to cover here, splitting this up would be good.

    2. Re:Interesting piece, but by Anonymous Coward · · Score: 0

      Yes, splittling it up would be an excellent idea, which is one of the reasons why I find ONLamp.com to be fairly helpful -- each article is on a discrete topic.

      W.r.t. sendmail vs. qmail vs. postfix: I certainly wasn't trying to start a mailer war.

    3. Re:Interesting piece, but by davidsturnbull · · Score: 1

      RTFM. 0 3 * * * means 3am every morning. HTH. HAND.

    4. Re:Interesting piece, but by Anonymous Coward · · Score: 0

      Hey, yeah, I botched that up. Apologies to the author. Somewhere I got turned around and throught it was ea. 3 hours. It's still at the top of the hour, though. Change it up. The mirrors will like you.

    5. Re:Interesting piece, but by bplipschitz · · Score: 1

      Good points. The author strikes me as a bit of a dipschnitzel anyway. I run Free- Net- and OpenBSD on different machines, and they all have their worth. Pick the right tool for the right job.

      One line that made me laugh was ". . .standalone server. . ." Golly, if your server doesn't hook up to any other machines, is it really a server?

      I think not.

  6. *BSD is not dead! by Anonymous Coward · · Score: 0

    On the contrary, the BSD's are truly great operating systems. They are fast, stable, and reliable. If you are sick of GNU/Linux boxes crashing all the time, give *BSD a try today! You won't regret it!

    1. Re:*BSD is not dead! by Oddly_Drac · · Score: 1

      "*BSD a try today! You won't regret it!"

      You BSD Tro...

      Erm...hang on...

      --
      Oddly Draconis
      Too cynical to live, too stubborn to die.
  7. Wrong! *BSD is not dead! by Anonymous Coward · · Score: 0

    *BSD is alive and well. By saying otherwise, you have shown that you clearly do not know what you are talking about! If you ever come to your senses and realise that *BSD is truly great, Slashdot will be glad to hear about it.

  8. Using FreeBSD as a firewall by Anonymous Coward · · Score: 2, Funny

    Recently I had an experience to use FreeBSD. I had heard many great
    things about it, and was excited to replace a dead Linux firewall with
    this OS. Unfortunately as things turned out, FreeBSD proved to be more
    nightmare than solution.

    When not attending classes at my community college to get my
    humanities degree, I work part-time at a printshop. Our Linux box
    there finally gave up the ghost. I'd heard that FreeBSD was incredibly
    secure so I talked my boss into putting that on as a replacement.

    Part of the appeal of FreeBSD was its history. A fork of the Linux
    kernel, it was originally intended for Steve Job's failed NeXT cube.
    Recently, its found a home amongst the ignorant and easily-fooled as a
    firewall OS (later on, we'll see how Job's reached back to use FreeBSD
    in OSX. This will be important later!) BSD was also famous for an
    incident in the early 80s, where they were sued by Microsoft when the
    BSD developers stole the TCP/IP stack from Microsoft's PC-DOS.

    Once my boss gave approval, I quickly headed over to FreeBSD.com and
    downloaded the ISOs from the web site. Our box was pretty
    state-of-the-art, a two-CPU'ed Pentium III. Installing it went pretty
    flawless and I had high hopes for our new firewall.

    Almost immediately however I began to have concerns. I noticed no
    where did FreeBSD display the terms of the GPL. Since its based on
    Linux, this should be a requirement. Apparently the history of theft
    amongst the BSD developers still continues!

    I was even more shocked to learn that the ipchains rules we'd
    carefully setup on our Linux box would not work on FreeBSD! Perhaps
    FreeBSD is still using a SHARE-based networking security from the DOS
    TCP/IP stack! Or more likely they just haven't caught up to Linux and
    are still using iptables.

    Whatever the case, almost immediately our box was rooted. FreeBSD
    proved to be aptly named as the box was "free to be hacked" by the entire world.
    Later on I would find out that despite its claims of being secure,
    FreeBSD's default configuration appears to start up every service
    known to man! I find it shocking that an OS commonly used for
    firewalls would have BIND running by default.

    Then there was the OpenSSH holes. I would later learn that FreeBSD has
    a history of remote exploits. Perhaps they should work with the team
    at RedHat, as RH knows how to secure their distros.

    After spending a week trying to patch a leaky firewall, I gave up. I
    found an Mac SE/30 and put OSX on it. I then installed Norton Personal
    Firewall. That became our firewall and I'm proud to say that its been
    happily running for two weeks without a single incident. I find it
    funny that despite FreeBSD users arrogant claims of superiority, a
    humble SE/30, running an OS that's loosely based on FreeBSD, performed
    much better. Perhaps its another failing of open source versus
    commercial software. Whatever the case, its clear that FreeBSD has a
    long ways to go before it can be taken seriously.

    1. Re:Using FreeBSD as a firewall by Anonymous Coward · · Score: 0

      Wow you have:
      a)a wicked, but misunderstood sense of humour
      b)a severely large malignant brain tumour
      or
      c)a crack habit like McBride and the SCO gang

    2. Re:Using FreeBSD as a firewall by BSD+Yoda · · Score: 1

      Is that you Egg Troll?

    3. Re:Using FreeBSD as a firewall by Anonymous Coward · · Score: 0

      you are a seriously uninformed person.

      I suggest you stay with that macintosh and windows formula, it will probably work well for you.

      Meanwhile -- i might refer you to IPF or IPFW for FBSD 4.x, and PF is also available for FBSD 5.x PF is arguable the BEST opensource firewall around....OpenBSD uses it......why cant you?

      As for the SSH exploits?? You need to cvsup your box ONCE in a while....there are even TOOLS to do it for you, like redhat's up2date......except the freebsd tools aren't FAGGISH and make you submit information to them to keep using the tools and update services.

      You should checkout portupgrade and the other port tools as well, they go well with cvsup.

      BSD uses the BSD license......kinda like GNU, but kinda not. Go read about it. thanks.

      BIND?? running by default??? not on my installs...not on ANY of them. sounds like a PEBKAC to me..

      (Problem Exists Between Keyboard And Chair..PEBKAC)

      lastly
      FREEBSD IS NOT "BASED" ON LINUX!

    4. Re:Using FreeBSD as a firewall by Anonymous Coward · · Score: 0

      wake up dude ... you have been trolled!

    5. Re:Using FreeBSD as a firewall by SkjeggApe · · Score: 0

      Troll troll troll... (Although I am impressed that the little punk managed to install OSX on a SE/30)

  9. A reason by Anonymous Coward · · Score: 1, Interesting

    An objection I have to the 'standard' OpenBSD install is the 'kill a process with processor time' problem.

    Named - running along fine than BLAM! Dead process.
    Or rsync as another example.

    I understand the 'why' - denial of service concerns via run away processes. But to deny a service you want by killing it? Naw, sorry. The cure is worse than the problem.

    1. Re:A reason by pkplex · · Score: 1

      What are you on about?

    2. Re:A reason by Anonymous Coward · · Score: 0

      I've been running OpenBSD for 5 or 6 years on a variety of platforms... Never seen this problem.

  10. FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

    Sorry about being off topic.
    To the guy I got into an argument with, and subsequently won: what do you think about this? eh?
    Yep, just show me one comparison in the last six months in which FreeBSD beats Linux. What was that? You have nothing?
    Thought so.

    1. Re:FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

      Oh, and by the way, it must have really pissed you off to have lost that argument, loser.
      Ha ha! Suck that you homo faggot bitch anus licker cock jockey mother fucker poo jabbing dick cheese eater.

    2. Re:FreeBSD vs Linux performance by zcat_NZ · · Score: 3, Funny

      How about server stability?

      take a quick look at Netcraft's longest-uptimes page and see what OS is most prominent on that page.

      Here's a summary for you.

      BSD/OS and FreeBSD: 50
      GNU/Linux (all distros): 0
      All other *NIX's combined: 0
      Windows (98, XP, 2k and 2k3): 0
      Mac OS and OS/X: 0

      I'd have drawn a pie chart, but I think you know what a circle looks like already..

      --
      455fe10422ca29c4933f95052b792ab2
    3. Re:FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

      uptimes would probably be a decent indicator (although many other variables come into play).
      However, in this case, Linux (and FreeBSD 4 current) can not represent uptimes of more than about 500 days.
      So that is meaningless.

    4. Re:FreeBSD vs Linux performance by __past__ · · Score: 1

      The only useful conclusion you can get from that data is that FreeBSD and BSD/OS (still two different OSes, by the way) are popular with lousy admins. Not updating your server for years isn't something to be proud of. I'll take the timely and easy to deploy patches of FreeBSD over it's ability to wait for script kiddies to own my mighty Apache 1.2.4 any day.

    5. Re:FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

      That's uh, not rebooting your server, not-not updating. Get a clue.

    6. Re:FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

      The statistic as measured still has no relevance.

    7. Re:FreeBSD vs Linux performance by __past__ · · Score: 1
      That's uh, not rebooting your server, not-not updating.
      Updating your kernel is pretty tricky to do without rebooting. Given that a kernel that old won't work with any userland for which the FreeBSD team would provide patches any more, I'd also guess that the userland is similarly old, or they are basically maintining their own forked version. Same for Apache, you won't get many patches for 1.2.4 any more.
      Get a clue.
      Get an account.
    8. Re:FreeBSD vs Linux performance by Anonymous Coward · · Score: 0

      When I was a high school hax0r (uh like 3 years ago), it was these types of machines which I looked for. FreeBSD has always been ripe pickings anyway. It makes good sense to stay current if you want to stay ahead in the security game.

    9. Re:FreeBSD vs Linux performance by __past__ · · Score: 1

      Heh. Just as we are talking, a new FreeBSD advisory - ARP-related remote DOS - hits my inbox, requiring me to patch my kernels and reboot... Oh the irony.

    10. Re:FreeBSD vs Linux performance by trippinonbsd · · Score: 1

      Would you reboot your server with the latest security updates if you made it into the netcraft top 50? Id build a new server and just keep the other one running to stay up top, i doubt that those old boxes do anything mission critical.

  11. Security by rf0 · · Score: 3, Funny

    Well taking recent events remove ssh and sendmail. Access via telnet only. No one will ever see my password that way

    Rus

  12. here's something exciting for the mods by xluserpetex · · Score: 3, Funny

    *generic BSD troll*

  13. Nice and comprehensive (and the obvious but) by dodell · · Score: 4, Insightful

    This is one of the most comprehensive articles I've ever seen about locking down a FreeBSD box. It covers stuff I didn't expect, including using schg to deny the ability to overwrite files.

    The but is that I felt it could have included more information about *why* you'd do these kinds of things instead of just how. This information would help people who are newer to FreeBSD understand how to expand on this. While it is comprehensive, I feel it could give people a little more idea of the 'why' rather than the 'how' so that people could do some securing of their own :).

    1. Re:Nice and comprehensive (and the obvious but) by Anonymous Coward · · Score: 0

      Append only and system immutable flags can also cause you lots of trouble. The problem is that if there's and exploit found in an application and its binaries are system immutable, how are you going to patch it? Lower the security level? Well that requires a reboot...

      How about append only flag on logs? This way no one can tamper with your logs. Well there's a little problem here... If you do this with logs that get lots of data, then you're going to see your /var partition get full. Well now you can't clean the logs without a reboot.

      So the thing to keep in mind here is that you have to think about what you're doing. Myself like to use scsi disks with read-only jumpers for partitions with system binaries. When you need to patch something, you just enable writing on your harddrive. This is unhackable without physical access. Of course someone could try to load a kernel module which would route access to some files to another location, so they wouldn't require write access to your data. Anyway if you raise the securitylevel, then you can't load modules.

    2. Re:Nice and comprehensive (and the obvious but) by Anonymous Coward · · Score: 0
      All well and good. However you are forgetting one simple little truth:
      FreeBSD is dying.
      Hope this helps.
    3. Re:Nice and comprehensive (and the obvious but) by Anonymous Coward · · Score: 0

      I have quickly scrolled through the article in about 45 seconds and decided not to read it. They believe that being stealth is a good idea. They think that "net.inet.tcp.syncookies=0" means "Block SYN Cookies ". Obviously they don't even know what syn cookies are. I don't think it's worth reading.

  14. Sendmail by spayeship · · Score: 2, Interesting

    Just wandering what sendmail uses port 587 for? I haven't disabled it in the past as I assummed it was need for sendmail to work, but maybe not according to this article!

    1. Re:Sendmail by scrytch · · Score: 3, Informative

      587 is the "mail submission port", and is designed to be the port on which mail is originated, leaving port 25 for transferring mail between MTA's. This has various properties in that they can treat authentication differently (SMTP auth is required on port 587), and therefore has a number of anti-spam properties as well as some other benefits. Obviously port 25 is not going away for MSA's anytime soon, but it's a step. One big adopter of this is AOL: AOL users using AOL network services (e.g. corporate accounts) already are required to use port 587 when not using an AOL dialup, as AOL already rejects direct-to-MX on port 25 for most dynamic IP's.

      It's all spelled out in RFC2476

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    2. Re:Sendmail by Ricin · · Score: 1

      Yeah like I said earlier, only with more fluff.

  15. Re:Sendmail port 587? by Ricin · · Score: 1

    %cat /etc/services |grep 587
    submission 587/tcp
    submission 587/udp

    %cat /etc/defaults/rc.conf | grep sendmail_submit
    sendmail_submit_enable="YES" # Start a localhost-only MTA for mail submission
    sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost"

  16. devil is in the details by epine · · Score: 3, Interesting


    This request is outrageous. There is any amount of material on the net already about security theory and practice. I've read most of it myself. How much of it am I practicing myself? Not very much. I'm not a full time sysadmin, I sysadmin during my recess breaks from my development activities. Why do I not bother to take security measures I hear preached on every street corner? Because the devil is in the details, and I can't afford to have my FreeBSD server go offline because ICMP was accomplishing something I didn't know about.

    This guide is more useful to me than another dozen sermons. It gives me confidence that I can lock down aspects of the system I don't have time to understand in depth with a modicum of confidence that the essential functions of my box will continue to perform.

    In my development life there are some aspects of security I work with daily: OpenSSH (tunnels, authpf), OpenSSL, IPsec. Despite my meager time budget to practice host-based security, I'm far from clueless about good security practices.

    Do people forget what an incredible sinkhole of human productivity security has become? A simple overview of X.509 destroyed a week of my time. Yet another horror show more easily avoided in theory than practice.

    One of the problems with Google is that you never see the thickness of the fully assembled tome. I recall an era where system documentation was measured in shelf-feet. Whenever I had the urge to make my life more complicated than necessary, I just had to look at that bookshelf and ask myself "do I really want to go there?"

    I'm at the point in my life where I'm never again going to set aside whole days to master intricacies like all the special perm bits on the FreeBSD implementation of FFS.

    I cherish the people out there who return from the trenches with a tattered cheat sheet with the barbed wire, machine gun nests, and landmine locations carefully documented. And then I read highly rated comments from the Rear Admiral types that "this is all well and good, but it isn't another volume of War and Peace". I would love to find to a complete set of VAX manuals on Ebay to donate to this idiot, but I don't think I could afford the shipping charge.

    What this article needs is not more theory, but more warnings about "if you experience this kind of problem after making these changes, you took your security measures too far too fast". The art of security is not in knowing what you ought to be doing, it's knowing *what you get away with hardening* given other constraints, such as having any time left over to accomplish something productive.

    I always remember the famous quote about building the Fermilab accelerator. When challenged about how Fermilab improved national security, someone shot back: Fermilab is the kind of project that makes America *worth* defending. People and nations who can't grasp that response end up eating their own tails.

    1. Re:devil is in the details by Anonymous Coward · · Score: 0
      epine writes,
      Do people forget what an incredible sinkhole of human productivity security has become? A simple overview of X.509 destroyed a week of my time. Yet another horror show more easily avoided in theory than practice.
      Excellent point. That is the reason I belive that OpenBSD has lost a sense of balance. It is becoming harder and more difficult to do the everyday productive things in OpenBSD. Sure if you turn off every service, and wall youself into a cloister cell, you might be more "secure" in a certain sense. But you have walled yourself in, away from ease of use and productivity. FreeBSD strikes a better ballance between paranoid delusions and normal productivity.
  17. MOD PARENT UP by Anonymous Coward · · Score: 0

    Funny stuff. My favorite line:

    "Or more likely they just haven't caught up to Linux and are still using iptables."

    Funny.

  18. Irrelevant by Anonymous Coward · · Score: 0

    Linux cannot achieve uptimes of more than about 500 minutes. So their disclaimer is meaningless.

    1. Re:Irrelevant by Anonymous Coward · · Score: 0

      I give you facts and you give me bullshit. Typical FreeBSD user.

    2. Re:Irrelevant by Anonymous Coward · · Score: 0

      All in good fun.

    3. Re:Irrelevant by Anonymous Coward · · Score: 0

      Facts?

      Naw, you are just a crapflooder.

    4. Re:Irrelevant by Anonymous Coward · · Score: 0

      Facts?

      Linux (and FreeBSD 4 current) can not represent uptimes of more than about 500 days.

      Thats right, facts. Who's the crapflooder?

    5. Re:Irrelevant by Anonymous Coward · · Score: 0

      http://uptime.netcraft.com/up/accuracy.html#cycle

      Facts:
      "Why do some Operating Systems never show uptimes above 497 days ?

      The method that Netcraft uses to determine the uptime of a server is bounded by an upper limit of 497 days for some Operating Systems (see above). It is therefore not possible to see uptimes for these systems that go beyond this upper limit. Although we could in theory attempt to compute the true uptime for OS's with this upper limit by monitoring for restarts at the expected time, we prefer not to do this as it can be inaccurate and error prone."

      from the see above:
      "Additionally HP-UX, Linux, Solaris and recent releases of FreeBSD cycle back to zero after 497 days, exactly as if the machine had been rebooted at that precise point. Thus it is not possible to see a HP-UX, Linux or Solaris system with an uptime measurement above 497 days."

    6. Re:Irrelevant by Anonymous Coward · · Score: 0

      It is all moot anyway. Realistically, BSD is dead. No, not a troll. But if you are objective, you realize that BSD is going nowhere. It had it's chance and lost. That's life.

  19. The gif was funny by Anonymous Coward · · Score: 0

    I had to laugh when I saw that gif. Put a smile on my face...sad, but true

  20. I submitted the parent. by Anonymous Coward · · Score: 1, Insightful

    And while the post was somewhat tongue-in-cheek, at the same time it outlined an underlying truth.

    NAT was cutting edge circa 1997; it's now 2003, very nearly 2004, and that means NAT is paleolithic technology. I am well aware that traditionally FreeBSD is thought to possess one of the nicest TCP/IP stacks in the business, and that much of that stack has made its way into commercial offerings, but still, at this point in time, the stack ought to be sufficiently modular that a computer with two network cards in it can be immediately turned into a NAT bridge/router with no more than a few lines of text in a configuration file, NOT A RECOMPILATION OF THE KERNEL!

    And no, those of us in the real world don't have time to Google for weeks on end trying to find instructions on just what it is we're supposed to do as part of this kernel recompilation, only to find that no two sets of instructions are the same. At the very least, there should be an official FreeBSD document at the official FreeBSD website that gives the officially sanctioned set of steps one needs to perform to get NAT bridge/routing up and running on a FreeBSD platform.

    1. Re:I submitted the parent. by Maxlor · · Score: 2, Informative

      You mean like the dedicated chapter on Network Adress Translation in the official handbook? (http://www.freebsd.org/doc/en_US.ISO8859-1/books/ handbook/network-natd.html)

    2. Re:I submitted the parent. by Anonymous Coward · · Score: 0

      but I would have to read - I mean everyone wants NAT in their kernels so i think it should be in it, aswell I believe everyone needs all sets of nic drivers and so on becaus I don't want to recompile.

      Bah.

    3. Re:I submitted the parent. by Anonymous Coward · · Score: 1, Funny

      I mean everyone wants NAT

      Go to a NANOG or IETF meeting and yell that REALLY loud. To make the trip profitable, I recommend an associate who sells sticks next to you labeled 'IP End to end connectivity'.

      Yes, you'll be beaten with sticks, but by selling the sticks you'll make alot of money.

    4. Re:I submitted the parent. by danielsdk · · Score: 1

      Have you ever tried ipfilter on freebsd?
      I think it is no inferior to iptables
      of linux based on my experience of both.
      Basically, I believe *BSD is more unix
      than linux.

    5. Re:I submitted the parent. by Anonymous Coward · · Score: 0

      You are an A-1 moron. WTF do you need services on a box for that may not be used? I don't need NAT on a webserver, shells box, name server, mail server, etc, etc etc... Why don't you go download all 6 of your RedHat distro just so you can install 10 file editors that do the exact same thing??? I'm sorry you don't have the time, patience, or undestanding of RTFM'ing. For one, I'm glad most of you l00sers have this uncanny despise of one of the best NOSs around.

  21. Re:not a great article by Anonymous Coward · · Score: 0

    Hehehe too bad some mods don't understand sarcasm :)

  22. Re:What We Can Learn From BSD by Anonymous Coward · · Score: 0

    Once again we have information that was misrepresented by over-simplicifaction and a few straw man arguments. You know, I think that I am glad for the FreeBSD trolls, because the more I research the crap-floods that go out from you guys, the more respect I have for FreeBSD.

  23. .asp by Anonymous Coward · · Score: 0

    does anyone else find it ironic that this guy is giving a tutorial on how to secure freebsd on a windows box?

    http://www.littlewhitedog.com/reviews_other_0002 9. asp

    1. Re:.asp by Anonymous Coward · · Score: 0

      I dont believe the guy who wrote it runs that website.. Just had the webmaster post it there.

  24. Re:Howto Secure a FreeBSD box by bsd_usr · · Score: 1

    Fine, then hack mine.

  25. Re:MOD PARENT UP by bsd_usr · · Score: 2, Funny

    No, no, no, no. This was the funniest line.

    "Then there was the OpenSSH holes. I would later learn that FreeBSD has
    a history of remote exploits. Perhaps they should work with the team
    at RedHat, as RH knows how to secure their distros."

    This really has to be modded up as humorous.

  26. Re:Do you still have to re-compile the kernel? by bsd_usr · · Score: 1

    IIRC, you can load them up as a module therefore you don't have to recompile the kernel. Well, I don't know the parent might have been a troll, if so then I fell for it.

  27. Huh? by Anonymous Coward · · Score: 0

    How do you secure something thats dead?

    1. Re:Huh? by Anonymous Coward · · Score: 0

      Bury it with quicklime.

  28. Re:Do you still have to re-compile the kernel? by larry+bagina · · Score: 1
    you must be thinking of linux (no joke, i had to recompile the kernel to use my standard ps/2 mouse with red hat 5... red hat 4 wouldn't get past the fdisk stage).

    The authoritive answer to *BSD setup questions is almost always on the *BSD website. Linux is a hodgepodge of out-of-date HOWTOs that usually refer to some obscure, now-abandonded beta software, and are often specific to a kernel version.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  29. YHBT YHL HAND by Anonymous Coward · · Score: 0
  30. Re:Sendmail port 587? by kjd · · Score: 1
    % grep 587 /etc/services
    submission 587/tcp
    submission 587/udp
    % grep sendmail_submit /etc/defaults/rc.conf
    sendmail_submit_enable="YES " # Start a localhost-only MTA for mail submission
    sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost"
    http://www.ling.helsinki.fi/~reriksso/unix/award.h tml
  31. BSD vs Linux by Kyle+Hamilton · · Score: 1

    Has anyone ever done a comparative study on the pros and cons of BSD vs Linux

    --
    Linux is like living in a teepee. No Windows, no Gates, Apache in house.
    1. Re:BSD vs Linux by aliquis · · Score: 1
    2. Re:BSD vs Linux by Anonymous Coward · · Score: 0

      Hmm lets see...

      Reliability - ok thats a hard one putting them both even is OK I guess.

      Performance - this is no longer true. Even FreeBSD developers concede Linux has the performance edge.

      Security - another hard one. Both can be made very secure, neither are very good out of the box which needs to be addressed. Maybe FreeBSD has the edge, I don't know. Maybe Linux does.

      Filesystem - this is no longer true. Linux offers a huge range of filesystems, some with higher data integrety assurances than FreeBSD's.

      Device drivers - Linux has always had more device drivers, supports more architectures, has more closed source drivers, etc than FreeBSD

      Applications - Linux is ahead of FreeBSD here.

      Development environment - Gee, you can write code that will work on one version of BSD and not another, or work in one release and not the next.

      Development infrastructure - He's comparing linux kernel with FreeBSD OS for some reason. Anyway, in terms of kernel development, Linux is much more open.

      So even if you wanted a comparison based on smiley faces, this is a bad one, and it is doubtful if it were ever good.

  32. Stupid Mistake combined with Remote Exploit by Anonymous Coward · · Score: 0

    I installed the mini ISO for FreeBSD 4.8 so I could cvsup Dragonfly and see what Matt Dillon was up to. Unfortunately, I was doing a few other things at the same time and stupidly left my cable modem on and didn't set a root password before rebooting. In the the time in took to go to the bathroom, I had a few more files in /usr directory - one of them being a @LongLink file with a http address in it.

    That is as bad as it gets. I'm running Redhat 8 because I have the disks and needed something with a GUI quickly. I'm scared of Windows after this latest virus onslaught - now I'm scared of my favorite OS. Will 4.9 be secure-by-default???

    1. Re:Stupid Mistake combined with Remote Exploit by Anonymous Coward · · Score: 0

      4.9 beta iso's are on the server.. why not give it a try and let us know..

    2. Re:Stupid Mistake combined with Remote Exploit by Anonymous Coward · · Score: 0

      Unfortunately, I was doing a few other things at the same time and stupidly left my cable modem on and didn't set a root password before rebooting. In the the time in took to go to the bathroom, I had a few more files in /usr directory - one of them being a @LongLink file with a http address in it.

      Let me see if I understand this. You, by choice, decided to put a null password in for root?

      And FreeBSD decided 'hey, you are the human, you know what you want' and allowed that.

      Hopefully you have not reproduced yet. Even if you had, go get fixed so you can't reproduce. Humanity doesn't need the average IQ lowered any further.

      That is as bad as it gets.

      No, what is even MORE amazing is how you expect anyone to belive you. Telnet is disabled BY DEFAULT, and ssh doesn't allow root login BY DEFAULT.

      You expect anyone who has more than 2 neurons to rub together to believe you?

    3. Re:Stupid Mistake combined with Remote Exploit by Anonymous Coward · · Score: 0
      When you get right down to brass tacks, only one thing remains:
      FreeBSD is dying.
      End of story.
  33. A critical look at BSD by Anonymous Coward · · Score: 0
    It is sort of a waste time learning this BSD stuff because, whether you like it or not, BSD is fading out. It is not in the mainstream. It is like the Amiga. Whether this fading from popularity constitutes "dying", I don't know, and I don't really care. What we do know is that when you choose a marginalized operating system you are not just choosing a tool, you are getting saddled with a hobby that you may not want.

    Margialized operating systems require you to jump through more hoops to get things accomplished. Not only do you have to track changes in your operating system, but you have to track changes in unsupported software and emulation libraries. You always have to tweak and use "work-around" because your hardware is not supported by any vendor.

    Things only get more hairy day by day as BSD becomes increasingly marginalized.

  34. Re:Elegy for *BSD by Anonymous Coward · · Score: 0

    It's called a eulogy you dumbfuck troll!

  35. Very useful by wellard1981 · · Score: 1

    I run a small unix shell provider running on BSD, and while I was running though this how-to, I came accross a number of things not set-up for a secure system.

    Congrats to the wonderful person who wrote this document, I found it increadably useful!

  36. Re:Elegy for *BSD by Anonymous Coward · · Score: 0
    Check it out:
    this Bitch iS Dead
  37. Re:not a great article by The+Evil+Couch · · Score: 1

    metamod to the rescue!

  38. Re:Sendmail port 587? by MrPink2U · · Score: 1

    And your point? Lets see if we can waste bandwidth instead...

  39. Re:MOD PARENT UP by Anonymous Coward · · Score: 0

    A default RH install has no services externally available, so it's really not very funny. It was 5 years ago.

  40. jooz fuX0red my b0x! by siskbc · · Score: 1
    Ho ho, he redeems himself! Well, here's how to configure it properly: chmod 000 /usr/libexec/sendmail/sendmail

    I tried that and now my friends can't get my emails. You don't know SHIT about locking down a box.

    Yes, I'm joking.

    --

    -Looking for a job as a materials chemist or multivariat

  41. Re:Do you still have to re-compile the kernel? by Anonymous Coward · · Score: 0

    I'm afraid FreeBSD is dying. Them's the breaks.