LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-31-2007, 12:40 PM   #1
cbjhawks
Member
 
Registered: Oct 2001
Location: Overland Park, KS
Distribution: Kubuntu 22.04
Posts: 375

Rep: Reputation: 30
Q for Nmap users....


I'm not sure what the below results are telling me...my router/gateway is 192.168.1.1 (of course)...my firewall (Guarddog) is supposedly blocking IPP but nmap says thats its port 631 is open.

I looked up rpcbind on Google but none of it made any sense...in layman's terms what is it and do I need it...if not, how do I close that port as well.

I'm running OpenSuSE 10.2 att.

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-12-31 12:33 CST
Interesting ports on localhost (127.0.0.1):
Not shown: 1677 closed ports
PORT STATE SERVICE
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp

Nmap finished: 1 IP address (1 host up) scanned in 0.201 seconds

Last edited by cbjhawks; 12-31-2007 at 12:42 PM.
 
Old 12-31-2007, 02:36 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by cbjhawks View Post
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-12-31 12:33 CST
Interesting ports on localhost (127.0.0.1):
Not shown: 1677 closed ports
PORT STATE SERVICE
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp

Nmap finished: 1 IP address (1 host up) scanned in 0.201 seconds
You scanned localhost. It's normal to get results such as this even while being completely stealth-firewalled on the real network interface. You'll need to scan said interface to get some more meaningful results. One thing you can do also is have a look at the services, as you'll see on what addresses they are listening on. Check it:
Code:
win32sux@candystore:~$ netstat -an --inet | grep LISTEN
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:80            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:8118          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN
As you can see, I've got several services - but they are only listening on localhost.

Nmap will show ports open for localhost:
Code:
win32sux@candystore:~$ nmap localhost

Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-31 15:34 EST
Interesting ports on localhost (127.0.0.1):
Not shown: 1693 closed ports
PORT     STATE SERVICE
25/tcp   open  smtp
80/tcp   open  http
631/tcp  open  ipp
3306/tcp open  mysql

Nmap finished: 1 IP address (1 host up) scanned in 0.174 seconds
But for my actual NIC IP it's a different story:
Code:
win32sux@candystore:~$ nmap 192.168.1.100

Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-31 15:35 EST
All 1697 scanned ports on 192.168.1.100 are closed

Nmap finished: 1 IP address (1 host up) scanned in 0.182 seconds
That said, nothing beats an actual remote scan - you'll need to perform one if you want a real-world assessment. Do you have another GNU/Linux box available where you could scan from? Hopefully you'll get results like this:
Code:
win32sux@batcave:~$ nmap 192.168.1.100

Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-31 15:54 EST
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 4.046 seconds
win32sux@batcave:~$ nmap -P0 192.168.1.100

Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-31 15:55 EST
All 1697 scanned ports on 192.168.1.100 are filtered

Nmap finished: 1 IP address (1 host up) scanned in 351.129 seconds
These remote scan results make sense, considering I have a stealth firewall config:
Code:
win32sux@candystore:~$ sudo iptables -nvL INPUT
Chain INPUT (policy DROP 2765 packets, 258K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 837K  779M ACCEPT     0    --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
 8502  510K ACCEPT     0    --  lo     *       0.0.0.0/0            0.0.0.0/0

Last edited by win32sux; 12-31-2007 at 03:03 PM.
 
Old 12-31-2007, 06:08 PM   #3
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, Ubuntu, FreeBSD, OpenBSD, OS X
Posts: 782
Blog Entries: 8

Rep: Reputation: 158Reputation: 158
win32sux,

Very, very nice explanation.

I've something similar on my blog @ http://slackfiles.blogspot.com/2007/...dened-box.html

Comparing them both, yours is more concise, IMO.

Again, kudos!
 
Old 01-01-2008, 10:36 AM   #4
cbjhawks
Member
 
Registered: Oct 2001
Location: Overland Park, KS
Distribution: Kubuntu 22.04
Posts: 375

Original Poster
Rep: Reputation: 30
win32sux...thank you for your...

excellent explanation...feeling alittle silly about my original post (ie...localhost)...when I scanned my router and nic ip, my result was the same as yours (ports closed)...the netstat command is noted and will use it in the future...again thanks for your time.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nmap ? how do i do nmap in linux ? command not found abbasakhtar Linux - Newbie 2 01-02-2011 01:08 AM
nmap increase send delay for nmap 4.20 matters Slackware 1 10-01-2007 11:37 PM
Debian SID users: help me by running an nmap on localhost introuble Debian 12 12-19-2006 07:23 AM
Nmap 3.50 igor8 Linux - Software 5 06-03-2004 12:00 PM
Nmap v3.45 leeach Linux - Security 2 10-07-2003 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration