小编PyT*_*hoN的帖子

在 iptables 中添加一条规则,目标 ip 不会解析到它的域

我在 iptables 中添加此规则,并使用以下 IP 地址作为目标:

iptables -A FOR_FILTER -d 66.235.138.59 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

它成功添加了它,结果如下:

ACCEPT     all  --  anywhere             *.d1.sc.omtrdc.net
Run Code Online (Sandbox Code Playgroud)

由于此 DNS 解析,我想应用于 66.235.138.59 的规则将不起作用。我想按原样添加 IP 地址,因此 iptables 不会添加解析的域。

像这样(但它不起作用):

iptables -A FOR_FILTER -d "66.235.138.59" -j ACCEPT
iptables -A FOR_FILTER -d '66.235.138.59' -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

domain-name-system linux iptables

6
推荐指数
1
解决办法
3277
查看次数

标签 统计

domain-name-system ×1

iptables ×1

linux ×1