I.T. Security and Linux Administration


March 2, 2012  11:49 AM

OpenVZ and Ubuntu: No loopback adapter



Posted by: Eric Hansen
127.0.0.1, 127.0.0.2, Loopback, MySQL, OpenVZ, Postfix, Ubuntu

For the past few months I’ve been working hard at getting my own business started and going.  Its definitely been a ride, and have learned a lot about business and I.T. that I didn’t think I’d ever touch on.  One of those I.T. aspects involves OpenVZ and their Ubuntu template (I use 11.04 x86), and the disappearance of lo, or the loopback adapter. Continued »

February 20, 2012  11:33 PM

Webmin (Part 1)



Posted by: Eric Hansen
Control Panel, cPanel, Part One, review, system administration, Webmin

There’s plenty of control panels out there, some free and some that a lot of money.  A very popular pay one is cPanel, and that is arguably THE most popular control panel for servers out there.  You can do a lot with it, probably more than most should be allowed to do (this coming from my experiences working with web hosting companies).  However, over the past few years, when I’ve wanted a control panel for my own use I’ve stuck with the free-side of things.  That where this little write up comes in.  I’m talking about Webmin, and for those of you that have used it, you know just how powerful it can be.

Continued »


January 27, 2012  12:43 PM

Is SMTP Authentication Necessary?



Posted by: Eric Hansen
authentication, Postfix, SMTP

Basically every guide you see online or read about on how to set up a SMTP server says you need to have SMTP authentication enabled to be safe (and to avoid open relay attacks).  While yes, you do need this if you’re running an enterprise-level system that requires remote connections from smart phones, laptops/PCs at home, etc…, what about those that do not run into this issue?

Continued »


January 3, 2012  3:38 PM

Linux Viruses



Posted by: Eric Hansen
2012 Paranoia?, linux, Virus

First off I want to wish everyone a happy New Year and may your new year be filled with even more security and safety!

Now, getting down to business.  You always hear the infamous words that Linux has no viruses.  Well, if this was true, then why are there virus scanners for Linux?  Sure, some could be to steal money from unsuspecting Windows-transitioners, but that doesn’t explain ones like ClamAV.

This is where the interesting part of this post comes in.  Not because I’ve come up with some revolutionary new breakthrough or that Linus is now the king of putt-putt, but because there’s documentation out there to illustrate how to write a virus for Linux ELF programs.

Who, might you ask, released this information?  Linux Journal in their January 2012 issue.  Before you go and read it hoping to copy/paste the code, the author states right off the bat that the harmful code is left as an exercise to the user as he doesn’t want to contribute to damage done.  Interested to see where this leads into this article? Continued »


December 22, 2011  12:04 PM

Passive vs. Restrictive Firewalls



Posted by: Eric Hansen
Firewalls, network, Passive, Restrictive, security

I started writing this article late last week or earlier this week, but some unknown issue happened (gotta love driver issues).  The point of this article is to cover the benefits and costs of both passive and restrictive firewalls.  When I first got into I.T. security I always thought restrictive firewalls were the most secure (which they are), and that passive firewalls were completely pointless.  However, over the years (and learning) I have found that they both really serve purposes, and just depends on what you are wanting the firewall to protect. Continued »


December 5, 2011  12:54 AM

Quick View of What’s to Come



Posted by: Eric Hansen

I didn’t intend on writing this post, in fact I had a whole idea for a post to write about but that will come tomorrow.  I want to address some things.  As this was a longer post than I originally intended, I’m placing a skipper (“Continued…”) part here. Continued »


December 4, 2011  12:43 AM

Can you crack it?



Posted by: Eric Hansen
Can you crack it?, Fun, GCHQ, Jobs, security

Its 12:40 AM here as I’m typing this, on a Saturday night, and what better thing to do than to discuss some security? :)  I’m all for healthy competitions (heck, I even partake in some wargames for the fun of it).  But this is one that could really benefit you.  Here’s the main points: the GCHQ (which is a British government organization) is using the web to recruit new people for their security team.  Now, this may not sound new at all to many because hey, who hasn’t used Craigslist or Monster to get people for a position?  This is different, however.  They are running this website called Can You Crack It? which upon visiting it prompts you with a welcome screen to crack a code.  Once you get the key code, apparently (though I can’t vouche as I haven’t cracked it myself) you’ll be presented with a true welcome screen.

This is pretty intuitive in my opinion.  In fact, I’ll be documenting my progress here during the duration of this project (which ends in 7 days).  Will I get it solved?  Most likely not…I’m not a wiz when it comes to this kind of stuff, but why not try and have some fun with it?  I’m not sure if you can have mulligans with this or not, but it does seem the code is static.  I’ll be posting more about this most likely tomorrow, after I drink some more hot chocolate and try to fuse every single brain cell I have to solve this. :D


December 2, 2011  4:05 PM

Custom Functions or API?



Posted by: Eric Hansen
API, debate, Twitter

Dave Taylor made an interesting editorial/tutorial in the most recent edition of Linux Journal where he decides to parse the Twitter HTML data to get how many tweets and such a user has made.  This got me to wondering something: is it worth it?  I mean, Twitter has a pretty robust API where you can already get this information.  Do they have a Bash library (which Dave’s article discusses)?  No, unfortunately, although that would be pretty interesting.  But, as most sysadmins use one language or another that does have an official library binding itself to Twitter, why not use that instead?

I know this sounds weird coming from me, especially since I tend to reinvent the wheel more than I should.  Most of the time I do that though it is to get a better understanding as to what is happening in those libraries.  Dave teaches us the use of regex, sed, grep and cURL…none of which really are beneficial to this process, and could possibly make it slower via Bash.

By now everyone should know I love Bash and its portability.  However, I do also feel in these cases, especially when its giving problems that are not easy to debug, it might be best to just use pre-made solutions.  Such is the case, for example, when I was trying to implement RSA into a PAM module I’m working on.  I could do it myself, but I know I would not make an efficient solution, so I decided to use a pre-made solution.

My question to the readers, though, is what do you think?  Is a bare-bones API (i.e.: Twitter) worth re-writing in a (lets be honest here) outdated language?  Or am I just going crazy and being attacked by holiday-cheerful penguins that want me to do nothing but work on benchmarking tests?


November 17, 2011  4:01 PM

Quick and Dirty Space Cleaner



Posted by: Eric Hansen
Bash, Scripts

I’ve been noticing my /var/log getting pretty full over the past week.  I’ve deleted some old logs that were made from logwatch, but wanted a better (read: lazier) solution.  Now, if you don’t care about the contents of the log files, then this is awesome.  However, generally I wouldn’t try this on a production environment unless you know the logs won’t be needed.  Here’s the one-liner I use:

for i in `find . -type f`; do echo '' > $i; done

This is assuming you’re in the “/var/log/” directory (or where ever your logs are stored).  A simple routine to just clear out the contents of every log.  This brought my /var directory from 92% usage to 22% usage (which, as a side note, has an allocated 4.6 GB of space).


November 16, 2011  12:10 PM

2048-bit SSL Keys



Posted by: Eric Hansen
2048-bit Keys, Analysis, Citrix, SSL, White Paper

Citrix put out an interesting white paper recently detailing the reasoning behind using 2048-bit SSL keys instead of the (technically) de-facto 1024-bit keys.  While the white paper is also to market and sell their own products, it does raise some interesting points…but, most importantly is there really a need to raise the bit-strength of our SSL keys?

Continued »