From: "Alexander W. Janssen" <alexander.janssen@gmx.de>
To: netfilter@lists.netfilter.org
Subject: Re: iptables UDP problem
Date: Sun, 2 Feb 2003 16:57:55 +0100 [thread overview]
Message-ID: <20030202165755.C1937@ynfonatic.de> (raw)
In-Reply-To: <20030202001150.26421.qmail@web41303.mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]
On Sat, Feb 01, 2003 at 04:11:50PM -0800, k n wrote:
> Hi,
>
> I'm using iptables on RedHat 8 with the rules listed
> below. When scanned from outside the TCP port appear
> as filtered; however, the UDP port is still open.
>
> $ip0 is my external IP address.
>
> Am I doing something wrong?
that the TCP-port shows up as filtered is normal since you just DROP the
SYN-packets. If you wouldn't have a firewall and there would not be daemon
running the machine would send a tcp-reset packet and send it back to nmap.
This is interpreted as "connection refused", meaning that there is not a
server running on the tcp-port.
That UDP stuff surprises me a bit; if you send a packet to a UDP port and no
server is running the machine would generate an ICMP port-unreachable message
which should have been interpreted by nmap. But since you drop all packets to
53/udp a ICMP-message was never generated and nmap couldn't have received one.
I just tested on my machine (locally with loopback and nmap 2.54BETA22):
Nonfiltered udp-ports show up as "closed"
DROPed udp-ports show up as "open"
Maybe nmap interprets it like that "as long as i don't get any errors i threat
it like it would be open." And this sort of correct as well, since you don't
have a "real connection" like in TCP - the application has to do everything on
it's own. So that UDP-stuff doesn't surprise me anymore ;-)
Don't DROP. Send real tcp-resets for unwanted TCP-connections and send real
ICMP port-unreachable messages for unwanted UDP-connections and everything
else. Just my 2c.
HTH, Alex.
--
"Mr Data, when I said 'Fire at Will', I didn't mean for you to be so literal."
Instructions for use of this post: Insert tounge in cheek. Read as normal.
[-- Attachment #2: Type: application/pgp-signature, Size: 248 bytes --]
next prev parent reply other threads:[~2003-02-02 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-02 0:11 iptables UDP problem k n
2003-02-02 15:57 ` Alexander W. Janssen [this message]
2003-02-03 12:16 ` Maciej Soltysiak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030202165755.C1937@ynfonatic.de \
--to=alexander.janssen@gmx.de \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox