ANt*_*ord 4 iptables rpc tcp udp
我有一个与块 111 端口相关的问题,仅适用于udp
. 因为tcp
它被阻止没有任何问题。此端口由应用程序使用rpcbind
。我通过netcat
. 这是我的iptables。它包含空链FORWARD
,因为我已经从中删除了所有规则以便于理解。
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP udp -- anywhere anywhere udp dpt:sunrpc
2 DROP tcp -- anywhere anywhere tcp dpt:sunrpc
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
1 DOCKER-OVERLAY all -- anywhere anywhere
Chain DOCKER (0 references)
num target prot opt source destination
Chain DOCKER-ISOLATION (0 references)
num target prot opt source destination
1 DROP all -- anywhere anywhere
2 DROP all -- anywhere anywhere
3 RETURN all -- anywhere anywhere
Chain DOCKER-OVERLAY (1 references)
num target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
该端口将为一组服务器打开,但为了便于理解,它们现在不存在于 iptables 中。我必须怎么做才能通过 udp 阻止 111 端口?
根据您想对客户有多好,可能的解决方案是:
iptables -I INPUT -p udp --dport 111 -j DROP
Run Code Online (Sandbox Code Playgroud)
或者
iptables -I INPUT -p udp --dport 111 -j REJECT
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
27722 次 |
最近记录: |