-   Linux - Networking (
-   -   CentOS 5.5 box unable to access a live web service on the Interwebs (

gr33d 10-27-2010 01:35 PM

CentOS 5.5 box unable to access a live web service on the Interwebs
From my office and home, I can access a web service, no problem. However, from my server at the data center, I cannot. Could this be a DNS issue? I've tried with iptables enabled and disabled. selinux is disabled. This server has multiple network interfaces, one public and two private. The public has a WAN IP address (, the private is and the other private is connected via crossover cable to another server I think route -n tells me the WAN interface is used to access the internet, as its gateway is my ISP's upstream gateway. CentOS 5.5

route -n

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface U    0      0        0 eth2  U    0      0        0 eth1  U    0      0        0 eth0    U    0      0        0 eth2        UG    0      0        0 eth2


search localdomain

(I've also tried inserting two lines at the top of /etc/resolve.conf with my data center's recommended DNS, but that didn't work either

lynx site.iam.trying/service.asmx

Making HTTP connection to site.iam.trying
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://site.iam.trying/service.asmx

here are the kickers, lynx works from three other servers behind the firewall (only one network interface, LAN-only) no problem. lynx also works from the problem box fine when i surf to,, etc.

What else can I try?

fordeck 10-27-2010 01:49 PM

Just couple of questions.

What happens when you try to ping the service by its name?

Does it resolve to the correct IP address?

Can you surf to the service by using the IP instead of its name?



gr33d 10-27-2010 01:59 PM

ping correctly resolves the site.iam.trying.

the web server on which the service is hosted contains multiple websites, so it would need a header, right? i don't think it's possible to surf to it by IP address unless it was in windoze's default website (it is not hosted there)

gr33d 10-27-2010 04:26 PM

I had to add a route to make it work. There was another router in the subnet and traffic wasn't being directed correctly.

However, this new route disappears on reboot or /etc/init.d/network restart. How do I make this route stick?

gr33d 10-27-2010 04:36 PM CentOS, the file has to be created

/etc/sysconfig/network-scripts/route-eth2 (eth2 is my WAN)
then add


Hope this helps someone in the future with as silly a network setup as mine!

All times are GMT -5. The time now is 06:54 AM.