(   )
                          (    )
                           (    )
                          (    )
                            )  )
                           (  (                  /\
                            (_)                 /  \  /\
                    ________[_]________      /\/    \/  \
           /\      /\        ______    \    /   /\/\  /\/\
          /  \    //_\       \    /\    \  /\/\/    \/    \
   /\    / /\/\  //___\       \__/  \    \/
  /  \  /\/    \//_____\       \ |[]|     \
 /\/\/\/       //_______\       \|__|      \
/      \      /XXXXXXXXXX\                  \
        \    /_I_II  I__I_\__________________\
               I_I|  I__I_____[]_|_[]_____I
               I_II  I__I_____[]_|_[]_____I
               I II__I  I     XXXXXXX     I
            ~~~~~"   "~~~~~~~~~~~~~~~~~~~~~~~~

Sun, 14 Sep 2014

Back to Slackware

It's been a while since I updated the phlog/blog. Funny how things like this tend to go in spurts, at least for me. I can write regularly for a while, then lose interest but always come back at some point.

I have an old Thinkpad I use on the rare occasions I travel, I've had Ubuntu on it but grew tired of the breakage after simple updates. The most recent was a complete loss of Network Manager. No idea what happened, but I found out while traveling when I could not attach to any wireless networks. The network-manager applet was gone, and I couldn't connect to even open APs using iwconfig manually. For some strange reason, at boot it would still connect to my home AP automatically. Probably why I never noticed until I had to connect to an outside network.

Anyway, I have very little patience for such bullshit any more, in years past I would have spent days working through a fix, this time I just installed Slackware (I actually first tried to install Trisquel from my FSF member card, but the wireless chipset in my Thinkpad requires non-free drivers). Works like a champ, with zero BS. And I don't have to worry about updates borking the system. In fact, even though 14.1 has been out almost a year, there were only about 20 or so updates (I'm not tracking current, of course). They installed flawlessly.

posted at: 15:32 | path: / | permalink | blog, linux, phlog, slackware, trisquel

Mon, 10 Sep 2012

Musings on Network Security

As a sysadmin, I have always thought simplicity should be a key guideline when securing Linux or Unix servers. That sounds rather meaningless by itself, so an example is in order. Anyone who spends time looking at the log files on an internet-facing server or firewall will notice the almost constant barrage of SSH brute-force attacks. SSH is indispensable as a remote administration tool, so it is likely to be installed on every such Linux or Unix system. Some admins like to install automatic analysis and blocking tools (e.g., fail2ban), but I dislike such tools because they are just another way of "enumerating badness" [1]. So I secure SSH with a set of simple changes:

Many admins balk at only allowing SSH from static IP addresses, especially with the prevalence of 'pseudo-static' IP addresses assigned to home cable or DSL modems. But it's not as limiting as you may imagine. Cheap VPS (SDF [2], Linode or AWS) systems routinely come with static IPs, and shell services like SDF offer login servers with static IPs. Agent-forwarding [3] can help make login through intermediate hosts convenient. If you must allow login from anywhere, configure a default-drop firewall and use single-packet authorization (SPA) [4] instead.

Each of these in isolation might not be very effective against a determined attack. But taken together, they provide a very secure environment for SSH. That doesn't preclude a server being compromised through some other network-accessible application, but with these changes SSH itself is quite secure. The idea, of course, is to secure all of your internet facing applications in similar, simple ways and if possible with a default-drop mindset. Web or Internet applications meant for public consumption are the one exception where default drop just isn't possible. Particularly in those cases, I add outbound filtering to host-based firewall rules. That way, if your shiny new wordpress install is ever compromised (when, not if), you can at least contain the damage.

Speaking of disabling PAM authentication, this quote from Patrick Volkerding, the creator of Slackware Linux is a great example of choosing simplicity:

If you see a security problem reported which depends on PAM, you can be glad you run Slackware. I think a better name for PAM might be SCAM, for Swiss Cheese Authentication Modules, and have never felt that the small amount of convenience it provides is worth the great loss of system security. We miss out on half a dozen security problems a year by not using PAM, but you can always install it yourself if you feel that you're missing out on the fun. (No, don't do that) [5]

It is notable that even today, PAM is not used in Slackware.

posted at: 18:25 | path: / | permalink | linux, networking, pam, security, slackware, ssh, sysadmin, tips

Wed, 06 May 2009

Linux is Boring, or Saved by the Slack

I've always thought that Linux would be less popular with hard-core geeks once it became mainstream - that the initial attraction was Linux's unpolished installation and configuration, how it let you get your "hands dirty". I started with Red Hat Linux back in 1995, and spent many long nights configuring and tweaking to get a usable system. The thrill was in the learning. I've recently found myself bored with Linux, I think mainly for the reason that there is no challenge anymore, no sense of accomplishment. Much of the user experience is now hidden beneath layers of graphical abstraction. I certainly do appreciate this, and use Ubuntu myself on my work boxen, as there are times you just have to get stuff done. But I still like to tweak and fiddle. There are also times when things go wrong, and simplicity rules.

read more after the break...

posted at: 14:08 | path: / | permalink | linux, slackware