Saturday, December 22, 2007

BSD Hack

The term hacking has an unfortunate reputation in the popular press, where it often refers to someone who breaks into systems or wreaks havoc with computers. Among enthusiasts, on the other hand, the term hack refers to a "quick-n-dirty" solution to a problem or a clever way to do something. The term hacker is very much a compliment, praising someone for being creative and having the technical chops to get things done. O'Reilly's Hacks series is an attempt to reclaim the word, document the ways people are hacking (in a good way), and pass the hacker ethic of creative participation on to a new generation of hackers. Seeing how others approach systems and problems is often the quickest way to learn about a new technology.

Friday, December 21, 2007

How to: Configure Linux to track and log failed login attempt records

Under Linux you can use faillog command to display faillog records or to .set login failure limits. faillog formats the contents of the failure log from /var/log/faillog database / log file. It also can be used for maintains failure counters and limits. Run faillog without arguments display only list of user faillog records who have ever had a login failure.more...

Wednesday, December 19, 2007

Building the Linux Kernel Image

This section explains the steps taken during compilation of the Linux kernel and the output produced at each stage. The build process depends on the architecture so I would like to emphasize that we only consider building a Linux/x86 kernel.
When the user types 'make zImage' or 'make bzImage' the resulting bootable kernel image is stored as arch/i386/boot/zImage or arch/i386/boot/bzImage respectively. Here is how the image is built:

Monday, December 17, 2007

Perl Programming

ERL was designed to be simple and direct. We outlined earlier that file manipulation and grep style functions are the bread and butter of PERL. Often times these types of tasks will require some form of user input. PERL can do exactly that (imagine that) and these next few pages of tutorial will walk you through the process step by step.

Sunday, December 16, 2007

Optimizing IBM DB2 for Solaris 10 1/06 OS on Sun Fire T2000 Server

This article is for users planning to deploy DB2 on the Solaris 10 platform using a Sun Fire T2000 server.
The information here is based on experiments carried out on DB2 with the Solaris 10 OS on the Sun Fire T2000 server in Sun's Market Development Engineering (MDE) and Strategic Applications Engineering (SAE) Labs in Burlington, Massachusetts. These tests used various workloads to identify configurations that allow the right mix of performance and ease-of-use. Results may vary for other users and environments.
Tips are provided here to help system administrators and DBAs optimize DB2 deployed with the Solaris 10 OS and the Sun Fire T2000 architecture.

Saturday, December 15, 2007

Reading from a pipeline with Perl

One of the great things about Perl is that it's very easy to run operating system commands, and read the output of those commands. Perl makes this process very easy and natural - it's just like reading data from a file.In this article we'll demonstrate the process of running external commands from within Perl, and then reading the output of those commands.

Friday, December 14, 2007

Upgrading FreeBSD

This document started as a follow up to The Ultimate Multimedia Server Guide and how to go about keeping your server up to date and patched with the latest O/S patches and security patches. The other reason for this document was to try and create an easy to follow update guide for the not so Unix savvy users that visit my website from time to time. My first time trying to upgrade FreeBSD from sources went well but trying to understand and piece together all the other documentation was more of a daunting task than actually upgrading.

Thursday, December 13, 2007

Get started with the Linux key retention service

The Linux® key retention service introduced with Linux 2.6 is a great new way to handle authentication, cryptography, cross-domain user mappings, and other security concerns for the Linux platform. Learn the components of the Linux key retention service and get an understanding of its usage with a working sample application.more...

Wednesday, December 12, 2007

Ethernet Bridges under Linux

Bridging is the process of transparently connecting two networks segments together, so that packets can pass between the two as if they were a single logical network. Bridging is performed on the data link layer; hence it is independent of the network protocol being used - it doesn't matter if you use IP, Appletalk, Netware or any other protocol, as the bridge operates upon the raw ethernet more.

Tuesday, December 11, 2007

Network scanning

