相关疑难解决方法(0)

为什么不阻止ICMP?

我想我几乎在 CentOS 5.3 系统上完成了 iptables 设置。这是我的脚本...

# Establish a clean slate
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F # Flush all rules
iptables -X # Delete all chains

# Disable routing. Drop packets if they reach the end of the chain.
iptables -P FORWARD DROP

# Drop all packets with a bad state
iptables -A INPUT -m state --state INVALID -j DROP
# Accept any packets that have something to do with ones …
Run Code Online (Sandbox Code Playgroud)

security linux firewall iptables icmp

55
推荐指数
6
解决办法
4万
查看次数

我应该使用 iptables 对数据包进行速率限制吗?

我在 Ubuntu 服务器上使用 iptables。它是 VPS 上的 Web 服务器。
我想知道我是否应该对数据包进行速率限制。如果是这样,我应该限制什么?我应该在全球范围内还是按 IP 地址这样做?

参考
我看到有人提出这个建议:

# Limit packet traffic on a TCP or UDP port:
iptables -A INPUT -p $proto --destination-port $port --syn -m state --state NEW -m limit --limit $lim/s --limit-burst $lb -j ACCEPT

# Limit established/related packet traffic:
iptables -A INPUT -m state --state RELATED,ESTABLISHED -m limit --limit $lim/s --limit-burst $lb -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

以上,全局速率限制似乎不是很有用,至少对于我可以想象的情况。有没有我应该在全球范围内限制速率的情况?
我相信每个 IP 的速率限制通常更好:

# Add the IP to the list:
iptables -A INPUT -p $proto --destination-port …
Run Code Online (Sandbox Code Playgroud)

networking linux firewall iptables rate-limiting

8
推荐指数
1
解决办法
3万
查看次数

为什么当我在 powershell 中使用 tracert 时,它没有返回完整的响应?

我在 power shell 中使用了 tracert,但它无法显示所有路径,某些部分对话请求超时。

Tracing route to google.com [216.58.212.78]
over a maximum of 30 hops:

  1    33 ms    33 ms    32 ms  172.31.4.1
  2    33 ms    33 ms    32 ms  192.168.160.2
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6     *        *        *     Request timed out.
  7     *        *        *     Request timed out.
  8     *        *        *     Request timed out.
  9     *        *        *     Request timed …
Run Code Online (Sandbox Code Playgroud)

ip timeout traceroute

2
推荐指数
1
解决办法
339
查看次数