Jun
13
2010
0

Logwatch, Exim4 & SSH Attack Dictionary Prevention on Debian Lenny VPS

Thanks to the excellent tutorials over at Slicehost, I got an idea of some the things you need to do to secure your brand new virtual private server (VPS) straight away.  To me, the main takeaways with regard to security would be:

1. create a privileged user with Sudo access

2. disable the root account login

3. use strong passwords e.g. a combination of letters in upper and lower case, numbers and other characters

4. setup iptables firewalls

I had no idea how well these steps were working though in preventing unauthorised access and I don’t really have the time to access the the system logs every day. Wouldn’t it be great if there were a way you could just receive a daily email summarising significant security-related server activities?

Well there is! You just need to setup Logwatch by following the steps in this tutorial

You won’t get any emails set to you however if your VPS hasn’t already been configured properly to send email. This excellent tutorial explains how to setup Exim4 to send emails from your VPS.

One thing I noticed about this method though is that you may not receive emails sent to your email account; apparently some email providers automatically discard emails sent from servers without proper reverse DNS records. So if you find yourself not getting emails from logwatch, you will need to set up reverse DNS on your VPS (which you usually can do in your VPS control panel – or ask your provider to help you). Alternatively, you can set your VPS to send emails via the Gmail SMTP server – which practically guarantees that sent emails reach your inbox.

The first times I received my Logwatch reports via email, I have to admit to being shocked at just how many intrusion attempts my VPS receives on a daily basis! Several thousand a day (why do so many people have so much free time?) I found out that you can tweak your iptables to limit the number of intrusion attempts. In my example below, any IP address that has more than 3 SSH login attempts over 10 minutes gets blocked for 10 minutes.

-N SSH_CHECK
-A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_CHECK
-A SSH_CHECK -m recent --set --name SSH
-A SSH_CHECK -m recent --update --seconds 600 --hitcount 4 --name SSH -j DROP
-A SSH_CHECK -j ACCEPT

Note that this isn’t the most comprehensive guide to security on a VPS, but it’s a start!

Written by Syamsul in: IT | Tags: , ,
Jul
26
2009
1

Initial impressions of Sparkstation VPS

I’ve just been with Sparkstation for slightly more than a day on their Linux VPS. I thought I’d share some initial impressions, seeing that there is nary a review on these forums.
I chose their cheapest VPS plan (VPS Value) without any control panel because I’m comfortable with managing my VPS without Cpanel or Plesk etc.
I got my welcome emails for my VPS barely minutes after I made the payment – very refreshing indeed! I logged in by SSH and checked that the processor was indeed an Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (8 cores), as claimed.
At first I felt rather let down when I tested the connection speeds – it felt no more responsive than a VPS in the USA! I submitted a trouble ticket on Sat evening, and that very evening they diagnosed that it was an upstream issue, offered to move me to a different IP and did so shortly after I confirmed that I’d like this to be so. Very professional and quick resolution!
I’d ordered a VPS with Debian 4 thinking I would upgrade it to Debian 5 myself, but doing so proved to be troublesome and also broke the capabilities of Plesk Power Panel. Unlike with most OpenVZ hosting solutions, the user isn’t given the ability to rebuild his VM and switch Linux distributions on the fly (e.g. switch from Debian –> Ubuntu -> Fedora etc). This is probably a limitation of Parallels Virtuozzo? Anyhow, since CentOS 5 is the most updated Linux distro offered, I submitted a ticket to technical support on Sunday morning requesting for a complete rebuilding of my VM to one based on CentOS 5. Before Sunday noon, I got an email saying this was completed
Now, these 2 support incidents showed that Sparkstation support is indeed available over the weekend! They may not have 15 minutes response times, but then again they do not claim to provide it. For both incidents, they responded to my tickets in about 2 hours which I find to be decent.
I was initially worried about 256MB RAM not being enough at all for even small sites because with the OpenVZ VPSes I have been on, I quickly end up creeping into the (unreliable) “burst RAM” with a LAMP stack and a simple Joomla site. But it seemed that I needn’t worry after all – the SLM system that Sparkstation has chosen to implement in its Virtuozzo VPSes are noticeably more efficient in memory utilisation. I also like how this means that should a flood of visitors hit my site, it won’t shut down and require manual “rebooting” (as is wont to be the case on an OpenVZ VPS in my experience).
Finally, I find the pricing to be very reasonable, comparable to say renowned US-based Knownhost’s VPS when ordered without a Control Panel? The comparison doesn’t quite work with a control panel though – it seems like the likes of Knownhost or Media Temple are able to offer steep discounts on control panels, probably due to their sheer size? And they bundle managed services too…. Regardless, Sparkstation does appear to offer the best pricing among Singapore based hosting providers offering unmanaged, control panel-less linux VPS.
Will post an update after I’ve spent some more time with this VPS.