Discover how to scan your network for services and how to regularly monitor your services to keep uptimes to a maximum. A key way of ensuring the security of your network is to know what is on your network and what services individual machines are at risk of exposure. Unauthorized services, such as Web servers or file sharing solutions, not only degrade performance, but others can use these services as routes into your network. In this article, learn how to use these same techniques to ensure that genuine services remain available.

Troubleshooting Perl CGI scripts

This resource is intended as a general framework for working through problems with CGI scripts. It is not a complete guide to every problem that you may encounter, nor a tutorial on bug squashing. It is just the culmination of my experience debugging CGI scripts for ten years. This page seems to have had many different homes ... more

Saturday, December 08, 2007

Bastille: Classic Linux and Unix Security

The glamorous new kids in the Linux security parade are SELinux, AppArmor, and all manner of virtualization technologies. (Though it is being discovered that virtual machines, just like chroot jails, aren't all that difficult to break out of, so don't count on them for strong security.) more..

Friday, December 07, 2007

Linux Shell Scripting Tutorial

This Linux Shell Scripting Tutorial is designed for people who wish to learn the fundamentals of shell scripting/programming. It also contains an introduction to power tools such as awk and sed. It is not the manual for the shell. While reading this tutorial you may find the manual quite useful (type man bash at $ prompt to see the manual pages). The manual contains all of the necessary information you need, but will not contain any examples which would make the ideas clear. Therefore, this tutorial contains examples rather than all of the features of the shell.

Thursday, December 06, 2007

Bash FAQ

This document contains a set of requently-asked questions concerning Bash, the GNU Bourne-Again Shell.Bash is a freely-available command interpreter with advanced features for both interactive use and shell programming.

Display Linux kernel slab cache information in real time.

Linux has tons of frequently used objects in the kernel such as buffer heads, inodes, dentries, etc. and have their own cache. The file /proc/slabinfo (less /proc/slabinfo) gives statistics. It is possible that slab cache information can be used to debug kernel problems (see crash command man page for more info) more...

Wednesday, December 05, 2007

Modularity: Keeping It Clean, Keeping It Simple

There is a natural hierarchy of code-partitioning methods that has evolved as programmers have had to manage ever-increasing levels of complexity. In the beginning, everything was one big lump of machine code. The earliest procedural languages brought in the notion of partition by subroutine. Then we invented service libraries to share common utility functions among multiple programs. Next, we invented separated address spaces and communicating processes. Today we routinely distribute program systems across multiple hosts separated by thousands of miles of network more...

Tuesday, December 04, 2007

What you already know. (should know) - About BASH.

First you probably need to read a UNIX command bible to really understand this tutorial, but I will try to make it as clear as possible, there is about 100-150 UNIX commands explained later in this tutorial. You are to have some UNIX experience before starting on this tutorial, so if you feel that you have UNIX/Linux experience feel free to start to learn here.

Monday, December 03, 2007

RHEL / CentOS Support 4GB or more RAM (memory).

If you have 4 GB or more RAM use the Linux kernel compiled for PAE capable machines. Your machine may not show up total 4GB ram. All you have to do is install PAE kernel package.
This package includes a version of the Linux kernel with support for up to 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
The non-PAE kernel can only address up to 4GB of memory. Install the kernel-PAE package if your machine has more than 4GB of memory (>=4GB).more...

Sunday, December 02, 2007


The perlfaq comprises several documents that answer the most commonly asked questions about Perl and Perl programming. It's divided by topic into nine major sections outlined in this document.

Saturday, December 01, 2007

Types of Firewall and DMZ Architectures

In the world of expensive commercial firewalls (the world in which I earn my living), the term "firewall" nearly always denotes a single computer or dedicated hardware device with multiple network interfaces. This definition can apply not only to expensive rack-mounted behemoths, but also to much lower-end solutions: network interface cards are cheap, as are PCs in general.
This is different from the old days, when a single computer typically couldn't keep up with the processor overhead required to inspect all ingoing and outgoing packets for a large network. In other words, routers, not computers, used to be one's first line of defense against network more.