“为了防止与 portsentry 的端口扫描”的版本间的差异
第1行: | 第1行: | ||
+ | <span data-link_translate_pt_title="Para proteger contra a varredura de portas com portsentry" data-link_translate_pt_url="Para+proteger+contra+a+varredura+de+portas+com+portsentry"></span>[[:pt:Para proteger contra a varredura de portas com portsentry]][[pt:Para proteger contra a varredura de portas com portsentry]] | ||
<span data-link_translate_es_title="Para proteger contra la exploración de puertos con portsentry" data-link_translate_es_url="Para+proteger+contra+la+exploraci%C3%B3n+de+puertos+con+portsentry"></span>[[:es:Para proteger contra la exploración de puertos con portsentry]][[es:Para proteger contra la exploración de puertos con portsentry]] | <span data-link_translate_es_title="Para proteger contra la exploración de puertos con portsentry" data-link_translate_es_url="Para+proteger+contra+la+exploraci%C3%B3n+de+puertos+con+portsentry"></span>[[:es:Para proteger contra la exploración de puertos con portsentry]][[es:Para proteger contra la exploración de puertos con portsentry]] | ||
<span data-link_translate_en_title="To protect against the scan of ports with portsentry" data-link_translate_en_url="To+protect+against+the+scan+of+ports+with+portsentry"></span>[[:en:To protect against the scan of ports with portsentry]][[en:To protect against the scan of ports with portsentry]] | <span data-link_translate_en_title="To protect against the scan of ports with portsentry" data-link_translate_en_url="To+protect+against+the+scan+of+ports+with+portsentry"></span>[[:en:To protect against the scan of ports with portsentry]][[en:To protect against the scan of ports with portsentry]] |
2016年4月8日 (五) 19:33的版本
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
:
:
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 : 服务器
开启评论自动刷新