Archive

Posts Tagged ‘linux’

UML –> Xen. Very cool.

November 30th, 2007 No comments

The virtual server that I’ve been renting from Linode for several years has up until today, been using User Mode Linux (UML) for machine virtualization. Linode recently launched a beta testing program for a new Xen virtual hosting system. I signed up this evening and migrated my server over to the new Xen host. The migration went flawlessly – many kudos to Chris and the rest of the linode team. After the migration, my server booted up perfectly and almost instantly, I could feel the affects of the increased performance that Xen gives. Previously, while running on UML, there always seemed to be a bit of lag. Nothing huge, but from time to time, I could tell I was running in a virtual machine. Not any more – this thing is wicked fast. Best of all, Xen allows SMP guests, so my lowly virtual server now has 4 processors at its disposal. This is very, very cool. We’ll see how performance holds up once more guests are migrated to this machine, but I’m optimistic that things will continue to be quite snappy.

Here’s a screenshot of me compiling a new version of openssh. Note the four happy CPU graphs at the top of the screen. They make me happy :-)
CPU graph

Categories: general Tags: ,

16-way Windows Box? You don’t see this very often.

March 17th, 2006 3 comments

Yesterday we received, at work, a new server which will soon be tasked with running a high-load, SQL query intensive application. It’s a Quad-Intel Dual Core 2.66 GHz machine w/ 8GB of RAM and two 280GB RAID10 arrays. Since each of the 4 CPUs are dual-core, there are a total of 8 cpu cores to crunch through data. The catch, though, is that each of the cores are hyperthreading-enabled, so each of them shows up as two processors to the operating system. You do the math…the operating system thinks that it’s running on a 16-way system. I’d love to be running linux on this beast, as I believe you could squeeze quite a bit more raw processing power out of it…unfortunately, the application destined to run on this server is windows-only (for the time being). Nevertheless, geeks like myself seldom get to play with hardware as powerful as this, so I enjoyed myself immensely.

See this picture for a graphic illustration of the 16 CPUs.

Categories: general Tags: , , , ,

SSH brute force attacks

September 29th, 2005 3 comments

I know there are a few of you out there that admin linux boxes either for hobby or work, so I thought I’d pass this along…

If you pay any attention to your syslogs at all (which you should), you’ll already know this, but in the last year or so, the occurrance of SSH brute force attacks has gone up significantly. For the non-geek (a.k.a. people who have lives), SSH is a way of gaining access to a server remotely. For instance, the server I rent is actually in San Diego – so when I need to change something, I can’t just waltz up to it, turn the monitor on, and make the change. I have to run a program on my laptop called an SSH client which I use to connect over the internet to my server. Once the connection is made, all communications between the server and client are encrypted. Now – what’s this brute force you speak of? I’ll explain. There are many people around the world whose goal in life is to create as much mischief as possible – on the internet, this mischief often comes in the form of hacking attempts. Brute force attacks are a type of “hacking”. Basically, when someone launches a brute-force ssh attack, they try an arbitrary list of common usernames in combination with weak passwords. In server logs, it’s brutally obvious when an attack like this happens. See this for an example of what these attacks look like in the server logs. You can see that they’re just trying random usernames. 99% of the time, these attacks fail, fortunately, but every once in a while, they succeed in breaking into your system. Once that happens, they usually take over your server and use it for sending spam, viruses, etc. Not good – the end result after you discover you’ve been had is a server re-installation.

There are many ways to thwart these attacks – running sshd on a non-standard port, disabling password auth, implementing port knocking, etc. None of these options are acceptable for someone in my position, though, who has several (non-technical) users who need remote access into the machine to update websites, check email, and so on.

Enter DenyHosts. It’s a fairly simple python script written by a guy named Phil Schwartz. Put simply, DenyHosts runs periodically on the server, reading through the system logs. If it detects a brute-force attack, it adds the offending computer’s IP address to the /etc/hosts.deny file. This effectively cuts off all access to the server from that computer. Problem solved. Oh, and it also is able to send email to me when it detects an attack.

I was actually about mid-way through the process of writing a perl script to do just this when I stumbled upon DenyHosts. I gave it a try, and it worked just as advertized, so I figured it wasn’t worth re-inventing the wheel. That’s why I love open-source software. For the great majority of problems, there’s an open-source app that will get you ninety percent of the way to solving your problem, just requiring a bit of tweaking to bring the solution to completion.

So anyway – if you run a publicly-accessible *nix box w/ SSH available, I’d highly recommend you give DenyHosts a try. It really sets your mind at ease – not having to worry that some script kiddie is going to own your box.

Categories: general Tags: , , , ,

pfew – that was *close*

August 24th, 2005 7 comments

Our webserver at work went unresponsive a few minutes ago, and I thought I was going to need to reboot the thing, which would have been a shame:

erika@lpdweb erika $ uptime
 14:46:55 up 299 days, 14:21,  1 user,  load average: 0.06, 0.09, 0.07

I know that’s not the longest uptime ever, but it’s not too shabby. You just hate to reboot once you’ve gotten up that high.

I ended up just having to plug into the console and restart the network stack. Things came back up fine after that. I’ll have to grep through the logs now to see what really happened.

My boss likes to (sarcastically) joke with me about how I’m always rebooting our linux servers to fix things…I’m glad that I didn’t have to reboot this time. It would have given him more ammo to use against me :-)

Categories: general Tags: , , ,

…be a supervillian

May 4th, 2005 No comments

This just came across the TCLUG mailing list and I thought I’d share…

Switch to…

Yes I know – it’s flash. So sue me.

Categories: general Tags: ,