2008-02-15

Indiana + Parallels 2.5 = No Network For You!

I know, I should probably fork over the cash for Parallels 3.0. The reasons I have not are as follows:

  1. As far as I can tell, there won't be much difference with OpenBSD as a guest OS which is primarily what I use Parallels for.
  2. Windows 2000, which I use only for VPN access to work a few times per month, works fine under Parallels Desktop 2.5.
  3. I don't like spending money.
With that out of the way, here's my OpenSolaris Indiana experience in a nutshell:
  • The Live-CD functionality is a breeze. Once it's up, it's fairly responsive considering the fact that it's running Gnome. I really don't like Gnome, but it gets the job done.
  • Installation is a breeze if you are willing to dedicate a whole hard drive to it. No word on how easy a multi-boot system is to configure.
  • Once installed, it's surprisingly nimble and smooth, with the caveat that it doesn't like NE2000-based ethernet cards (or their emulated analog via Parallels)
Now, Parallels Desktop comes with a CD image full of useful stuff just for this occasion. Included are drivers (Solaris 10 binary as well as source code) for the NE2000 card. As this release of Indiana doesn't ship with a compiler, I followed these instructions for installing the binary drivers on Developer Preview 1, but to no avail. "Network Auto-Magic" did nothing, and a reboot didn't bring the interface to life, either.

This was my first real brush with OpenSolaris. I use Solaris daily as part of my job, and one of my main desktops at home is a Sun workstation running Solaris 10 (I opted for the CDE interface at home due to the slower processor). As such, I'm certainly no stranger to Solaris. Despite being unable to bring the network to life, I can honestly say that OpenSolaris looks, feels, and smells an awful lot like Sun's enterprise UNIX operating system. If you know Solaris, you know OpenSolaris.

On the workstation, Solaris 10 is actually very feature-rich out of the box. OpenSolaris takes this a step further. Until you hit the command-line interface, it feels very much like an older version of Ubuntu Linux. I haven't bothered to see if Java is as deeply integrated into OpenSolaris as it is in the commercial OS, but if it is, that's yet another boon.

I may have another HiR writer check out OpenSolaris on a newer build of Parallels to see if we can get the network up and running. Otherwise, I'll probably shelve Indiana for a bit until I have somewhat capable lab machine available to test it on. Preferably, I'd like to test it as a desktop system (not as a server host), which means that I'll need an extended period of a month or so to really give it the kind of attention it needs.

2008-02-13

OpenSolaris Indiana (Developer Preview 2) Available

OpenSolaris Indiana is a project that's creating a binary distribution based on OpenSolaris source code that's both easy to install and use. It's worth checking out. I'm currently installing it within Parallels Desktop on my MacBook, and will also be playing with it some more when I get the free time to do so. Developer Preview 2 was released this week. A Live-CD distro similar to Ubuntu Desktop Edition is available. You can use it from the Live-CD or install it on a hard drive once the interface is up and running.

Giving FreeBSD another shot

I fell in love with FreeBSD for the first time around the early part of 1998. Although I'd heard of FreeBSD before, my roommate, Xeroline, introduced me to it formally. I'd been tinkering with Red Hat Linux and had grown tired of both the wild-goose-chase of RPM dependencies as well as the patchwork of software compiles that often had their own dependency problems. FreeBSD seemed, at the time, to be the answer to my prayers.

FreeBSD 2.2.8 was lean, mean, and very basic. It also brought with it the concept of the Ports system: a skeletal tree of software directories where one could simply utter the words "make install" and then sit back -- often for a very long time -- and watch software compile automatically and usually error-free. Initially, that's all I wanted. It was FreeBSD that pried me away from my Linux addiction, and I'd say that it's also FreeBSD that shaped much of what I've come to expect from a UNIX desktop OS. In short, I didn't want an easy, graphical install. I wanted an OS that would get up and running quickly, be quick on its toes, and give me as clean of a slate as possible from which to begin my adventures. I wanted a system that could be wrought from bare metal.

As time passed, FreeBSD got better, then worse. I had been using OpenBSD for servers since early 1999, and Shortly after the 5.x series came out, I got sick of FreeBSD and switched to OpenBSD 3.2 on the desktop and some of my laptops. That was more than 5 years ago. I seriously haven't touched FreeBSD since February of 2003. Until now.

I almost messed with FreeBSD 6.2 a few months ago. I downloaded the ISO images but never got around to burning them. The target install environment was going to be my Pentium 3 lab box, but at the time I was using it to do research for my Linux LVM2 article. The very same machine, in fact, kept getting re-purposed for various HiR research projects. The time has come, though, for me to square off against my quondam favorite desktop OS.

