A fast and easy-to-use scanner of IP addresses and ports

This week I’m working in offices with a local network that uses static IP addressing. Believe it or not, it seems the IT department does not keep a list of configured IP addresses, and sometimes inadvertently configure devices to have the same IP address.

A couple of days ago I was printing quite happily to a networked printer from my laptop in the morning but, when I got back from lunch, found that I couldn’t print any more. It transpired that someone had allocated the IP address of my laptop to a new plotter in my absence. What to do if the organisation has no central list of configured IP addresses? There are too many devices on the local network to check them manually, and I do not have access to them anyway.

So I installed Angry IP Scanner (a.k.a. ipscan), an easy-to-use scanner of IP addresses and ports, and use it to find an IP address that is currently unused on the network.

I wanted to install ipscan by using Gentoo’s package manager Portage. There is no ebuild for it in the Portage main tree, but a quick search of the Web told me that there is an ebuild in a third-party overlay (http://gpo.zugaina.org/net-analyzer/ipscan). Rather than add an external overlay, I decided to install the package using a local overlay:

1. I downloaded the ebuild:

# wget http://gpo.zugaina.org/AJAX/Ebuild/2251131/View --output-document=/home/fitzcarraldo/Desktop/ipscan-3.0_beta4.ebuild

The ebuild contents are as follows:

# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $


inherit java-pkg-2

DESCRIPTION="Angry IP - The fast and friendly network scanner"

SRC_URI="amd64? ( ${SRC_BASE}/${PN}-linux64-${MY_PV}.jar )
        x86? ( ${SRC_BASE}/${PN}-linux-${MY_PV}.jar )"

KEYWORDS="~amd64 ~x86"




src_unpack() {

src_install() {
        local jarname
        use amd64 && jarname="${PN}-linux64-${MY_PV}.jar"
        use x86 && jarname="${PN}-linux-${MY_PV}.jar"
        java-pkg_jarinto "${INSTALL_DIR}"
        java-pkg_newjar "${DISTDIR}/${jarname}"

2. I synchronised the Portage main tree’s ebuilds on my PC with those in the repositories:

# emerge --sync

3. I made sure that /etc/make.conf has the following lines at the end of the file:

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

4. I created the required directories in the local overlay:

# mkdir -p /usr/local/portage/net-analyzer/ipscan

5. I made sure Portage would not nag me about a missing name for my local overlay:

# mkdir /usr/local/portage/profiles
# echo "local_overlay" > /usr/local/portage/profiles/repo_name

6. I copied the ipscan ebuild into the relevant directory in the local overlay:

# cd /usr/local/portage/net-analyzer/ipscan
# cp /home/fitzcarraldo/Desktop/ipscan-3.0_beta4.ebuild .

7. I generated the manifest for the package:

# ebuild ipscan-3.0_beta4.ebuild manifest

8. I merged the package:

# emerge -1v ipscan

9. I downloaded a 64×64 pixel PNG image of the Angry IP Scanner logo from http://www.angryip.org/icon.png. Then I right-clicked on Kickoff, selected Menu Editor and added an entry for Angry IP Scanner under Applications | System, although I can also launch ipscan from the command line if I want:

$ ipscan

To find an unused IP address on the local network which I can allocate to my laptop whilst I’m working in this office, I launch ipscan and enter the start and end IP addresses of the range I wish to check, and click on Start. The application quickly searches through the IP addresses in that range and lists which are in use and which are not. It’s as simple as that. I then use Network Management to edit the connection and enter the static IP address.

Note that Angry IP Scanner will not detect a live IP address if the device is behind a properly-configured firewall. See the Angry IP Scanner Web site’s FAQ and Documentation pages for further details.

About Fitzcarraldo
A Linux user with an interest in all things technical.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: