Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

14 September 2009

pure-ftpd and tcpd_wrappers


Have you ever had to deal with fuckz0rs from all around the world trying to put shit on your server. Well I know I have to. Some of my customers got infected with some key-loggers and managed to get their ftp passwords stolen. Now I have to deal with that. This happened to me once before and the smartass datacenter admin was so thrilled to say: "you were 0wned, you were h4x0red, you were rooted, etc etc".
And Idiot that I was, I believed him. I started scanning my server for rootkits and that kind of shit instead of looking for the real thing. Just thinking about it makes me angry.

I've downloaded the binary and csv geoip database, managed to crawl through it via php module. I've got all the Slovenian IP ranges.Now I just have to configure pure-ftpd to work with tcpd_wrappers so I can get it to work with hosts.deny. Enough about that for now.

Any-who, I've ordered a new computer for myself today, it's been a long time since I've bought something for myself. For about two years now, I was only selling stuff ;) It's a quad-core with 8GB ram and 2TB hard drive, a kick ass graphics card and a big screen. All I have to do now is wait.



This is my current computer configuration

09 October 2008

Amazon S3 loweres prices, I love Amazon


As I said a couple of post before, amazon is great, and now they have lowered their prices dramatically, this will drive down my backup costs significantly.

Current storage price (through Oct 31, 2008)
US: $0.150 per GB
EU: $0.180 per GB

New storage price (effective Nov 1, 2008)
US
$0.150 First 50 TB / month of storage used
$0.140 Next 50 TB / month of storage used
$0.130 Next 400 TB / month of storage used
$0.120 Storage used / month over 500 TB

EU
$0.180 First 50 TB / month of storage used
$0.170 Next 50 TB / month of storage used
$0.160 Next 400 TB / month of storage used
$0.150 Storage used / month over 500 TB

In my last post about Amazon S3 I wrote about automating backups, here are some backup solutions that will make your life easier:

- s3sync.rb (A cool script written in Ruby).
- S3 Backup (Windows client).
- duplicity (A not so mature Python script).
- Brackup (A Perl script written by Brad Fitzpatrick).
- Jungle Disk (Windows, Linux, Mac client and also a local WebDAV server).

08 October 2008

Backing stuff up on Amazon's S3


Amazon Simple Storage Service can in one word be described as great, but that's still an understatement. You pay for what you use and it's still cheap.
I needed a good place to backup stuff from my new servers. Finding a good backup solution can be:
- hard
- costly
- time consuming
- frustrating

When considering the cost of a decent backup hard drive like 300GB WD VelociRaptor (282,15 Euros = 384,767955 U.S. dollars at the moment), power consumption, noise, unpredictable home electricity shortages and the fact that you have to buy at least four of those to be an effective backup solution, you realize that S3 is much much cheaper. My current backup costs at S3 are less than $13 a month. Now that's cheap.

That's where S3 shines. You register an account within minutes and you're ready to go. All you have to do now is to get some software (windows,mac,Linux) or write a simple Perl/Ruby script that automates your backups(Linux/Unix servers). There are also a lot of good existing scripts out there so you only need to modify them to suit your needs.

I've decided for a mixed method. Since there are a lot of files on the servers, I would pay more then necessary because of the $0.01 per 1,000 PUT, POST, or LIST requests. My servers use cPanel control panel and it has a good method of backing stuff up on the server. Every user account is packed and compressed in one file, so at the end of the day I don't have millions of files (PUT, POST, or LIST queries) but only let's say 100 - and that saves valuable money. cPanel makes backups and sends them over to my home server. Backups go into a folder which is configured to be shared with SAMBA throughout the windows network. What I did next was that I used Jungle Disk - a windows S3 client to automate my backups to S3.

The reason why I went through all these jumps are next:

- I saved my servers from bandwidth outside my country/continent
- Servers don't have to encrypt anything, so that's saved server CPU time
- My customers don't feel a thing, since the backups are done fast
- Everything I send to S3 from my home computers is encrypted

To be on the safe side I also save backups on my home servers throughout multiple hard drives, you never know...