I've only been tinkering with it for about a day now, so I still have a way to go before I'm ready to give this a full review. All I can say is to stay on the lookout for some more FreeBSD love. I can immediately tell that they've worked out some of the major kinks in their package installation tools. The installation doesn't seem like it's changed much since the 4.x releases. For that, I'm thankful. It's just friendly enough for almost anyone to figure out, but not made of bloated graphics like the Ubuntu installer that takes forever to load.

I have a feeling I might start really liking FreeBSD again. Did anyone else feel alienated by the 5.x series, only to come back and try 6.2 or 6.3 and really like it?

2008-02-12

Old tech that I still love

Sure, I might loathe ye-olde mainframes, but there's actually a lot of retro-tech stuff that I love. Two of them are pictured left. The IBM Model-M Keyboard and MiniDisc.

The IBM Model-M is practically a tank, the mother of all ultra-durable keyboards. They're almost impossible to break or wear out. They have a springy tactile feel, and make a lot of noise when you type on them. Many people see this as a horrible turn-off, but there's a certain subset of people who really, really like it. I'm one of them.

MiniDisc is a somewhat failed experiment of the early 1990's, at least in the US. You can still buy MiniDisc players and recordable media, but they're getting increasingly difficult to find. One thing that I really enjoy about MiniDisc aside from the size is the fact that many of the portable MD recorders have optical S/PDIF ability as well. I actually use the MiniDisc player shown above quite often. I don't have a modern MP3 player with the exception of the CD-MP3 player in my car.

I could go on and on for quite a while about old-school stuff that I still love and use, but I'll save it for another day.

What are some old-tech things that you still love?

2008-02-11

Apple Releases OS X Tiger 10.5.2 Update

Just in case you haven't read it anywhere else (or everywhere else, as the case may be), Leopard users can now get Mac OS X 10.5.2, the much-awaited update to Apple's latest operating system.


The MASSIVE update, and links to more info can be found on the Mac OS X 10.5.2 page. Alternatively, you can just fire up Software Update and twiddle your thumbs for quite a while. It should be worth the wait.

YE OLDE MAINFRAMES ARE SCREAMING AT ME

As one who works in the financial services industry, I get the vituperation privilege of working with a mainframe on what seems to be at least a weekly basis, if not daily for weeks at a time.

As I fire up certain programs that are required for my job, I'm confronted with the following woes:

  • Certain software doesn't know what lower-case letters are or how to utilize them.  This, to me, comes off as THE MAINFRAME SCREAMING AT ME.
  • Version 2.08 of some program no one cares about anymore is now Y2K Compliant!  Oh, the joy!
  • A typoed query can easily ABEND certain applications, jettisoning the user back out to the ISPF or TSO prompt.  I jokingly call this "Crashing the mainframe" however I'm really just crashing a poorly written (non-mission-crtitical, mind you) application.
  • These insidious machines have somehow leveraged the ability to use electronic mail.  Simply not logging into the mainframe does not spare me from its wrath.  Occasionally, I will get e-mail from one of the nodes, again, tactfully crafted IN ALL CAPITAL LETTERS just so that I get the point.
I suppose I'm relatively young and as such biased towards the flexibility and interoperability of modern Open Systems over monolithic big-iron mainframe dinosaurs of hackneyed days (even if some of the mainframes in use aren't all that old)

2008-02-10

Sysadmin Sunday: Pure-ftpd configuration on Ubuntu Server Edition

0. Introduction

There are tons of ftp servers out there. Some are leftovers from the stone age others are fairly up to date with SSL capability and virtual user support. In this case I have chosen Ubuntu server and Pure-ftpd.

Why: Ubuntu comes out of the box unencumbered by unnecessary bloat that many server editions are forced to install out of a spider web of software dependencies. It at the same time has a very mature package management system which allows for easy software updates.

I'll stop there because I don't intend this to be a flame war on what Linux is best. An important difference that the Ubuntu installation has versus its native configuration is that it uses a configuration wrapper instead of modifying a start-up script. Which is why I am writing this article.

This article assumes that you have an intermediate or advanced knowledge of command line based UNIX operating systems.

-=-=-=-=-=-=-=-
Table of contents:
-=-=-=-=-=-=-=-
0.........Intro
1..........System setup and overview on what needs to be done

2..........Package installation

3..........Wrapper configuration with virtual users and SSL
4..........Access control via virtual users and iptables and or pure-ftp

5..........Informative resources

-=-=-=-=-=-=-=-


1.System setup and overview on what needs to be done

-=-=-=-=-=-=-=-
We will be needing an Ubuntu server edition installation. Preferably with a firewall in place.
In this case I have a pile of users who need to use dreamweaver to edit their web sites. Preferably they need to have their own logins, those logins need to be chrooted to their directory. Secondly, the users have no earthly reason to have a system user account.
For security sake I want the option for them to use encryption (once we can get licenses for the newer version of Dreamweaver which supports it). Lastly having these virtual users have disk space quotas so some idiot doesn't up load a ton of the family pictures that were taken with a 10 Megapixel camera and are like 20 Mb a piece causing the storage array to !#*& itself.

Pure-Ftpd can use arbitrary file paths for virtual user home directories. You can assign a local system user account and group for each virtual user or group of virtual users.

You can make a system user and group called webadmin who owns the "sites" folder under "/data/sites". All of the virtual users from a system standpoint are doing business as "webadmin". Pureftp does the job of doing access control and permissions on its end and keeping people in their home folders.
-=-=-=-=-=-=-=-
2.Package installation
-=-=-=-=-=-=-=-
Run the command:

apt-get install pure-ftpd
There is a GUI configuration tool but by default Ubuntu does not have a GUI so I leave that to you.

Once installed the wrapper configuration folder is on "/etc/pure-ftpd". The folder contains a structure like so:

root@stage:/etc/pure-ftpd# ls -al
total 32

drwxr-xr-x 5 root root 4096 2008-02-20 01:32 .

drwxr-xr-x 133 root root 12288 2008-02-20 01:32 ..

drwxr-xr-x 2 root root 4096 2008-02-20 01:32 auth

drwxr-xr-x 2 root root 4096 2008-02-20 01:32 conf

drwxr-xr-x 2 root root 4096 2007-06-21 19:01 db

-rw-r--r-- 1 root root 230 2007-06-21 19:01 pureftpd-dir-aliases

Under Auth you will find the following symlinks:
root@stage:/etc/pure-ftpd/auth# ls -alF
total 8
drwxr-xr-x 2 root root 4096 2008-02-20 01:32 ./
drwxr-xr-x 5 root root 4096 2008-02-20 01:32 ../
lrwxrwxrwx 1 root root 26 2008-02-20 01:32 65unix -> ../conf/UnixAuthentication
lrwxrwxrwx 1 root root 25 2008-02-20 01:32 70pam -> ../conf/PAMAuthentication
Delete all of these and make a symlink to "../conf/PureDB":
root@stage:/etc/pure-ftpd/auth# ln -s ../conf/PureDB
Go to the conf directory and edit the "PAMAuthentication" file to say NO insted of YES.
Add a new file called "ChrootEveryone" and edit it and add the word "YES".

Now lets make a user!
pure-pw useradd test -u webadmin -g webadmin -d /data/sites/localhost/ -N 25
pure-pw mkdb
Where -N is a 25 Mb quota and -u and -g is the userid and groupid of the corresponding system user. -d is the folder that the user is chrooted in. The command "mkdb" creates the binary password database.

Now we have our chrooted ftpd environment finished we just need to configure the ssl option.
now it is possible to FORCE users to use ftp-SSL however thats out side of the scope of this article.
(from the pure-ftpd documentation)
mkdir -p /etc/ssl/private  openssl req -x509 -nodes -newkey rsa:1024 -keyout \
/etc/ssl/private/pure-ftpd.pem \
-out /etc/ssl/private/pure-ftpd.pem

chmod 600 /etc/ssl/private/*.pem
Then go into "/etc/pure-ftpd/conf" and edit the file named "TLS" and add the number "1".
(0 disables encryption, 1 makes it optional and 2 makes it mandatory).

Now restart the service :
/etc/init.d/pure-ftpd restart

And login to your new ftp server!
-=-=-=-=-=-
4.Access control via virtual users and iptables and or pure-ftp
-=-=-=-=-=-
It pisses me off to read the logs and see all of the automated Interweb
exploit scripted attacks. So here are some suggestions to keep the
automated attacks down.

1. Hosts.deny doesn't work. Use Ip tables filtering.
2. Grab a blackhole ip list (BBL) from http://www.unixhub.com/block.html.
3. Determine your scope of service, if your users work only within the continental United States then blocking AP-NIC and any other non-local IP ranges in their entirety would be a good idea.

If you want to tie it down on a per-user basis try this:
pure-pw usermod testuser \
-r IP-ADDRESS-RANGE\

-R IP-ADDRESS-RANGE
where -r is allowed IP ranged and -R is denied ranges (Example: -R 200.0.0.0/8 -r 192.168.0.0/16)

-=-=-=-=-=-
5.Informative resources
-=-=-=-=-=-
Barnes, Robert. "Bad IP addresses/Bob's Block List (BBL)", (Accessed Feb, 2008)
http://www.unixhub.com/block.html

Denis, Frank. "Pure ftpd", (Accessed Feb, 2008)
http://www.pureftpd.org
http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS

Hornburg, Stefan (Racke). "Debian pure-ftpd-wrapper man page", (Accessed Feb, 2008)
http://www.penguin-soft.com/penguin/man/8/pure-ftpd-wrapper.html