0

I have a centos machine and I am trying install some dependencies using yum. When I do this I keep getting a message saying the host cannot be resolved. I was told the previous person that used the machine deployed a very restrictive firewall on it. I tried service iptables stop, but I am still having this issue. What other firewalls could be preventing me from communicating with other hosts?

The firewall is setup in a way that I can only ssh into the machine through a specific machine in a given lab.

Error:

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.

This is the iptables output when the firewall is on. But when using yum I had done 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

When the firewall was off it was:

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
  • Can you ping the repository? – eyoung100 Dec 3 '14 at 15:27
  • Yes, I can ping it. – RagHaven Dec 3 '14 at 15:41
  • 1
    Can you post the exact error you get when using yum then? If you can ping the repository, the firewall isn't the issue. Also, can you ping the repository from inside the SSH Prompt? – eyoung100 Dec 3 '14 at 15:44
  • 1
    Have you tried # yum clean all? – garethTheRed Dec 3 '14 at 15:51
  • 1
    Does it work if you add nameserver 8.8.8.8 to /etc/resolv.conf? – jofel Dec 3 '14 at 16:30
1

There are no OUTPUT firewall rules in place and the default OUTPUT policy is ACCEPT, so nothing prevents a DNS query from going out.

Also, there are no INPUT firewall rules that would specifically block the DNS responses from coming in before the state RELATED,ESTABLISHED rule that will accept incoming responses for all outgoing connections, and any other messages related to the outgoing connections.

The FORWARD rules would be applicable only if this system were acting as a router or a virtualization host. Any virtual machines running on this host are allowed outgoing connections only if the VM's IP address is in the 192.168.122.0/24 network. Other than that, there seems to be no particular restrictions for DNS connectivity for VMs.

The problem seems to be that the system has no DNS nameservers configured at this time. You could fix this by adding a DNS1=<nameserver IP address> line into the /etc/sysconfig/network-scripts/ifcfg-* file corresponding your outgoing network interface, or by directly adding a nameserver <nameserver IP address> line to /etc/resolv.conf file, as suggested by jofel in his comment.

If you add nameserver address(es) to the ifcfg-* file, you'll probably need to either disable & re-enable your network interface for the change to take effect, or just reboot. If you edit /etc/resolv.conf directly, the change will take effect as soon as you save the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.