iptables: filtered UDP ports are reported as open by nmap
From: Akop Pogosian (akopps+usenet@ocf.berkeley.edu)Date: 12/21/01
- Next message: Michail Pappas: "Re: web downoload robots"
- Previous message: Tim Haynes: "Re: [OT] PR, FUD and Buffer Overrun in XP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Akop Pogosian <akopps+usenet@ocf.berkeley.edu> Date: Fri, 21 Dec 2001 11:56:32 +0000 (UTC)
My understanding is that a UDP port is considered closed when the
target machine returns an ICMP port unreachable error when you send
data to it. The IP Filter (IPF) packet filter often used on Solaris
and *BSDs has an option for blocking UDP port while at the same type
sending ICMP port unreachable message. When running command
"nmap -sU -p <port> <target host>", where the target host is a Sun
machine running IPF with this option, nmap reports the port being
closed (as opposed to open or filtered)
On the other hand, I believe, the Linux iptables' "REJECT" target
should also send port unreachable error by default. So, I added a rule
similar to this:
iptables -A local -p udp -dport <port num> -j REJECT
However, when I run nmap scan, the same as above, nmap reports this
port number as "open". I know that for practical purposes this port is
closed to that host but I also would like to fool nmap (and any other
scanners) into thinking that the port is really closed (just like in
case of IPF). Is there a way of doing this with iptables?
Note that running snoop (solaris packet sniffer) on the host that runs
nmap, shows that the scanning host, after having received ICMP port
unreachable error from the Linux machine sends a packet to that UDP
port once again (and the Linux box sends the same ICMP error message
again) while when scanning from the same host a solaris machine
running IPF, the scanning host sends the packet only once and the Sun
machine sends a corresponding port unreachable message and the probe
ends at that point.. strange.
-- Akop PogosianThis space has been accidentally left blank.
- Next message: Michail Pappas: "Re: web downoload robots"
- Previous message: Tim Haynes: "Re: [OT] PR, FUD and Buffer Overrun in XP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|