I’ve just been with Sparkstation for slightly more than a day on their Linux VPS ( and not, it’s not necessarily the same VPS this blog is presently on!)  I thought I’d share some initial impressions, seeing that there is nary a review of their VPS hosting services to be found anywhere!

sparkstation_logo

I chose their cheapest VPS plan (VPS Value) without any control panel because I’m comfortable with managing my VPS without Cpanel or Plesk etc. Also, I wasn’t sure how this experience would turn out, as I was more familiar with (cheaper) VPS hosting in the United States.

sparkstation_vps

I got my welcome emails for my VPS barely minutes after I made the payment via Paypal- very refreshing indeed! I logged in by SSH and checked that the processor was indeed an Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (8 cores), as claimed.

At first I felt rather let down when I tested the connection speeds – it felt no more responsive than a VPS in the USA! I submitted a trouble ticket on Sat evening, and that very evening they diagnosed that it was an upstream issue, offered to move me to a different IP and did so shortly after I confirmed that I’d like this to be so. Very professional and quick resolution!

I’d ordered a VPS with Debian 4 thinking I would upgrade it to Debian 5 myself, but doing so proved to be troublesome and also broke the capabilities of Plesk Power Panel. Unlike with most OpenVZ hosting solutions, the user isn’t given the ability to rebuild his VM and switch Linux distributions on the fly (e.g. switch from Debian –> Ubuntu -> Fedora etc). This is probably a limitation of Parallels Virtuozzo? Anyhow, since CentOS 5 is the most updated Linux distro offered, I submitted a ticket to technical support on Sunday morning requesting for a complete rebuilding of my VM to one based on CentOS 5. Before Sunday noon, I got an email saying this was completed

Now, these 2 support incidents showed that Sparkstation support is indeed available over the weekend! They may not have 15 minutes response times, but then again they do not claim to provide it. For both incidents, they responded to my tickets in about 2 hours which I find to be decent.

I was initially worried about 256MB RAM not being enough at all for even small sites because with the OpenVZ VPSes I have been on, I quickly end up creeping into the (unreliable) “burst RAM” with a LAMP stack and a simple Joomla site. But it seemed that I needn’t worry after all – the SLM system that Sparkstation has chosen to implement in its Virtuozzo VPSes are noticeably more efficient in memory utilisation. I also like how this means that should a flood of visitors hit my site, it won’t shut down and require manual “rebooting” (as is wont to be the case on an OpenVZ VPS in my experience).

Finally, I find the pricing to be very reasonable, comparable to say renowned US-based Knownhost’s VPS when ordered without a Control Panel? The comparison doesn’t quite work with a control panel though – it seems like the likes of Knownhost or Media Temple are able to offer steep discounts on control panels, probably due to their sheer size? And they bundle managed services too…. Regardless, Sparkstation does appear to offer the best pricing among Singapore based hosting providers offering unmanaged, control panel-less Virtuozzo-based linux VPS.

Will post an update after I’ve spent some more time with this VPS.

And  I should probably post about the other VPSes I’ve been with too!

Written by Syamsul in: IT | Tags: ,

TheBuckmaker WordPress Themes Kredit abgelehnt, InterTech Blog