CentOS의 네트워크 방화벽, 호스트가 확인할 수 없습니까?

CentOS의 네트워크 방화벽, 호스트가 확인할 수 없습니까?

Centos 머신이 있고 yum. 이렇게 하면 호스트를 확인할 수 없다는 메시지가 계속 나타납니다. 나는 그 기계를 사용했던 이전 사람이 그것에 대해 매우 엄격한 방화벽을 가지고 있었다고 들었습니다. service iptables stop을 시도했지만 여전히 이 문제가 있습니다. 다른 호스트와의 통신을 방해하는 다른 방화벽은 무엇입니까?

방화벽은 특정 연구실의 특정 컴퓨터를 통해서만 컴퓨터에 SSH로 접속할 수 있도록 설정되어 있습니다.

실수:

sudo yum install perl-XML-Simple
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.ndchost.com
 * extras: centosmirror.quintex.com
 * updates: centos.aol.com
http://centos.mirror.ndchost.com/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.mirror.ndchost.com'"
Trying other mirror.
http://mirror.cs.vt.edu/pub/CentOS/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.cs.vt.edu'"
Trying other mirror.
http://mirror.pac-12.org/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.pac-12.org'"
Trying other mirror.
http://mirror.rackspace.com/CentOS/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.rackspace.com'"
Trying other mirror.
http://mirror.raystedman.net/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.raystedman.net'"
Trying other mirror.
http://mirror.solarvps.com/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.solarvps.com'"
Trying other mirror.
http://mirror.team-cymru.org/CentOS/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.team-cymru.org'"
Trying other mirror.
http://mirrors.easynews.com//linux/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.easynews.com'"
Trying other mirror.
http://mirrors.usc.edu/pub/linux/distributions/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.usc.edu'"
Trying other mirror.
ftp://mirror.nandomedia.com/pub/CentOS/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.nandomedia.com'"
Trying other mirror.
http://centosmirror.quintex.com/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centosmirror.quintex.com'"
Trying other mirror.
http://mirror.beyondhosting.net/CentOS/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.beyondhosting.net'"
Trying other mirror.
http://mirror.compevo.com/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.compevo.com'"
Trying other mirror.
http://mirror.kentdigital.net/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.kentdigital.net'"
Trying other mirror.
http://mirror.wiredtree.com/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.wiredtree.com'"
Trying other mirror.
http://mirrors.adams.net/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.adams.net'"
Trying other mirror.
http://mirrors.easynews.com//linux/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.easynews.com'"
Trying other mirror.
http://mirrors.rit.edu/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.rit.edu'"
Trying other mirror.
http://mirrors.sonic.net/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sonic.net'"
Trying other mirror.
http://mirrors.syringanetworks.net/centos/6.5/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.syringanetworks.net'"
Trying other mirror.
http://centos.aol.com/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.aol.com'"
Trying other mirror.
http://centos.eecs.wsu.edu/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.eecs.wsu.edu'"
Trying other mirror.
http://centos.host-engine.com/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.host-engine.com'"
Trying other mirror.
http://mirror.cisp.com/CentOS/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.cisp.com'"
Trying other mirror.
http://mirror.linux.duke.edu/pub/centos/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.linux.duke.edu'"
Trying other mirror.
http://mirror.tocici.com/centos/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.tocici.com'"
Trying other mirror.
http://mirrors.liquidweb.com/CentOS/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.liquidweb.com'"
Trying other mirror.
http://mirrors.seas.harvard.edu/centos/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.seas.harvard.edu'"
Trying other mirror.
ftp://ftp.wallawalla.edu/pub/mirrors/centos/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'ftp.wallawalla.edu'"
Trying other mirror.
ftp://mirror.nandomedia.com/pub/CentOS/6.5/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.nandomedia.com'"
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-XML-Simple.noarch 0:2.18-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================================================================================
 Package                                                       Arch                                                 Version                                                  Repository                                          Size
======================================================================================================================================================================================================================================
Installing:
 perl-XML-Simple                                               noarch                                               2.18-6.el6                                               base                                                72 k

Transaction Summary
======================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 72 k
Installed size: 155 k
Is this ok [y/N]: y
Downloading Packages:
http://centos.mirror.ndchost.com/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.mirror.ndchost.com'"
Trying other mirror.
http://mirror.cs.vt.edu/pub/CentOS/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.cs.vt.edu'"
Trying other mirror.
http://mirror.pac-12.org/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.pac-12.org'"
Trying other mirror.
http://mirror.rackspace.com/CentOS/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.rackspace.com'"
Trying other mirror.
http://mirror.raystedman.net/centos/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.raystedman.net'"
Trying other mirror.
http://mirror.solarvps.com/centos/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.solarvps.com'"
Trying other mirror.
http://mirror.team-cymru.org/CentOS/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.team-cymru.org'"
Trying other mirror.
http://mirrors.easynews.com//linux/centos/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.easynews.com'"
Trying other mirror.
http://mirrors.usc.edu/pub/linux/distributions/centos/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.usc.edu'"
Trying other mirror.
ftp://mirror.nandomedia.com/pub/CentOS/6.5/os/x86_64/Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirror.nandomedia.com'"
Trying other mirror.


Error Downloading Packages:
  perl-XML-Simple-2.18-6.el6.noarch: failure: Packages/perl-XML-Simple-2.18-6.el6.noarch.rpm from base: [Errno 256] No more mirrors to try.

방화벽이 켜져 있을 때 iptables의 출력입니다. 하지만 yum을 사용할 때 나는 해냈습니다.service iptables stop

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     udp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           udp dpt:53 
    0     0 ACCEPT     tcp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           tcp dpt:53 
    0     0 ACCEPT     udp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           udp dpt:67 
    0     0 ACCEPT     tcp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           tcp dpt:67 
    8   560 ACCEPT     all  --  *      *       128.46.76.110        0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       128.0.0.0/8          0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       127.0.0.0/8          127.0.0.0/8         
    5   480 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    7   420 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      virbr0  0.0.0.0/0            192.168.122.0/24    state RELATED,ESTABLISHED 
    0     0 ACCEPT     all  --  virbr0 *       192.168.122.0/24     0.0.0.0/0           
    0     0 ACCEPT     all  --  virbr0 virbr0  0.0.0.0/0            0.0.0.0/0           
    0     0 REJECT     all  --  *      virbr0  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable 
    0     0 REJECT     all  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable 
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT 18 packets, 1788 bytes)
 pkts bytes target     prot opt in     out     source               destination

방화벽이 꺼져 있으면 다음과 같습니다.

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination 

/etc/resolv.conf

# Generated by NetworkManager
search ecn.xxx.purdue.edu

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

답변1

방화벽 규칙이 없으며 OUTPUT기본 OUTPUT정책은 수락이므로 DNS 쿼리가 실행되는 것을 방지할 수 있는 방법이 없습니다.

또한 모든 나가는 연결과 나가는 연결과 관련된 기타 메시지에 대해 들어오는 응답을 허용하는 규칙보다 먼저 INPUTDNS 응답이 들어오는 것을 특별히 차단하는 방화벽 규칙이 없습니다.state RELATED,ESTABLISHED

FORWARD이러한 규칙은 시스템이 라우터 또는 가상화 호스트 역할을 하는 경우에만 적용됩니다. 이 호스트에서 실행 중인 모든 가상 머신에서 나가는 연결은 VM의 IP 주소가 192.168.122.0/24 네트워크에 있는 경우에만 허용됩니다. 그 외에는 가상 머신에 대한 DNS 연결에 특별한 제한이 없는 것 같습니다.

문제는 현재 시스템에 DNS 이름 서버가 구성되어 있지 않다는 것입니다. 나가는 네트워크 인터페이스에 해당하는 파일 에 DNS1=<nameserver IP address>행을 추가하거나 /etc/sysconfig/network-scripts/ifcfg-*jofel이 그의 의견에서 제안한 대로 파일에 직접 행을 추가하여 이 문제를 해결할 수 있습니다 .nameserver <nameserver IP address>/etc/resolv.conf

파일 에 이름 서버 주소를 추가하는 경우 ifcfg-*변경 사항을 적용하려면 네트워크 인터페이스를 비활성화했다가 다시 활성화해야 하거나 재부팅해야 할 수도 있습니다. 직접 편집하는 경우 /etc/resolv.conf파일을 저장한 후 변경 사항이 즉시 적용됩니다.

관련 정보