ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <prokopiev@stc.donpac.ru>
To: Community@altlinux.ru
Subject: [Comm] iptables и nmap : DROP, REJECT -> filtered
Date: Tue, 06 Sep 2005 14:33:33 +0400
Message-ID: <431D707D.5070908@stc.donpac.ru> (raw)

Здравствуйте!

Когда-то, читая Андерсона в переводе Киселева, запомнил, что цель REJECT 
в iptables не просто убивает пакеты, приходящие на определенный порт, а 
посылает отправителю icmp-сообщение port-unreachable. Ну и домыслил, что 
nmap должен видеть такие порты как closed.

Сегодня впервые попробовал это сделать и был немного разочарован 
результатом:

# iptables -t filter -F INPUT
# iptables -A INPUT -p tcp --dport 21 -j REJECT
# nmap -p 21 127.0.0.1
Starting nmap 3.55 ( http://www.insecure.org/nmap/ ) at 2005-09-06 14:37 MSD
Interesting ports on localhost.localdomain (127.0.0.1):
PORT   STATE    SERVICE
21/tcp filtered ftp
Nmap run completed -- 1 IP address (1 host up) scanned in 0.878 seconds

# iptables -t filter -F INPUT
# iptables -A INPUT -p tcp --dport 21 -j DROP
# nmap -p 21 127.0.0.1
Starting nmap 3.55 ( http://www.insecure.org/nmap/ ) at 2005-09-06 14:38 MSD
Interesting ports on localhost.localdomain (127.0.0.1):
PORT   STATE    SERVICE
21/tcp filtered ftp
Nmap run completed -- 1 IP address (1 host up) scanned in 2.794 seconds

Почему?
Как добиться того, чтоб порт был closed?

Для сравнения:

# iptables -t filter -F INPUT
# nmap -p 20 127.0.0.1
Starting nmap 3.55 ( http://www.insecure.org/nmap/ ) at 2005-09-06 14:40 MSD
Interesting ports on localhost.localdomain (127.0.0.1):
PORT   STATE  SERVICE
20/tcp closed ftp-data
Nmap run completed -- 1 IP address (1 host up) scanned in 0.873 seconds


-- 
С уважением, Прокопьев Евгений


             reply	other threads:[~2005-09-06 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 10:33 Eugene Prokopiev [this message]
2005-09-06 10:43 ` Dmytro O. Redchuk
2005-09-06 12:04   ` [Comm] " Michael Shigorin
2005-09-07  5:05     ` Eugene Prokopiev
2005-09-07  5:09       ` Eugene Prokopiev
2005-09-07  5:43         ` Dmytro O. Redchuk
2005-09-07  5:46           ` Re[2]: " Alexandr A. Alexandrov
2005-09-12  8:41 ` [Comm] " Afanasov Dmitry

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=431D707D.5070908@stc.donpac.ru \
    --to=prokopiev@stc.donpac.ru \
    --cc=Community@altlinux.ru \
    /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

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git