Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Security IT

Ask Slashdot: Security Digests For the Home Network Admin? 123

New submitter halcyon1234 writes "I'm currently cutting the webhost cord, and setting up a simple webserver at home to host a couple hobby websites and a blog. The usual LAMP stuff. I have just enough knowledge to be dangerous; I know how to get everything set up and get it up to date, but not enough to be sure I'm not overlooking common, simple security configurations. And then there's the issue of new vulnerabilities being found that I'm not even aware of. The last thing I want is to contribute to someone's botnet or spam relay. What readings/subscriptions would you recommend for security discussions/heads up? Obviously I already read (too much) Slashdot daily, which I credit for hearing about some major security issues. Are there any RSS feeds or mailing lists you rely on for keeping up to date on security issues?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Security Digests For the Home Network Admin?

Comments Filter:
  • by Idbar ( 1034346 ) on Friday June 15, 2012 @06:53PM (#40340421)
    When you're done with your setup. Post a story on Slashdot linking to your website, that's a fairly good stress test.

    Bonus points if you add something like "My awesomely new bulletproof website!". That should kick off the reliability test engines from /.
    • When you're done with your setup. Post a story on Slashdot linking to your website, that's a fairly good stress test.

      Not so much these days. Seeing a site get Slashdotted has been quite a rare thing recently.

      • Re: (Score:3, Insightful)

        if you wanna read about security, read Security Warrior. Hacking Exposed is good. Unix and Linux System Administration covers a lot. Masterminds of Programming has language guys talking about security.
    • Comment removed based on user account deletion
      • by DarwinSurvivor ( 1752106 ) on Saturday June 16, 2012 @01:38AM (#40342469)
        What part of "simple webserver at home to host a couple hobby websites and a blog" did you miss? It doesn't sound like he's planning to run a forum or high-traffic site here.

        @halcyon1234 Honestly, all you *really* need to do at the OS security level is get a router and only forward the web and ssh ports then use iptables to block problem-ips. Just make sure you set up keypair login for ssh and DISABLE password login completely. Of course you'll need to secure your website itself, but you hopefully already did that when running on the shared server.

        If you tend to get a fair bit of traffic (or attract unruly visitors), put your private lan on a second router that is connected to the one with the server (so the server has no access to the rest of your network). This way if the server DOES get compromised, your network is still safe :)
      • +1 on this comment. Don't forget the hosting providers who seem to "look the other way" while their co-located/vps/whatever scans the internet for weeks on end.
  • try this (Score:5, Informative)

    by Anonymous Coward on Friday June 15, 2012 @06:53PM (#40340423)

    http://www.securityfocus.com/

    • by spazdor ( 902907 )

      Seconded. This is almost all the security news you'll ever need to stay on top of as a UNIX adminustrator.

  • The same sources as those you use when you this professionally. Not much of a choice there really.
  • by GeneralTurgidson ( 2464452 ) on Friday June 15, 2012 @06:55PM (#40340451)
    Most ISPs do NOT allow this kind of stuff. While it might fly under the radar, there is always the possibility they will shut off your access. Besides, with a dynamic IP any change to it will take your website offline until DNS catches up. Hosting is cheap, I don't see why you'd want to cancel it unless it's hurting the bank.
    • by vux984 ( 928602 ) on Friday June 15, 2012 @07:42PM (#40340625)

      Most ISPs do NOT allow this kind of stuff. While it might fly under the radar, there is always the possibility they will shut off your access. /em

      In my experience, most ISPs really don't care. And if your hobby site/blog goes offline for a couple days... its not the end of the world.

      Also, in my experience with both the large local ISPs as well as 2 smaller ones, dynamic ip... on most broadband is essentially the same as static (*). You'll probably have the same IP address for years at a time (**) and they only change when they replace/upgrade the network and even if you are on static you will be assigned a new address occasionally as well due to network upgrades.

      So in practice, dynamic ip addresses changes only slightly more often than static ones, and the only difference is that with static ones they'll usually make an effort to give you a few days notice that you'll be getting a new address before it happens. But you still have the downtime as DNS propagates.

      (*) - I'm talking about static ip service on broadband. The static IP you get with a co-located server or T1 tends to be somewhat less likely to change than the static ip you get with a "Business ADSL" package, which still allocates your IP via DHCP, and the only difference real between static and dynamic is, as I said, they make some effort to give you a heads up before they change it on you.

      (**) - As an aside, this fact makes tracking users/households by ip address for advertising purposes fairly reliable.

      • Try again? (Score:2, Informative)

        by Anonymous Coward

        Most ISPs offer business accounts that you can do whatever you want(to a degree).

        • lowendbox.com

          lurk for a month, pick the cherries, and you can have 3 or 4 different vps in various countries for anywhere from 2 to 6 dollars per month apiece

        • by vux984 ( 928602 )

          True. But most of the time, you would just be paying more for nothing of substance.

          For a hobbyist web server with a personal blog, I wouldn't ante up to a 'business account' for a static ip and the right to run a server until the ISP challenged me on it.

    • by LordLucless ( 582312 ) on Friday June 15, 2012 @07:49PM (#40340677)

      Most American ISPs. The only Australian ISP I'm aware of who has this in their AUP is Telstra, and nobody who knows how to configure a setup like that would be using Telstra anyway. That's one of the advantages of a metered system - because the ISP gets paid more the more data you use, they have absolutely no motivation to try and limit your ability to move data. Whereas the US ISPs seem to spend more of their time figuring out how to block data-heavy protocols than actually trying to provide a service.

    • It's not really an under the radar thing. That particular language is mostly a leftover from days of lower speed unlimited plans. Even going back to dial-up. Today, none of the major ISPs care if you run a website on a home server as its impact is insignificant compared to seeding one or two popular torrents.
    • by EdIII ( 1114411 )

      It is highly likely that it is against the TOS.

      The dynamic IP is not a problem. Most routers these days have DDNS support and DynDns will allow you to specify amazingly small TTL's. I use it quite a bit for business since it is cheap (~$20/year) and a static IP change (some ISPs are retarded bastards that don't even tell you) does not have me rushing around changing VPN policies everywhere. Not to mention it makes it easier to configure a lot of services, such as security cameras, etc.

      The whole reason fo

      • by Bengie ( 1121981 )
        My local ISP claims no bandwidth caps and has nothing against P2P while openly flaunting their symmetrical speeds. At the same time, they state that hosting servers of any kind are against the ToS.

        Another interesting note is the openly claim that they will not monitor any of your data-streams unless it is pointed to them that your may be doing something illegal; And only then will they look for just the offending service, assuming it exists.

        Because they have no caps, don't care about P2P, and openly cla
    • by StormReaver ( 59959 ) on Friday June 15, 2012 @08:36PM (#40341129)

      Hosting is cheap, I don't see why you'd want to cancel it unless it's hurting the bank.

      Simple: control.

      I used pghoster for a while, because they provided PostgreSQL hosting. The service was fine until:

      1) They switched my hosting from Linux to BSD. That unnecessarily broke all my cron jobs, which I fixed with a fair amount of grumbling about time I didn't have.

      2) They made another infrastructure change. That unnecessarily broke all my cron jobs, which I fixed with a fair amount of grumbling about time I didn't have.

      3) They made some other change which broke my PHP, which I fixed with a fair amount of grumbling about time I didn't have.

      The bottom line was that they did not seek my input about what to change and when to change it. And their business model probably doesn't allow them to do so. After all, they have a lot of different users with a lot of conflicting demands. It's just the nature of shared hosting. I have no bad will towards the service, but the requirements of shared hosting are just incompatible with the requirements I have on my time.

      So I bought a cheap block of static IP addresses ($20 extra per month) that put me into the business class of customer; the class with the terms of service explicitly allowing me to run my own servers. I've been doing this for about six years now, and I would hate to ever have to return to shared hosting.

      And for those wondering why I didn't use a dynamic DNS service: I did, and they suck, suck, suck. But more importantly, I didn't want to find my Internet access sporadically terminated for violating terms of service.

      So yes, there are very good reasons for wanting to avoid the major hassles of shared hosting. For me, shared hosting's lack of of control was a deal killer.

      • you've used pghoster too? I had an account about 8 years ago. they were unreliable back then.. I see they haven't changed anything.

        • and to actually add something to the topic....

          I never was able to find a good shared hosting company.. just kept moving from one to another to another. Seems like they all have problems. Eventually you learn that it's a waste of time, and you should just lease a server. Here are my recommendations:

          Softlayer - if you want a server to yourself (was there 7 years, can only think of one problem -- when an NTT router failed and blocked autorize.net for about a day)
          Rackspace cloud servers - starts @ 12.50/mo
          Amazo

      • Simple: control.

        Another simple reason: they may not have the facilities you want - like GlassFish3 in my case.

      • Three words for you: Virtual Private Server.

        All the control you'd need, and none of the hardware maintenance.

      • by Bodero ( 136806 )

        I know the "cloud is bad" and all, but have you ever looked into Amazon Web Services' Free Tier [amazon.com]?

        You can run a low-volume server with whatever OS you want (though your choices may be limited in the free tier) for free.

        And when your site grows, you can scale up easily.

    • by phantomlord ( 38815 ) on Friday June 15, 2012 @08:36PM (#40341131) Journal
      My ISP expressly bans servers in their TOS, yet I've been running web/ftp/mail/ssh since my 24/7 connected dialup days at another ISP in the 90s and I've run various other servers for different uses over the years like anl IRC server where my friends and I would play networked AD&D games after I wrote some bots for various tools like dice rolling. I have a dynamic IP that changes every 12-24 months with the most frequent changes occuring about 6 years ago when it changed 3 times in one year.

      My ISP has never complained and none of it has ever been an issue... and in return, I've gotten a ton of experience, albeit not full blown enterprise level experience, of how to manage and run such services myself, including, for their day, a pretty massive number of incoming hits from freshmeat and slashdot when I mentioned some software I had written a decade ago (sure, the numbers were small compared to what goes on at enterprise servers, but I got to learn about throttling and whatnot to keep my then meager 384kbps uplink usable in such a situation). On top of that, there was learning about how to build/maintain NFS, LDAP, keeping filesystems backed up over the network, syncing my development box with my server with rsync, writing scripts to do things like automatically update my IP if/when it changes or to insert iptable rules for people trying to break into ssh/ftp, etc.

      Yeah, I could have just paid for hosting somewhere, but I would have learned a lot less... The hobby sites were mostly for fun but I had just as much fun learning how to handle the administrator side of it all. Chances are, those of us posting at slashdot are kinda nerdy like that and if we don't do it as a profession, we still might to want to learn such things as a hobby, at which point, doing it yourself is the best way. I also ran my own pre-LFS self-compiled/configured distro before eventually switching to gentoo to semi-automate it.
    • by cayenne8 ( 626475 ) on Friday June 15, 2012 @08:37PM (#40341151) Homepage Journal

      Most ISPs do NOT allow this kind of stuff.

      Do what I do...get a cheap business account with your ISP.

      I have had mine with Cox cable business for about a decade now...even moving around different places, they move it for me.

      It is only about $70/mo...I get about 10-15 down, and usually about 5-6 up for speed.

      I can run whatever servers I want...web, email, you name it, no ports blocked. I also have no data caps.

      I even get a low level SLA.....and the few times I"ve had trouble, I call in..if there is any wait, I just leave my name/number and usually it has never been more than about 6-10 minutes for them to call me back. Once..I found my connection had gone down a bit after midnight. I called, not expecting much...but damned if when we figured it WAS a line problem, they had a truck out there on the pole near my house in about an hour...freaking after 1am!??! The problem was solved that night (early morning).

      Frankly, I dunno why most people bother with the consumer level ISP crap...just pay a few more dollars and get a real connection that you can do with as you please.

      • by green1 ( 322787 )

        Problem is that where I live consumer 15 meg package costs me $40/month. Business 2.5 meg package costs $80 (and that's still a dynamic IP, for static it goes up to $120)
        VPS is $15/month for more than I could possibly use, and it doesn't affect my home connection, doesn't eat my electricity, and is more reliable.

        For me it was a no brainer.

        • Comment removed based on user account deletion
          • Cheap VPS (Score:3, Informative)

            by Mawen ( 317927 )

            I've been using a VPS for $3/month from 123systems.net. I haven't done much with it yet, and I don't know how consistent it is, but so far I have no complaints. buyvm.net was another I was looking at that I believe has an even cheaper option ($15/yr!). Like someone else said, check out http://www.lowendbox.com/ [lowendbox.com] to become informed about the options. Of course, you get only a pittance of ram/cpu for these bargain basement prices (and often limited availability -- buyvm sounds like a bit of a lottery), but

          • by green1 ( 322787 )

            My old VPS was with vpsville.ca for $19/month, I actually just switched to a buyvm vps for $5/month instead. (and I now get about 5 times as much resources as before too.

            As for a "Shared plan and called it a VPS"... I'm not sure what you mean exactly, but VPS is shared, that's the "virtual" part of it. I have a slice of a box, with specifically dedicated amounts of RAM/CPU/bandwidth.

            I previously shoehorned my VPS in to a very small package with vpsville by using some very lightweight server daemons (no apac

        • Wow..where do you live?

          What are the provider choices you have there? I forgot to mention I have a static IP for the price I listed too.

          What's in your area for cable? DSL?

    • Most is not the same as all. For example Cablevision allows some types of servers including web if you are in a tier above their base service. They even offer help dealing with a dynamic dns service.

    • Hosting is cheap, but so is a commercial account on many ISPs. My cox business account is only $20 more (40 vs 60) than residential. Plus, even though the advertised speeds are the same my business account speed is faster, and when i complain about any service disruptions they respond alot faster since its affecting my "business". You cam certainly get hosting cheaper than $20 a month, but not with 100% control over the host server...
      • Not everyone is lucky enough to have dirt-cheap ISP's like you. Pretty much anyone can rent from any VPS provider though.
    • by CAIMLAS ( 41445 )

      Besides, with a dynamic IP any change to it will take your website offline until DNS catches up.

      That may be true, but my ISP hasn't changed my home IP in the past 4 years. The only times I've had IP changes is when I've either moved or had a service level/type change, with multiple providers. With mail being able to be down for up to 3 days or so before things start to bounce, it's not really a problem. Generally, if the ISP isn't blocking it, it's considered good to go, despite any ISP documentation. (If you're causing security problems, that's another matter.)

    • Good point, and something I thought about. I'm with Tekavvy. They don't block ports, actively support home webservers, and provide a static IP for $4/month.
  • Good starting list (Score:2, Informative)

    by Anonymous Coward

    You may (or may not) know to do these things:

    Only allow SSH pubkey access for maintenance. Turn off remote passwords altogether in sshd_config.
    Move SSH to some non-standard port (away from 22). Just makes it harder for outsiders to find the port.
    Run something like denyhosts to kick off people trying brute force passwords on your server and to log their activity.
    Consider only allowing SSL (port 443) access to the webserver and close down all other ports in iptables.

    Just a few things (which may be obvious)

    • by Xtifr ( 1323 )

      If you're running a box on your own network inside your own house, why even have public-facing sshd at all? Just limit ssh access to machines on your own network.

      • by Bitsy Boffin ( 110334 ) on Friday June 15, 2012 @08:09PM (#40340851) Homepage

        Because there will come a time when you are away from home and will think
        "if only I had made SSH accessible I could fix the server right now using my mobile to ssh in, instead of having to go home"

        • SSH is also a pretty razor-thin vulnerability anyway. Most of the stories I've heard of getting "hacked" by SSH are nothing more then leaving password login turned on, and a really weak (say, "root" "root") password on a well known user account name.

          Turning off password authentication fixes that completely.

          Any web service you run is always going to be the far bigger problem.

    • by fa2k ( 881632 )

      Also, specify AllowUsers in the SSH config. Only allow your username to log in.

  • by Xtifr ( 1323 ) on Friday June 15, 2012 @06:56PM (#40340463) Homepage

    You said LAMP--well, most L distros have a security list you can subscribe to to keep up-to-date on this sort of thing. Also, Linux Weekly News (lwn.net) regularly posts security announcements from most major distros

    • Doesn't it do it automatically? With FreeBSD, there is, by default, a daily security report emailed to the root user - you can forward this to another account if you want. This includes things like login failures and installed software with known vulnerabilities (if you have portaudit installed).
      • FreeBSD daily security log does not include OS vulnerabilities discovered. You can though setup:

        portaudit - to keep up with application vulnerabilities, and
        freebsd-update - to keep up with the OS vulnerabilities

        portaudit will run with the daily security log. freebsd-update needs to be added to cron.

        you still won't know what freebsd-update is patching, and you won't know about any holes until a patch is released. For the actual security announcements, you have to subscribe the freebsd mailing list.

    • by mpol ( 719243 )

      Agreed. And running updates regularly on a supported distro should keep you mostly in the clear.

      Another thing, the software you install manually, like your CMS for blogging, you will want to keep that updated as well. You can follow those projects on twitter or facebook, so you'll keep uptodate with security fixes.
      I think this software is the most common attack vector.

      I had a Joomla 2.5.0 install that I forgot to update, and just a week ago someone broke into that and added user accounts to it. And it's jus

  • by ODBOL ( 197239 ) on Friday June 15, 2012 @07:02PM (#40340509) Homepage

    I am running a LAMP server (only the LA part active) with a few Web pages on my obsolete home desktop, with a slow ADSL connection. I don't have anything of serious value on the machine, so presumably an attacker would only benefit by using me as a bot. The system logs show regular access by the indexing services: Google, Yahoo, ... and lots of what looks like simple-minded dictionary attacks, and some probes for SQL/PHP features that are not available. None of the login attacks appears to have found my user name, much less hit the password. I use a long password, generated by a random generator. That seems to be enough.

    There is some chance that I am owned by someone I can't detect. But I never notice much activity on the CPU nor on the network, and my ISP doesn't complain that any bad behavior comes from my connection. If I suspected a problem, I would power off while considering my response.

    I have tripwire installed, but every time I try to check it I get confused by the pass-phrase management and put it off.

    • by HFShadow ( 530449 ) on Friday June 15, 2012 @07:07PM (#40340535)

      "That seems to be enough"

      Until you don't upgrade your kernel/sshd/apache and get hit by an exploit. Long password won't help you when there's an application exploit, which if you're using secure passwords, is the exploit you're likely to see.

      I subscribe to oss-security which is quite useful in keeping abreast of things, but may be overkill for a home webserver.

    • If You're talking about ssh login attempts, don't even use passwords. Set up public-private keys and disable password login entirely.
  • by Anonymous Coward

    I used to do this and stopped because there are so many attempts on a domain it seemed to slow down my internet connection. This was a long time ago, and it is possible there were some strategies I could have used with my router, but generally, it was pretty disruptive even though no actual breach occurred.

    Of course, that doesn't mean you shouldn't try. Good luck!

    • by green1 ( 322787 )

      Problem is, once it gets to your router, it's too late, your bandwidth is already gone.

      • Not really. If they are only hitting your router, then they use a little bit of download bandwidth and a little bit of upload bandwidth. If they hit the SERVER and it responds, then you are also wasting a TON of upload bandwidth (the expensive bandwidth).
        • by green1 ( 322787 )

          That depends, your server can just as easily be set up not to respond. Basically if you are trying to save resources that attackers are using, you either need your upstream provider to do it, or it really won't matter if your router or your server do the blocking. The only exception would be if your internal link from your router to your server is congested, but if that's the case than you really have bigger issues.

  • Ugh! (Score:3, Funny)

    by Anonymous Coward on Friday June 15, 2012 @07:35PM (#40340587)

    Where's the MyCleanPC guy when you need him?

  • by Anonymous Coward

    CERT?
    Can check http://www.us-cert.gov/current/ daily or get it in an RSS feed.
    There is also a mailing list.

  • by Anonymous Coward

    Forget running it at home, get an Amazon AWS Micro site; it's free and the default config is as secure as possible. IPTABLES is easy to configure via the AWS web gui or you can manually create better rules once on the system. AMZN keeps track of updates, you just have to remember to ssh in every once in a while.

    • by green1 ( 322787 )

      While I agree that a VPS provider is the way to go, saying that AWS is free is a bit of an exaggeration, their free tier has lots of limits, the most noticeable of which is that it's a limited time trial that expires after a year.

  • Some links and tips? (Score:4, Informative)

    by bobstreo ( 1320787 ) on Friday June 15, 2012 @07:46PM (#40340657)

    some sites:

    http://www.securitywizardry.com/radar.htm [securitywizardry.com]
    (a little heavy on the java)

    https://isc.sans.edu/ [sans.edu]

    You could subscribe to the CERT messages, but they kinda lag. There are some good security related mail lists which
    I can't remember at the moment...

    Check available updates for packages and kernel...
    Look at mod_security for apache

    If you're running wordpress or some other CRM app, be careful on how much you rely on third party packages

    If you have phpadmin or webadmin installed, you may want to limit what IP's have access to it.

    If you're running sshd, you may want to block bruteforce attempts after a certain number of bad tries, You should
    probably just use certificate based authentication instead of passwords.

  • Not too hard (Score:5, Informative)

    by sirsnork ( 530512 ) on Friday June 15, 2012 @07:50PM (#40340683)

    The best place to start is here

    http://www.us-cert.gov/cas/signup.html [us-cert.gov]

    then onto the security announce list of whatever distro you use.

    Those two alone will probably give you enough information to keep your system safe

    • I find the SANS [sans.edu] site very good as well. I usually have their "Storm Centre", "@Risk" and "NewBytes" in my daily RSS intake. It's a good overview of security happenings in general patch announcements, and the status of upcoming and unknown attacks that people are reporting. It's quite concise in the RSS format as well.

  • by Beeftopia ( 1846720 ) on Friday June 15, 2012 @07:50PM (#40340691)

    First: The only way to connect to your system is over a logical port. So, learn netfilter / IPtables and shut down all ports you don't need. The book "Running Linux" by Dalheimer and Welsh has a pretty good section on netfilter / IPtables. My recommendation - just leave port 22 and 80 (maybe 443 if you're having people log into your web application remotely). Default policy is drop packets unless it matches one of those ports.

    Second: Turn off remote root login, typically found in sshd_config. This'll stop much of the probing.

    Third: You don't want to allow someone to relentlessly try passwords. Get a program like Fail2ban. This will allow a certain number of login attempts before it bans the IP, just dropping the packets and not letting the password authentication module test them.

    Fourth: Strong username/password combinations. The attacker has to guess the correct combination. Get jiggy with it. Unusual username and unusual passphrase password. Especially for the root user.

    Fifth: Stop having Apache broadcast all of its version information. When someone is looking at response headers, they should see just that it's Apache and not Apache version XYZ. Apache loads several config files and reads them as one long config file (they're broken up for easier management). There's a setting in Apache to do that.

    Sixth: In Apache's config files, turn off directory listings. Again, a simple configuration text file setting which eludes me at the moment. Apache The Definitive Guide by Laurie and Laurie is a good book to have. This info is also available on the web.

    Seventh: Read your log files regularly. auth.log, error.log are very informative ones. Doing a lastlog command on a regular basis helps.

    Finally - What is security?
    1) You don't want people writing to where they shouldn't be writing.
    2) You don't want people reading what they shouldn't be reading.
    3) You don't want people executing what they shouldn't be executing.

    Set up permissions well. Don't change them willy-nilly but if reading/writing most stuff on your box requires being part of the root group, that's pretty good security.

    Finally, finally - keep reading various technical sites on the web for new security problems. Address as necessary.

    • by whoever57 ( 658626 ) on Friday June 15, 2012 @10:03PM (#40341611) Journal

      Second: Turn off remote root login, typically found in sshd_config. This'll stop much of the probing.

      Instead of disallowing root logins, turn off password-based authentication and use certificates instead. Also move your ssh port from 22 to a high unused port. Then install fail2ban (as the parent post suggested) or a set of iptables rules to ban excessive ssh connections.

      Seventh: Read your log files regularly. auth.log, error.log are very informative ones. Doing a lastlog command on a regular basis helps.

      Install logwatch and have it filter out much of the harmless information in the logs and report the interesting stuff to you.

      • Second: Turn off remote root login, typically found in sshd_config. This'll stop much of the probing.

        Instead of disallowing root logins, turn off password-based authentication and use certificates instead. Also move your ssh port from 22 to a high unused port. Then install fail2ban (as the parent post suggested) or a set of iptables rules to ban excessive ssh connections.

        Have we all forgotten the server is IN HIS HOME. Why have SSH enabled at all? (I'll second your suggestions for a remote server)

    • Re: (Score:3, Informative)

      by Anonymous Coward

      Third: You don't want to allow someone to relentlessly try passwords. Get a program like Fail2ban. This will allow a certain number of login attempts before it bans the IP, just dropping the packets and not letting the password authentication module test them.

      I stopped using fail2ban a few years back when botnets had become so large that every attempt from an obviously coordinated attack came from a different IP address. To get rid of the flood of log messages about failed login attempts I added some simple rules to my iptable config:

      iptables -A INPUT -p tcp --dport http -m string --algo kmp --string 'GET /some/page' -m recent --set --name KNOCK
      iptables -A INPUT -p tcp --dport ssh -m recent --rcheck --seconds 30 --name KNOCK -j ACCEPT

      This results in the ssh port

  • by taustin ( 171655 ) on Friday June 15, 2012 @07:52PM (#40340707) Homepage Journal

    On a publicly visible web server is to set up set the directive for the default web site (the first one in the virtual host list) to default deny to everyone. Then put your web site on a different virtual host. 99.9% of the scans I see come in by IP address, which gets them the default site. Any legitimate traffice will come in by domain name. This set up not only denies the script kiddes access to any PHP forms you've got, it convinces their 'bots to give up very quickly, which means less of a toll on your bandwidth.

    (As someone noted, the standard consumer highspeed account prohibits running servers. Many commercial accounts do, too, unless you told them you're running a server of some kind. You may also have to get them to unblock port 25 if you want to run your own mail server - be very careful if you do that, though. You don't want to be a spamfest rathole without knowing it.)

  • by BooRadley ( 3956 ) on Friday June 15, 2012 @07:56PM (#40340731)

    Your distro will have a regular patch channel that will address most vendor-introduced vulnerabilities. Patch religiously, and often. At least once per week. It's not like you're responsible for SLA's or regression testing. If you somehow uncover a bug when you patch, muscle through it, and keep going.

    Use a firewall and only expose necessary ports. Protect the ports with strong authentication, encryption where applicable, and possibly a reactive blocker such as fail2ban to keep the script kiddies at bay. If you must run an external SSH server, run it as a seperate process, and only allow key auth, and only for a single user.

    Get on whatever mailing lists or errata lists support your distro and apps, and try and keep up with them. If your apps are maintained as source, try and use the repos to update your apps instead of just relying on standard stable packages. You'll get bug fixes faster (probably bugs as well. See above)

    Use something like logwatch and read the daily mails.

    Also use something like rkhunter to alert you in case something changes.

  • Don't forget to be sure your isp does not block port 80. As mine does.. So nice of them. There are ways around it however..
  • I know Tenable has a free version of their Nessus scanner for home/research use, probably others do too. Download them and test them out and see what holes they find.

  • Slashdot was created to tell the world about the fabulous world of super efficient solar cells that never make it to market, not security silly bunny.
  • You should check a Hacking/security book that covers your installed OS. In terms of knowing any security issues, that is a little more complicated. Most Linux distributions are tied to version freeze where they do not include new version of packages, they only back-port security patches. For example, in Debian 6 (Squeeze) the latest (as today) version of php5 is 5.3.3-7+squeeze13, which in fact may give the assumption is outdated (latest in 5.3 branch is php 5.3.14), but it have been patched with all kn
  • 1 (one) tip for you (Score:3, Informative)

    by ReginaldBarclay ( 37949 ) on Friday June 15, 2012 @08:17PM (#40340951)

    It's called "staging".

    F*ck comments. F*ck all the other interactive "web 2.0" sh*t. Do your Wordpress or whatever, then suck it out of the DB, convert to static HTML, and put it on the external webserver.

    Problem (pretty much, well 99%) solved.

    • Re: (Score:3, Interesting)

      by spatley ( 191233 )
      Even better: use octopress http://octopress.org/ [octopress.org] and do commenting with disqus. And then run the smallest webserver you can find and turn everything else off. The best security is the simplest security.
    1. Get a security scanner or two (Nessus and eEye are good choices) and make sure your system is thoroughly vetted by them.
    2. Install AIDE or some other host intrusion detection software, and regularly verify nothing has been modified.
    3. Run everything at minimum privileges. Including the OS. If the OS doesn't need it, use capabilities to remove it.
    4. Minimize exposure, always. (If the only thing that needs to see the DB is the web server, then nothing else should know the server is even there.)
    5. Keep logs on a logging f
    • (Nessus and eEye are good choices)

      Both suck, especially eEye Retina for Linux. They always report findings on Redhat RHEL and most other stable distros because it just looks at the package major version numbers, without understanding that Redhat backports fixes. It's also somewhat limited in that it just tells you if you've got outdated packages and checks a few config settings. It will NOT tell you if you did something retarded like not scrubbing inputs to a sql query.

      I highly agree with the advice of removing anything non-essential. I

  • My company supports about 700 Debian servers that are running at customer sites; as far as I can tell, not a single one of these has been compromised due to an unpatched security vulnerability in one of the Debian packages. Configure some kind of auto-update (e.g. cron-apt); Debian is by default configured to only install security updates and these are usually released within one or two days.

    We did have a few servers that were compromised due to customer mistakes (unsafe root passwords especially) though

    • by maitai ( 46370 )

      Funny enough most rootkits that replace ls, ps, etc also set those binaries immutable. Which is a pretty notable change.

  • SmallNetBuilder has some good articles: http://www.smallnetbuilder.com/security/security-howto [smallnetbuilder.com] For example, consider installing pfsense firewall in front of your DMZ. Also, if you run your OS on Ubuntu I recommend installing apticron, which will alert you to new patches. Stay fully patched.
  • by wirelessduck ( 2581819 ) on Friday June 15, 2012 @09:35PM (#40341467)

    Bugtraq [wikipedia.org] and Full Disclosure [wikipedia.org] mailing lists are a good read. Almost all new vulnerabilities are posted to one of these lists. In addition, many Linux distros post their security notices here (Ubuntu used to, but now only posts on their own list). The CERT list mentioned by previous commenters is also good, even if it can be a little slow at getting the news out. Microsoft, Apple and others report their security notices through this list.

  • Steve Gibson's Security Now [twit.tv] podcast is worth listening to, and somewhat entertaining.

    Besides the 15 minutes of SpinRite advertising in every episode, I actually hear him talking about stuff that's not covered here or most of the other news sites. I'm sure it can be found elsewhere, but he provides a good aggregator service.

  • apt-get upgrade

    Kept me running secure for 10 years +

    also logwatch, tripwire for the paranoid...

  • Build a FNPP. I understand that the acronym is inferior, but I assure you that the actual end product is far far superior:

    FreeBSD
    Nginx
    Postgresql
    PHP

    You are then going to want to get the box configured properly with the following:
    geli encrypted root partition
    ZFS Filesystem
    geli encrypted swap
    Nginx in its own jail
    Postgresql in a separate jail and only listening on localhost
    the only network access to the main system (outside the jail) is through openssh
    have ssh use three factor authentication: 1. Password. 2.
  • Install fail2ban, especially if you're going to leave SSH open. You can configure some stuff to catch common web exploit attempts as well. You can probably get configured on any service you want. It plugs into iptables and bans IPs for set time periods for too many bad logins in a short period of time, hitting certain URLs, etc. It's highly configurable for just about any service you could want to run, and you can whitelist IPs and subnets. If you're running any admin control panels, cpanel, phpmyadmin
  • I've been getting this since 2004.

    There's an archive here to see if it helps you:

    http://www.qualys.com/research/sans-at-risk/ [qualys.com]

    Subscribing is here:

    http://www.qualys.com/company/compref/ [qualys.com]

    although I've been getting it since all you had to do was send an email.

  • I would start out by choosing a very minimal linux distribution. Install the minimal build of CentOS, Ubuntu Server, etc. Don't install a GUI or any unneeded packages. Install only the base, and SSH. You can install what you need after that. You could visit CIS(http://www.cisecurity.org/) and download a benchmark to use for hardening your Linux system. They have benchmarks that can be used for basic Linux hardening (most distributions are covered, and even if not, the same practices apply across the b
  • http://ipduh.com/search [ipduh.com] --upon a search click on the Security tag. It is just a search of the major security mailing lists , security advisories , etc ... However, to someone like you I would recommend to Setup automatic security updates instead of reading about security issues every day.
  • Lots of good advice above.

    What kind of websites do you have and how complicated are they? Do you really need a LAMP stack? I'd consider running a webserver on OpenBSD if you can tolerate it and actually need security. Otherwise, look at one of the better commercial like Linux distros, like CentOS. Patch regularly and follow tips from above regarding the networking config.

    Second, are you in the US and do you already itemize your taxes? This could become 100% business write off. Write off your DSL as a

  • I set up /tmp on a separate partition and added the noexec and nosuid tags.

  • Join the free bit of the site (community), signup for the vulnerability list in the profile page.

    Example:
    http://secunia.com/advisories/49457/ [secunia.com]

    They send 10-20 emails a day approx, easy enough to filter them to delete the irrelevant ones etc.

  • by drGreg ( 153424 )

    sans.org - there are a number of digests they have and their security training is excellent.

What is research but a blind date with knowledge? -- Will Harvey

Working...