Articles of iptables

如何阻止ICMP攻击?

我们正在遭受重创的洪水袭击。 Tcpdump显示下面的结果。 尽pipe我们用iptables阻塞了ICMP,tcpdump仍然打印icmp包。 我也附加了iptables的configuration和“顶”的结果。 有什么我可以做的,完全停止icmp数据包? [root@server downloads]# tcpdump icmp -v -n -nn tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 03:02:47.810957 IP (tos 0x0, ttl 49, id 16007, offset 0, flags [none], proto: ICMP (1), length: 56) 80.227.64.183 > 77.92.136.196: ICMP redirect 94.201.175.188 to host 80.227.64.129, length 36 IP (tos 0x0, ttl […]

Centos iptables打开端口53

我有问题打开我的Centos机器上的端口53,DNSconfiguration。 这是我的iptablesconfiguration -A INPUT -p udp -m udp –sport 53 -j ACCEPT -A OUTPUT -p udp -m udp –dport 53 -j ACCEPT 当我运行机器的nmap扫描时,只有80端口显示为打开。 我错过了什么? 编辑: 完整的iptable *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p udp -m state –state NEW,ESTABLISHED -m udp –dport 53 -j ACCEPT -A INPUT -p udp -m […]

“TARPIT”是否有任何已知的漏洞或缺点?

TARPIT可以用来浪费攻击者的资源,从而减缓攻击速度,降低攻击其他主机的能力……看起来不错。 它作为Netfilter 插件提供 ,可以像其他任何IPTables目标一样使用。 在处理(D)DoS的方法中是否存在缺点或漏洞?

IPTables和DHCP问题?

在我的另一个线程中,我正在谈论关于iptables策略和状态的一些有趣的事情,现在我想更多地了解DHCP的工作原理以及iptables如何理解它。 ETH0连接到我的主交换机,从我的路由器接收dynamicIP,不仅可以访问互联网,还可以访问我的外部networking。 ETH1是连接到X客户端从该服务器接收IPS的内部交换机的内部卡 ETH1networking为192.168.1.0/255.255.255.0,其中服务器IP为192.168.1.254。 根据我的理解,dhcp是一个bootp协议,所以即使你有防火墙策略来删除所有的东西,你的networking仍然会收到DHCP,在我做的testing中,它似乎是真的。 从tcpdump: root@test:~# tcpdump -i eth1 port 67 or 68 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 11:34:03.943928 IP 192.168.1.2.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:0c:29:29:52:8b (oui Unknown), length 303 11:34:03.957647 IP 192.168.1.254.bootps > 192.168.1.2.bootpc: BOOTP/DHCP, […]

编辑/保存linux iptables后需要重启吗?

如果我编辑iptables,然后保存它们,那么我必须重新启动更改发生?

如何logging试图连接到一个端口的IP地址?

是否有可能login所有的IP地址,试图连接或连接到端口“5901”在Linux Debian? 我怎样才能做到这一点? 问候

Iptables在“-A INPUT -j REJECT –reject-with icmp-host-prohibited”之后追加规则默认值

我使用iptables在CentOS 6.4上为HTTP打开端口80我通常使用vim来编辑/ etc / sysconfig / iptables但是这次我使用/ sbin / iptables命令。 # /sbin/iptables -A INPUT -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT # service iptables save # service iptables restart 当我列出规则,我可以看到这样的http: ACCEPT tcp — anywhere anywhere state NEW tcp dpt:ssh REJECT all — anywhere anywhere reject-with icmp-host-prohibited ACCEPT tcp — anywhere […]

用IP表规则阻止DoS攻击?

我想知道是否可以通过简单的IP表规则来防止小型(D)DoS攻击? 小到我的意思是说,他们正在泛滥我的networking服务器约400多个请求从一个或两个IP地址。 当我注意到他们已经开始点击我的networking服务器时,我可以放弃IP地址,但是通常需要花费几分钟的时间让IP表格反对这个IP,并且完全放弃它,这样它就不会影响该Web服务器。 我用以下命令删除IP: iptables -I INPUT -s "IP HERE" -j DROP 然后显然保存它: /etc/init.d/iptables save 我通常使用以下命令找出攻击的IP地址: netstat -plan|grep :80|awk '{print $5}'|cut -d: -f 1|sort|uniq -c|sort -n 这样做的问题是,我必须在那里,这需要我采取行动。 是否有一个IP表规则,我可以用来删除一个IP地址后,达到150连接? 这样,我不必担心它压倒了Web服务器,我也不必在那里阻止它。 顺便说一下,如果有问题,我在CentOS上使用Apache。 感谢您的时间。

如何在shell脚本中包含目录中的所有文件(在这种情况下为/etc/init.d/iptables)

我在不同的Ubuntu服务器上有一个/etc/init.d/iptables start|stop|restart脚本(这是一个普通的shell脚本) 对于每个新服务,我必须编辑并插入一行来打开一个端口。 这导致了不同机器上的init.d脚本的许多不同版本。 是否有可能自动包含/etc/iptables/include.d/的所有文件? 目标是在/etc/init.d/iptables的start函数中只应该有一行 include /etc/iptables/include.d/* 在/etc/iptables/include.d/一个额外的文件后,我只是说 /etc/init.d/iptables restart 编辑:正如Saurabh指出,当命令需要一定的顺序时,这可能会导致问题。 高级设置可以有不同的目录,如: /etc/iptables/include01.d/ /etc/iptables/include02.d/ /etc/iptables/include03.d/ 包括他们这样的: 包括/etc/iptables/include01.d/* …也许一些代码在这里的主文件… 包括/etc/iptables/include02.d/* 包括/etc/iptables/include03.d/*

我的iptables安全吗?

我在我的新Ubuntu服务器上的rc.local有这个: iptables -F iptables -A INPUT -i eth0 -p tcp –sport 22 -m state –state ESTABLISHED -j ACCEPT iptables -A OUTPUT -o eth0 -p tcp –dport 22 -m state –state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -i eth0 -p tcp –dport 22 -m state –state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -o eth0 -p tcp […]