Network Unreachable error on new RHEL 6.3 installation
I installed RHEL 6.3 on a new server. On "firstboot" it was unable to connect to Red Hat to register for updates.
Further testing shows that most applications cannot reach the Inet (Firefox, Curl, etc) but the problem is NOT network connectivity. For example, when I try something like curl XXXXX.ca:80 (my test HTTP server) I get an error:
-->> Failed to connect to xxx.xxx.xxx.xxx: Network is unreachable <<-- although I can connect properly to this same server if I give its local (192.168...) IP address. Even ping won't work if the address is not on the internal LAN.
This looks like a hardware firewall problem so I plugged in my laptop on the same cable, set the IP to the same as the server, and can go anywhere I want. This is expected since the boundary firewall does not restrict outgoing connections to anywhere.
My guess is that RHEL by default sets up a software firewall and that it has the wrong rules but so far I haven't found anything in the documentation and a search of the RH knowledge base comes up blank, as does a wider Google search. "iptables" isn't listed on the process list.
I have checked all the config files that I know are network related without success.
NetworkManager is running but from the documentation doesn't seem to affect any of this.
Does anyone have any ideas what I set up wrong? If there is a software firewall, then how do I disable it and what is its name? In this environment it is not required.
Regards
John
Responses
You can see if the software firewall is running with "service iptables status". Turn it off and on with "service iptables stop" and "service iptables start". To stop the firewall starting at boot, run "chkconfig iptables off".
If I understand correctly, you can access via IP address but not via hostname.example.com? This indicates more a DNS issue than a local firewall issue. You can view your current DNS server with "cat /etc/resolv.conf" though different tools and system calls will use these DNS servers (and the hosts file, /etc/hosts) in different ways.
To try to nail it down a bit, can you post the contents of /etc/resolv.conf? Is there a "Gateway" statement in your /etc/sysconfig/network-scripts/ifcfg-ethx file(s)? What does a "netstat -rn" show?
The 169.254.0.0 route is the magic of zeroconf. If you add "NOZEROCONF=yes" to /etc/sysconfig/network it should go away.
The routes shown on the RHEL5 box provide the information needed to fix you up. The last line in the RHEL5 table shows your default route should be via the gateway at 192.168.1.1. To configure that on the new machine, you already have the "DEFROUTE=yes" on eth0, so just add "GATEWAY=192.168.1.1" and see if that doesn't fix it.
DNS worked because the requests were being relayed by your gateway system because of the DNS1 directive.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
