ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] iptables и nmap : DROP, REJECT -> filtered
@ 2005-09-06 10:33 Eugene Prokopiev
  2005-09-06 10:43 ` Dmytro O. Redchuk
  2005-09-12  8:41 ` [Comm] " Afanasov Dmitry
  0 siblings, 2 replies; 8+ messages in thread
From: Eugene Prokopiev @ 2005-09-06 10:33 UTC (permalink / raw)
  To: Community

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

Когда-то, читая Андерсона в переводе Киселева, запомнил, что цель 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


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-09-12  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-06 10:33 [Comm] iptables и nmap : DROP, REJECT -> filtered Eugene Prokopiev
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

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