Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was scanning one of my friends servers using nmap and got these port details.

22/tcp    open     ssh
42/tcp    filtered nameserver
80/tcp    open     http
111/tcp   open     rpcbind
135/tcp   filtered msrpc
139/tcp   filtered netbios-ssn
161/tcp   filtered snmp
179/tcp   filtered bgp
443/tcp   open     https
1028/tcp  filtered unknown
1080/tcp  filtered socks 
3128/tcp  filtered squid-http
6666/tcp  filtered irc
6667/tcp  filtered irc
6668/tcp  filtered irc
7402/tcp  open     unknown
10082/tcp open     amandaidx

And when I logged into the machine using SSh and scanned it again using nmap, I got the following result

22/tcp    open  ssh
25/tcp    open  smtp
80/tcp    open  http
111/tcp   open  rpcbind
443/tcp   open  https
631/tcp   open  ipp
7402/tcp  open  rtps-dd-mt
10082/tcp open  amandaidx

Why question is why is it showing IRC ports and Squid Ports on the first scan? We don't have anything installed in it. Its a dedicated box and not running on VM. Is there any possibility that it might have been compromised? It doesn’t have any IPtables on it too.

share|improve this question
Sorry about the title. – user994535 Sep 14 '12 at 18:00
Where are you scanning it from? From a host on the same network or from an external host? Is there a network firewall in front of the server? – joeqwerty Sep 14 '12 at 18:09
Ew, I just noticed they're filtering SNMP. I'd be yelling very loudly at the ISP for that. I need that. – Michael Hampton Sep 14 '12 at 18:26

The differences are due to the interface each service is listening on, and filtering done by your Internet Service Provider (ISP). When there is no firewall between the scanning host and the target, closed TCP ports respond with a RST packet, and can be reasonably assumed to be really closed. A firewall which has been configured to block a port will silently drop all packets to that port, so the scanning host sees no response. Nmap indicates this status as filtered, since there is no way to tell if the port is actually open or closed.

The 2 services that do not show up in the first scan (25/tcp and 631/tcp) are most likely listening on the loopback interface only. You can check this by running netstat -tln and looking at the "Local Address" column. If the Local Address is, then it is listening on all available interfaces. If it is, then it is listening on the loopback interface only, and is not open to the network.

share|improve this answer
you are spot on. Yes they are running on loopback. Thanks for the information. – user994535 Sep 14 '12 at 19:46

These ports are most likely being filtered by your friend's Internet Service Provider.

share|improve this answer
Is there any way to verify that? – user994535 Sep 14 '12 at 18:09
Call the ISP and ask them? – Michael Hampton Sep 14 '12 at 18:09
@user994535 you can see listening ports with the netstat command. – bonsaiviking Sep 14 '12 at 18:12
user004535: It might be possible to determine with fair accuracy by checking how many decrements the ttl gets in comparison to the open services. – 3molo Sep 14 '12 at 18:24
@3molo good idea, but the filtered output means there was no response received, so no packet = no ttl. If a firewall were rejecting instead of filtering, you could get ttl values from the Nmap XML output, XPath: //port/state[@reason="closed"]/@reason_ttl – bonsaiviking Sep 14 '12 at 19:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.