Skip to content

Nmap or gtfo

2011/03/28

When setting up a new server for a Rails application, it is a good idea to see what ports are open in order to configure appropriate firewall rules.

An open source tool called ‘nmap‘ comes in real handy for just such a thing!

After installing nmap ($ sudo apt-get install nmap on Ubuntu,) running a basic scan against a remote host is simple:
$ nmap [ip of remote host]
e.g.
$ nmap 192.168.0.1

The output looks like this:
Starting Nmap 5.00 ( http://nmap.org ) at 2011-03-28 20:39 MDT
Interesting ports on yourserver.yourdomain.com (192.168.0.1):
Not shown: 993 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
135/tcp filtered msrpc
... [more open ports]
Nmap done: 1 IP address (1 host up) scanned in 26.05 seconds

Now we can proceed to lock down the irrelevant ports.

Awesome.

Advertisements
2 Comments
  1. Ok, I tried all this, but the dishwasher still won’t start….

    • seeflanigan permalink

      Hahah try rebooting it three times 🙂

      Yeah this is the trouble with me only having 1 blog. Sometimes it gets real nerdy up in here.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: