Friday, June 22, 2012

Open Source Load Balancer for Linux



I know this topic is somewhat advanced for some of you, but for others hopefully this will be useful. So what is a load balancer? To better understand the term, let me explain to you a bit the meaning of load balancing.

In computing, particularly networking, load balancing is defined as evenly sharing the amount of work or load between two or more computers, network links, CPUs, or other resources in order to achieve optimum resource utilization, maximize throughput, decrease response time, and increase reliability thus maximizing uptime. Load balancing is typically utilized to moderate internal communications in computer clusters.

There are several popular open source load balancers or load balancing software applications for Linux, which can be used with almost any kind of service, including FTP, HTTP, DNS, SMTP, POP/IMAP, VoIP, etc. Here are some of them:


Linux Virtual Server
Linux Virtual Server (LVS) is the most well known and widely used Linux load sharing and balancing software. The project's main goal is to build a high-performance and highly available server for Linux using clustering technology, which provides good scalability, reliability and serviceability. The architecture of the server cluster is fully transparent to end users, and the users interact as if it were a single high-performance virtual server. The major work of the LVS project is now to develop advanced IP load balancing software (IPVS), application-level load balancing software (KTCPVS), and cluster management components.

To learn more about Linux Virtual Server (LVS), go HERE.


Ultra Monkey
Based on LVS, Ultra Monkey focuses on local area network load balancing and other highly available services using Open Source components on Linux that includes heartbeat and ldirectord from the Linux-HA project. Ultra Monkey is also producing a scalable, highlyavailable web farm, but it can be easily expanded to other services, like FTP or e-mail.

To know more about Ultra Monkey, go HERE.


Red Hat Cluster Suite
Available as additional programs to the highly reliable Red Hat Enterprise Server distribution, Red Hat Cluster Suite provides two different types of clustering namely Application/Service Failover and IP Load Balancing. Its Cluster Manager provides application failover, while its Load Balancer gives the ability to load balance IP traffic across a farm of servers.

You can learn more about Red Hat Cluster Suite HERE.


High-Availability Linux
High-Availability Linux (Linux-HA) project provides a high-availability and advanced solution across different operating system platforms. It promotes reliability, availability, and serviceability (RAS). Its main product is called Heartbeat, a GPL-licensed portable cluster management program for high-availability clustering.

To know more about High-Availability Linux, go HERE.

Email Tracking

When you recieve an email, you receive more than just the message. The email comes with headers that carry important information that can tell where the email was sent from and possibly who sent it. For that, you would need to find the IP address of the sender. The tutorial below can help you find the IP address of the sender. Note that this will not work if the sender uses anonymous proxy servers.



First of all, the IP address is generally found in the headers enclosed beween square brackets, for instance, [129.130.1.1]
Finding IP address in Gmail

1. Log into your Gmail account with your username and password.
2. Open the mail.
3. To display the email headers,

* Click on the inverted triangle beside Reply. Select Show Orginal.

4. manually find the IP address, proceed to 5.
5. Look for Received: from followed by the IP address between square brackets [ ].

Received: from [69.138.30.1] by web4587.mail.***.yahoo.com

6. If you find more than one Received: from patterns, select the last one.
7. Track the IP address of the sender

Hacking Wi-Fi Password (with good intentions) Using Ubuntu Linux


Hacking Wi-Fi Password Using Ubuntu Linux - I know a lot of you out there would love to know how to hack or crack Wi-Fi passwords from coffee shops or just about any place with managed or secured network.

Note: We do not encourage hacking on Wi-Fi networks without permission. Do it only for testing or for securing your own network.

I've already featured several hacking software before, and some of which can help you crack Wi-Fi passwords be it WEP or WPA protected. This time, I'm going to share with you some of my favorite wireless tools that can be used to hack Wi-Fi password using Ubuntu or any other Linux distribution:

Aircrack-ng
Aircrack-ng (a fork of aircrack) is my main tool for cracking Wi-Fi passwords. It has a wireless network detector, a packet sniffer, WEP and WPA/WPA2-PSK cracker, and an analysis tool for 802.11 wireless LANs. Aircrack-ng works with any wireless card whose driver supports raw monitoring mode and can sniff 802.11a, 802.11b and 802.11g traffic.

Kismet 
Kismet is a really good network detector, packet sniffer, and intrusion detection system for 802.11 wireless LANs. It will work with any wireless card which supports raw monitoring mode, and can sniff 802.11a, 802.11b, 802.11g, and 802.11n traffic. Kismet works in passive mode, which means it is capable of detecting the presence of both wireless access points and wireless clients without sending any loggable packets.

SWScanner
SWScanner is specifically designed to make the whole wardriving process a lot easier. It is also intended to manage many tasks related to wireless networking. SWScanner is compatible with NetStumbler files and can be integrated with GPS devices.

These are only three of the many wireless tools that can get you going in no time, so feel free to explore.

I don't want to give a step-by-step instruction just yet on how to hack or crack WiFi password using Ubuntu, but for a little inspiration, I'll share with you a YouTube video that pretty much illustrate the process of using those Wi-Fi hacking software:


Happy WiFi hacking. But again, be responsible and do it only for testing or if you have permission.

Security Software Tools for Linux

Linux is a hacker’s dream computer operating system. It supports tons of tools and utilities for cracking passwords, scanning network vulnerabilities, and detecting possible intrusions. I have here a collection of 10 of the best security software tools for Linux. Please always keep in mind that these tools are not meant to harm, but to protect.

1. John the Ripper

John the Ripper is a free password cracking software tool initially developed for the UNIX operating system. It is one of the most popular password testing/breaking programs as it combines a number of password crackers into one package, autodetects password hash types, and includes a customizable cracker. It can be run against various encrypted password formats including several crypt password hash types most commonly found on various Unix flavors (based on DES, MD5, or Blowfish), Kerberos AFS, and Windows NT/2000/XP/2003 LM hash. Additional modules have extended its ability to include MD4-based password hashes and passwords stored in LDAP, MySQL and others.

2. Nmap 

Nmap is my favorite network security scanner. It is used to discover computers and services on a computer network, thus creating a "map" of the network. Just like many simple port scanners, Nmap is capable of discovering passive services on a network despite the fact that such services aren't advertising themselves with a service discovery protocol. In addition Nmap may be able to determine various details about the remote computers. These include operating system, device type, uptime, software product used to run a service, exact version number of that product, presence of some firewall techniques and, on a local area network, even vendor of the remote network card.

Nmap runs on Linux, Microsoft Windows, Solaris, and BSD (including Mac OS X), and also on AmigaOS. Linux is the most popular nmap platform and Windows the second most popular.

3. Nessus

Nessus is a comprehensive vulnerability scanning software. Its goal is to detect potential vulnerabilities on the tested systems such as:

-Vulnerabilities that allow a remote cracker to control or access sensitive data on a system.
-Misconfiguration (e.g. open mail relay, missing patches, etc).
-Default passwords, a few common passwords, and blank/absent passwords on some system accounts. Nessus can also call Hydra (an external tool) to launch a dictionary attack.
-Denials of service against the TCP/IP stack by using mangled packets

Nessus is the world's most popular vulnerability scanner, estimated to be used by over 75,000 organizations worldwide. It took first place in the 2000, 2003, and 2006 security tools survey from SecTools.Org.


4. chkrootkit

chkrootkit (Check Rootkit) is a common Unix-based program intended to help system administrators check their system for known rootkits. It is a shell script using common UNIX/Linux tools like the strings and grep commands to search core system programs for signatures and for comparing a traversal of the /proc filesystem with the output of the ps (process status) command to look for discrepancies.

It can be used from a "rescue disc" (typically a Live CD) or it can optionally use an alternative directory from which to run all of its own commands. These techniques allow chkrootkit to trust the commands upon which it depend a bit more.

There are inherent limitations to the reliability of any program that attempts to detect compromises (such as rootkits and computer viruses). Newer rootkits may specifically attempt to detect and compromise copies of the chkrootkit programs or take other measures to evade detection by them.


5. Wireshark

Wireshark is a free packet sniffer computer application used for network troubleshooting, analysis, software and communications protocol development, and education. In June 2006, the project was renamed from Ethereal due to trademark issues.

The functionality Wireshark provides is very similar to tcpdump, but it has a GUI front-end, and many more information sorting and filtering options. It allows the user to see all traffic being passed over the network (usually an Ethernet network but support is being added for others) by putting the network interface into promiscuous mode.

Wireshark uses the cross-platform GTK+ widget toolkit, and is cross-platform, running on various computer operating systems including Linux, Mac OS X, and Microsoft Windows. Released under the terms of the GNU General Public License, Wireshark is free software.


6. netcat

netcat is a computer networking utility for reading from and writing to network connections on either TCP or UDP.

Netcat was voted the second most useful network security tool in a 2000 poll conducted by insecure.org on the nmap users mailing list. In 2003, it gained fourth place, a position it also held in the 2006 poll.

The original version of netcat is a UNIX program. Its author is known as *Hobbit*. He released version 1.1 in March of 1996.

Netcat is fully POSIX compatible and there exist several implementations, including a rewrite from scratch known as GNU netcat.


7. Kismet

Kismet is a network detector, packet sniffer, and intrusion detection system for 802.11 wireless LANs. Kismet will work with any wireless card which supports raw monitoring mode, and can sniff 802.11a, 802.11b and 802.11g traffic.

Kismet is unlike most other wireless network detectors in that it works passively. This means that without sending any loggable packets, it is able to detect the presence of both wireless access points and wireless clients, and associate them with each other.

Kismet also includes basic wireless IDS features such as detecting active wireless sniffing programs including NetStumbler, as well as a number of wireless network attacks.


8. hping

hping is a free packet generator and analyzer for the TCP/IP protocol. Hping is one of the de facto tools for security auditing and testing of firewalls and networks, and was used to exploit the idle scan scanning technique (also invented by the hping author), and now implemented in the Nmap Security Scanner. The new version of hping, hping3, is scriptable using the Tcl language and implements an engine for string based, human readable description of TCP/IP packets, so that the programmer can write scripts related to low level TCP/IP packet manipulation and analysis in very short time.

Like most tools used in computer security, hping is useful to both system administrators and crackers (or script kiddies).


9. Snort

Snort is a free and open source Network Intrusion prevention system (NIPS) and network intrusion detection (NIDS) capable of performing packet logging and real-time traffic analysis on IP networks.

Snort performs protocol analysis, content searching/matching, and is commonly used to actively block or passively detect a variety of attacks and probes, such as buffer overflows, stealth port scans, web application attacks, SMB probes, and OS fingerprinting attempts, amongst other features. The software is mostly used for intrusion prevention purposes, by dropping attacks as they are taking place. Snort can be combined with other software such as SnortSnarf, sguil, OSSIM, and the Basic Analysis and Security Engine (BASE) to provide a visual representation of intrusion data. With patches for the Snort source from Bleeding Edge Threats, support for packet stream antivirus scanning with ClamAV and network abnormality with SPADE in network layers 3 and 4 is possible with historical observation.


10. tcpdump

tcpdump is a common computer network debugging tool that runs under the command line. It allows the user to intercept and display TCP/IP and other packets being transmitted or received over a network to which the computer is attached.

In some Unix-like operating systems, a user must have superuser privileges to use tcpdump because the packet capturing mechanisms on those systems require elevated privileges. However, the -Z option may be used to drop privileges to a specific unprivileged user after capturing has been set up. In other Unix-like operating systems, the packet capturing mechanism can be configured to allow non-privileged users to use it; if that is done, superuser privileges are not required.

The user may optionally apply a BPF-based filter to limit the number of packets seen by tcpdump; this renders the output more usable on networks with a high volume of traffic.


Do you have a favorite security software tool for Linux? Feel free to comment and tell us about it. 

How to Backup Linux Applications


We've already talked about the best backup software for Linux. These applications save you from losing all your data In case of some unforeseen incident. Moreover, if you’re using the latest version of Ubuntu, you’ll find a backup software (Deja Dup) already installed and ready to be used. So, one cannot stress more on the importance of backing up your data and staying on the safer side.

That said, not everything can be backed up so easily. In other words, backing up music, videos, documents, and even saved games can be quite easily achieved with the help of some popular tools. Or even you can copy all the data manually to some external hard drive, thus making the process even simpler. However, backing up applications, especially the ones on Linux, is not something many people go for.
Distro-hoppers like me just punch in a string of commands and all my favorite applicationsget installed without any problems. But for new users, who are formatting their hard drive for some reason or the other, and are tired of reinstalling everything again, there’s finally a simple solution to their woes. Here’s a small how-to article on backing up your favoriteapplications on Linux:


APTonCD
APTonCD, as the name suggests, is a free tool that lets you backup all your installedapplications onto a CD or DVD. Once installed, the Application lists all your packages and lets you burn them on a CD or DVD. You can, of course, choose which ones to burn and which not to burn.

To get started with it, simply type in or paste the following command in your terminal (Ctrl + Alt + T) if you’re using Ubuntu:

sudo apt-get install aptoncd

If you’re on any other distribution, feel free to download the tool from their website.

Once installed, open it by searching for APTonCD in the launcher (Super key). Theapplication is very easy to use and you can backup all your apps in 3 simple steps.

Step 1: From the Welcome screen, hit the Create button.

Step 2: Choose the packages you want to backup. If there are more packages you want to add, click on the Add button to include more deb files. Finally, once you’re done, hit the Burn button.

Step 3: Select the medium (CD or DVD) and the destination of the image file and then hit Apply. Once you've created your backup CD, open up APTonCD on that computer and just hit the Restore button from the Welcome screen (refer to Step 1).

A simple command list

If APTonCD isn't your cup of tea then a simple list of commands will help you backup almost all your important applications. Firstly, make a list of all the important applications that you use on a daily basis. If you can’t find the package names, simply hit the following command:

sudo dpkg --list

Then once you've made a list, write out the whole command like this on a text file:

sudo apt-get install vlc python firefox …..

Then, save that text file to your Dropbox or Ubuntu One folder and relax. Also, if you use software from repositories, write down the command for adding the repos to the same text file. For example, you can write:

sudo add-apt-repository ppa:cooperjona/nitrotasks && sudo apt-get update && sudo apt-get install nitrotasks

Then finally, after formatting your hard drive and reinstalling Ubuntu, just paste in these commands into your terminal and enjoy.

Déjà Dup: a Simple Backup Solution for Linux


Déjà Dup is a simple, easy to use GNOME-based backup solution for Linux. Despite its simplicity, the software comes with some fine features such as encryption, off-site backup, and more. It is also bundled with several key functionalities such as integration with Amazon's EC2 and its capability to setup an automated backup to a remote Linux serverusing protocols such as SSH. Let's take a closer look at some of the features that Déjà Dup has to offer.


Installation:

If you are using Ubuntu Linux, the installation process is quite simple. You need to add a repository, refresh the sources, and begin the installation using apt-get.

Add the repository:

# sudo add-apt-repository ppa:deja-dup-team/ppa
Open the sources.list file...
# sudo gedit /etc/apt/sources.list
then add the following entries at the bottom of the document:

deb http://ppa.launchpad.net/deja-dup-team/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/deja-dup-team/ppa/ubuntu karmic main
Now refresh your apt sources:

# sudo apt-get update
And then complete the installation with the following command:

# sudo apt-get install deja-dup
Although the repositories that you add will differ between versions of Ubuntu Linux, the process remains the same. Voila, your installation should now be complete.

If you are using a different flavor of Linux, you might need to look up the documentation related to it to see how you can get the latest version of Déjà Dup installed on your computer.


Launch Déjà Dup:

Once your installation is complete you can launch Déjà Dup from the Applications menu. It should usually be located under the Applications -> Accessories in your menu. Upon first launch, you will immediately notice a simple, clean user interface with just two buttons on it - Restore and Backup. This is something that I particularly like about this backup tool. As a user, having limited options in the main window make mistakes less likely.


The Setup:

If you click on Edit -> Preferences, you will be able to set up things such as your remote server or EC2 account. This will launch a wizard that guide you through the necessary steps as you go about setting up your backup procedure. Other than a local backup, the tool offers you a number of other backup options such as Amazon EC2, FTP, Windows shares, WebDAV, and SSH.

This range of options is very useful. Also, the simplicity with which it has been implemented and presented makes it easy to use for novice users. During this setup you can define which parts of your system you want backed up, which backup system you want to use, whether or not you want to use encryption, and more.


Bringing It All Back:

An important part of the backup tool Déjà Dup is the restore feature, which allows you to bring back data from your backups. This process is relatively simple. However, I have yet to come across a backup solution for Linux that allows users to restore backed up data with the ease of Time Machine on the Mac. One big drawback is that you can only restore entire backups, and not choose a certain portion of your backup that you want to revert to. I hope that the developers of this tool will introduce some more advanced features in the restore process, as they have in the backup process.


Verdict:

Overall, I think that Déjà Dup makes for a great backup solution for Linux. With a straightforward installation process, a very well designed user interface, which makes the software usable even for non-computer savvy Linux user, a host of well thought out backup storage options, and good security in the way of encryption, this software gets two thumbs up from me. The one issue is that the restore process needs much work. I hope that the developers of this fine tool will put in some more effort into it, which could help make Déjà Dup become the most popular backup solution for Linux.

Best Linux Distro for Web Server


Best Linux Distro for Web Server: If you are planning to build a web hosting company, small business servers, or simply host your own website at home, then it is best to use Linux as your operating system. Linux servers have been known to be extremely reliable and rarely crashes so there's less downtime. Linus Torvalds has once been quoted as saying "How do you power off this machine?" when upgrading the site "linux.cs.helsinki.fi", and after using the machine for several months.

Around 60% of all web servers ran Linux, but we don't have any data that could tell which among the Linux distributions are widely used or preferred. If you ask me, here are some of the best and perhaps popular distro for web servers:


Slackware
Slackware is the oldest surviving Linux distribution so there are no doubts about its reliability. It aspires for design stability and simplicity, using plain text files for configuration and making as few modifications to software packages as possible from upstream. As they say, there is no better, more customizable, standard distro than Slackware.


Gentoo
Gentoo is a highly flexible and fast distro that is built on top of the Linux kernel and based on the Portage package management system. It describes itself as a metadistribution, "because of its near-unlimited adaptability". Unlike a standard software distribution, the user compiles the source code locally according to their chosen configuration in Gentoo. Its package management is designed to be versatile, modular, portable, easy to maintain, and optimized for the user's machine.


Debian 
Debian is a strict advocate of the free and open source philosophies. It is known for amplitude of options like its support for a wide range of computer architectures that ranges from the Intel/AMD 32-bit/64-bit to the ARM architecture. Some of the others notable features of Debian are the APT package management system, repositories with large numbers of packages, and the high quality of releases.


RHEL (Red Hat Enterprise Linux)
When we talk about Linux web servers, we shouldn't fail to include RHEL. It is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z. Though it's proprietary, it costs less than Microsoft's web server software. RHEL is also known for its excellent technical support and service.


CentOS 
If you want to get all the goodness of Red Hat Enterprise Linux but don't want to spend a dime, then CentOS is for you. CentOS is based on RHEL and aims to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution. Technical support is mainly provided by the community through its official mailing lists, web forums, and chat rooms.


But don't just limit your choices from my list, as there are other distros that are as capable as the above mentioned.