为了防止与 portsentry 的端口扫描

来自Chinese Ikoula Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

zh:为了防止与 portsentry 的端口扫描 he:כדי להגן מפני הסריקה של יציאות עם portsentry ro:Pentru a proteja împotriva scanarea de porturi cu portsentry ru:Для защиты от сканирования портов с portsentry pl:Do ochrony przed skanowanie portów z portsentry ja:Portsentry とポートのスキャンから保護するには ar:للحماية من مسح للمنافذ مع بورتسينتري de:Zum Schutz vor der Untersuchung der Ports mit portsentry nl:Te beschermen tegen het scannen van poorten met portsentry it:Per proteggere contro la scansione delle porte con portsentry pt:Para proteger contra a varredura de portas com portsentry es:Para proteger contra la exploración de puertos con portsentry en:To protect against the scan of ports with portsentry fr:Se protéger contre le scan de ports avec portsentry

这篇文章是从由软件进行自动翻译。你可以看到这篇文章的源代码

你 | ! _ 可能会受到不同的端口扫描,以确定,例如,服务到位, 你 | ! _ 或甚至操作系统安装 | ! _ 例如,使 Nmap,| ! _ .此信息然后可能会被恶意的人来实现完整的利用你 | ! _ 若要防止这些做法,可以实现 portsentry 的将阻止这些扫描在原点处的连接的 IP 地址。 服务器 Portsentry 可以是失败的一种补充 | ! _ 禁止,如果你想提高的安全你 | ! _ 事实上,失败 | ! _ 禁止阻止 IP 地址的连接,执行不成功的身份验证,同时 portsentry,他执行旨在识别打开的端口的 IP 地址阻止你 | ! _ .这两个程序包可以互补,从而增强的安全你 | ! _ 我们开始着手将包关乎我们用下面的命令安装 | ! _ 一条警告消息会告诉你,portsentry 将适用没有阻止,除非你告诉它做 | ! _ 一旦安装完毕,我们将因此继续到 portsentry 的配置。 服务器 作为第一步,我们将停止服务 | ! _ 我们将实施的例外不来阻止各种 IP 地址 | ! _ 至少你的 IP 地址和 IP 地址的 | ! _ s 的监测等� (海滩的 IP 地址来允许和使用我们 | ! _ 监测,请参阅以下文章 | ! _ 若要实现这些例外情况,我们将编辑的文件 | ! _ 在开始服务时,该文件的内容会添加到文件 | ! _ 若要将异常添加到 portsentry 的只是添加一个 IP 地址,每行。你可以也,只是添加一个或 CIDR。)现在,您已经添加了你 | ! _ 您在列表中的 IP 地址 | ! _ 白色,我们将配置到 portsentry 通过编辑配置文件,也可通过适当口语 | ! _ 我们使用 portsentry 在高级模式下为 TCP 和 UDP 协议。 服务器.

要做到这一点,您必须修改该文件 | ! _ 为了有 | ! _ 我们也祝愿那 portsentry 的堵塞。因此,我们需要来激活它通过 BLOCK_UDP 和 BLOCK_TCP 对 | ! _ 如下所示 | ! _ 我们选择阻止恶意人员通过 iptables。

我们将对所有行的配置文件以 KILL_ROUTE 开头的下一步除了因此评论 | ! _ 您可以验证这种情况下,一次保存的文件使用猫和 grep | ! _ 我们现在可以重新启动服务 portsentry,它将现在开始阻止端口扫描 | ! _ Portsentry 的日志文件中 | ! _ 和如你下面看到的跟随本教程与 Nmap,照顾了一个端口扫描地址已被阻止通过 iptables | ! _ 如果你想要扔块,您可以检查 IP 地址禁止通过 iptables。2还有受阻后我们先前的测试 IP | ! _ 因此,让我们删除条目 | ! _ | ! _ 别忘了允许的 IP 地址我们 | ! _ s 的监测的例外情况的 portsentry,避免误报,导致不必要的警报。 服务器. 2 服务器 服务器.

root@flex:~# apt-get update && apt-get install portsentry
:

Portsentry.png


:
root@flex:~# /etc/init.d/portsentry stop
Stopping anti portscan daemon: portsentry.
( 服务器).
服务器  : https://fr.ikoula.wiki/fr/Quelles_sont_les_IP_%C3%A0_autoriser_dans_mon_firewall_pour_qu%27Ikoula_ait_acc%C3%A8s_%C3%A0_mon_服务器
/etc/portsentry/portsentry.ignore.static
/etc/portsentry/portsentry.ignore.


/ /etc/portsentry/portsentry.conf.


/etc/default/portsentry  :
TCP_MODE="atcp"
UDP_MODE="audp"
1  :
##################
# Ignore Options #
##################
# 0 = Do not block UDP/TCP scans.
# 1 = Block UDP/TCP scans.
# 2 = Run external command only (KILL_RUN_CMD)

BLOCK_UDP="1"
BLOCK_TCP="1"


:
KILL_ROUTE="/sbin/iptables -I INPUT -s $TARGET$ -j DROP"
:
cat portsentry.conf | grep KILL_ROUTE | grep -v "#"
:
root@flex:~# /etc/init.d/portsentry start
Starting anti portscan daemon: portsentry in atcp & audp mode.
/var/log/syslog  :
Mar 17 16:59:02 sd-24527 portsentry[6557]: adminalert: PortSentry is now active and listening.
Mar 17 17:00:29 sd-24527 portsentry[6553]: attackalert: Connect from host: 178.170.xxx.xxx/178.170.xxx.xxx to TCP port: 1
Mar 17 17:00:29 sd-24527 portsentry[6553]: attackalert: Host 178.170.xxx.xxx has been blocked via wrappers with string: "ALL: 178.170.xxx.xxx : DENY"
Mar 17 17:00:29 sd-24527 portsentry[6553]: attackalert: Host 178.170.xxx.xxx has been blocked via dropped route using command: "/sbin/iptables -I INPUT -s 178.170.xxx.xxx -j DROP"
Mar 17 17:00:29 sd-24527 portsentry[6553]: attackalert: Connect from host: 178.170.xxx.xxx/178.170.xxx.xxx to TCP port: 79
Mar 17 17:00:29 sd-24527 portsentry[6553]: attackalert: Host: 178.170.xxx.xxx is already blocked. Ignoring
[...]


:
root@flex:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 52381 packets, 6428K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 794 42696 DROP       all  --  *      *       178.170.xxx.xxx      0.0.0.0/0      


:
iptables -D INPUT -s 178.170.xxx.xxx -j DROP

PS : 服务器



您未被允许发表评论。