Live data from Hacker News

How to set up a safe and secure Web server

arstechnica.com

121–130 of 148 posts

Re: How to set up a safe and secure Web server

#121
post #110

Earlier quoted context omitted.

This comment together with the ars article just gave me the biggest 90s flashback ever... really, so little has changed in over a decade??? Next up they just HAVE to show us how to setup our own quakeworld or UnrealTournament'99 or Quake3 server! ;-)

Well, rlpb's fundamental point is quite valid: Vendors have done tremendous work in making an OS secure out-of-the-box. I remember exposing default installations to the public Internet a decade or more ago and watching them get compromised in minutes, if not seconds. Virtually every platform required hardening, and the only thing protecting most ordinary users was the fact that exposure was intermittent via expensive…

indeed. Windows has come a long way too. I'm not the biggest fan of Windows (strictly personal preference) but I used to love Windows 2000. It was clean, simple yet had a lot of power behind it. Yet Microsoft left telnet turn on by default (and this was back before most homes had routes and thus hardware firewalls).

It was an amazingly short sighted move, but such things were typical back then. And it's only from learning the hard way that we've managed to get to the stage we're at now.

However I think it's often forgotten that servers need a different set of security profiles depending on the server's role and where it is sat. For example, a webserver sat behind a hardware load balancer wouldn't necessarily need much SSH protection as the webfarm HTTP traffic should be on a different VLAN to the internal systems administration traffic (which in turn, would be another different VLAN to the company's staff VLAN). So it would be almost impossible to get access to an OpenSSH log in, let alone attack it. Where as most consumer VPS solutions put all their customer servers in the DMZ, which means it's up to the customer to provide software preventions to harden against access that would normally be protected with a complex hardware solution in more professional / clustered set ups.

And this is why you can't fully trust default configs; there simply is no "one size fits all" solution so package maintainers instead opt for the best compromises.

Re: How to set up a safe and secure Web server

#122

Earlier quoted context omitted.

Google doesn't need virtualisation because Google is already deploying a large number of identical nodes which can be easily pulled and replace (i.e. Google's infrastructure is identical to virtualisation, but without the need for it). Most businesses don't have hundreds of identical servers and services. They have a few dozen very specific or niche ones which need high up-time. This is one area where virtualisation…

So, unless we are selling CPU hours, like owners of a mainframe or a hosting provider, we don't need any virtualization? Is it possible that the inefficiency and added unnecessary complexity makes a virtualized servers unusable for the most common server's tasks, due to I/O interference and cache/memory access complications?)

I never said anything about selling CPU hours. It has nothing to do with that. In fact my example about organisations directly contradict that.

It has to do with organisation and about being able to abstract logical servers away from physical hardware.

There is very little inefficiency (see hardware assisted virtualisation point above) and very little overt complexity (go play with any modern HyerVisor solution).

As I said above you don't understand how virtualisation works. Your points about "I/O interference" and "cache/memory access complications" just make you sound ignorant.

Re: How to set up a safe and secure Web server

#123

For anyone that wants more resources like this, I've found articles in Linode's library to be very helpful: http://library.linode.com/lamp-guides

Thanks so much for these links. Got a server coming for Christmas (best present evah!!1!) and was worried that I'd get completely lost trying to configure it blindly. Will definitely refer back to these on that jolliest of days

Re: How to set up a safe and secure Web server

#124

Earlier quoted context omitted.

Fail2ban is actually a vulnerability in itself. Say I worked out your home IP (not hard), then sent a large number of failed SSH attempts with the IP address forged as yours. You are now locked out if your home server.

That's why I whitelist my IPs in $ignoreip in jail.conf. Fail2ban is actually a vulnerability in itself. That's a bit harsh. It's true that you may have to tweak some settings to prevent or minimize DoS attacks, but even that risk is a far cry from an attacker gaining a login or rooting the box. Fail2ban has proven to be safe and reliable in the years I've used it. Nonetheless, the old maxim holds true: Know your too…

That's why I whitelist my IPs in $ignoreip in jail.conf.

If you are already able to whitelist your (valid) login points, why would you need fail2ban? Just whilteliste them in your firewall and/or /etc/hosts.allow.

Personally I've yet had anyone bruteforce my ssh-key (although, as I run Debian, that is just luck as it turned out...). Still, fail2ban wouldn't really have helped against an attacker that knows/can figure out my access token off line...

