我的同事使用meteor在debian机器上部署码头集装箱。最近我们有一个服务器重新启动,它删除了我们添加的一些iptable,以避免ufw + docker安全漏洞。
我希望为这个安全漏洞配置一个新的配置(因为一开始它有点混乱),所以我将以下内容添加到iptable中,如docker文档中所述:
sudo iptables -I DOCKER-USER -i eth0 -j DROP我的同事在部署时出错如下:
#14 [7/6] RUN cd /built_app/programs/server && npm install --unsafe-perm
#14 41.92 npm ERR! code EAI_AGAIN
#14 41.92 npm ERR! errno EAI_AGAIN
#14 41.94 npm ERR! request to https://registry.npmjs.org/node-gyp failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
#14 41.95
#14 41.95 npm ERR! A complete log of this run can be found in:
#14 41.95 npm ERR! /root/.npm/_logs/2022-06-07T09_25_12_763Z-debug.log
#14 ERROR: executor failed running [/bin/sh -c cd /built_app/programs/server && npm install --unsafe-perm]: runc did not terminate sucessfully我不知道这个错误是基于坞的还是基于iptables的。我怀疑有dns问题,所以我尝试了以下几点:
sudo docker run busybox nslookup google.com
;; connection timed out; no servers could be reached在使用默认(桥)停靠器网络时,似乎无法访问dns服务器。但是,如果我使用主机网络:
sudo docker run --network host busybox nslookup google.com
Server: 213.186.33.99
Address: 213.186.33.99:53
Non-authoritative answer:
Name: google.com
Address: 142.250.185.78
*** Can't find google.com: No answer我需要换一下表吗?还是网络问题?还是两者兼备?
编辑1
这绝对是个问题。我试着在没有这些iptable的服务器上执行相同的命令,并且成功了。当我加入iptable的时候,它就停止工作了。
发布于 2022-06-29 07:58:40
我需要允许在iptables的公共接口上建立通信量。
https://stackoverflow.com/questions/72576877
复制相似问题