Re: How to set up a safe and secure Web server

#126

Earlier quoted context omitted.

So, unless we are selling CPU hours, like owners of a mainframe or a hosting provider, we don't need any virtualization? Is it possible that the inefficiency and added unnecessary complexity makes a virtualized servers unusable for the most common server's tasks, due to I/O interference and cache/memory access complications?)

I never said anything about selling CPU hours. It has nothing to do with that. In fact my example about organisations directly contradict that. It has to do with organisation and about being able to abstract logical servers away from physical hardware. There is very little inefficiency (see hardware assisted virtualisation point above) and very little overt complexity (go play with any modern HyerVisor solution). As…

Well, I'm really ignorant, when it comes to meaningless sentences like organisation and about being able to abstract logical servers away from physical hardware. You're probably right.

On the other hand, I'd been involved in a few projects, which includes optimization of a big centralized databases, so, I think, I know a bit about flows of data, access patterns and where the bottlenecks are (hint: around serializing and scheduling low-level I/O operations).

Try to look under the surface structure, which plain words are.)

Re: How to set up a safe and secure Web server

#127

It's also a good idea to install (and configure) at least some basic IDS like tripwire. You should probably have it do checks on a cron job as well as doing chkrootkit. Also a good idea to have your log files backed up somewhere else where your server does not have sufficient access to delete (or modify) them. Also if you have multiple web apps running, chroot them if at all possible so that if something does break o…

> You should probably have it do checks on a cron job as well as doing chkrootkit.

http://securityreactions.tumblr.com/post/36736148501/rkhunte...

I know it's a meme-grade blog but it really fits.

Re: How to set up a safe and secure Web server

#128
post #40

"...being locked to IIS as a Web server (or dependent on crippled Windows ports of better Web servers) means you'll be playing in the bush leagues. IIS is found running many huge and powerful websites in the world, but it's rarely selected in a vacuum..." I sense a little bit of bias. As a multiplatform developer I can think of a number of reasons why someone might opt to go the Windows Server route. ASP.NET MVC 4 is…

I tried to read the Bizspark FAQ, and now my head hurts. But anyways, what I think I was able to get out of it is that: 1. You have to apply. 2. You have to be approved, which takes a minimum of 5 business days, and you may not get approved. 3. At some point you "graduate" and lose your licenses and have to pay for software. The faq does not say when this graduation happens, but I seem to remember hearing something a…

True, but if you really wanted to go MS, you can just find a student willing to download and host it for you elsewhere..

Re: How to set up a safe and secure Web server

#129
Personally, I'd just pay $10/month or whatever and spin up a cheap VM on Rackspace, EC2 or similar with 256MB of RAM and a few gigs of disk storage. A simple web server really doesn't need a full on server (or desktop, even).

It's a bit different if you're expecting said site to get 100K+ views per day or is going to host some big database, but even then I'd probably run it in the cloud to save on bandwidth costs.

Re: How to set up a safe and secure Web server

#130
post #124

Earlier quoted context omitted.

That's why I whitelist my IPs in $ignoreip in jail.conf. Fail2ban is actually a vulnerability in itself. That's a bit harsh. It's true that you may have to tweak some settings to prevent or minimize DoS attacks, but even that risk is a far cry from an attacker gaining a login or rooting the box. Fail2ban has proven to be safe and reliable in the years I've used it. Nonetheless, the old maxim holds true: Know your too…

That's why I whitelist my IPs in $ignoreip in jail.conf. If you are already able to whitelist your (valid) login points, why would you need fail2ban? Just whilteliste them in your firewall and/or /etc/hosts.allow. Personally I've yet had anyone bruteforce my ssh-key (although, as I run Debian, that is just luck as it turned out...). Still, fail2ban wouldn't really have helped against an attacker that knows/can figure…

I need to support multiple roaming users. Manually maintaining whitelists would be a burden.

Fail2ban isn't a firewall. It monitors logs for suspicious activity and responds with an action (not limited to banning an IP). When you expose services publicly, it's one of many tools you can use to limit bad behaviour without penalizing or inconveniencing legitimate users. I also use iptables (including the recent and string modules), RBLs, and a host of other access controls. Security is a layered approach and redundancy isn't a bad thing.

Post reply on HN