LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   CentOS 5.5 box unable to access a live web service on the Interwebs (http://www.linuxquestions.org/questions/linux-networking-3/centos-5-5-box-unable-to-access-a-live-web-service-on-the-interwebs-840807/)

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 (1.1.1.1), the private is 10.1.10.2 and the other private is connected via crossover cable to another server 192.168.100.1. 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
Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
ISP.netwpork.no 0.0.0.0        255.255.255.240 U    0      0        0 eth2
192.168.100.0  0.0.0.0        255.255.255.0  U    0      0        0 eth1
10.1.10.0      0.0.0.0        255.255.255.0  U    0      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    0      0        0 eth2
0.0.0.0        up.stream.gw    0.0.0.0        UG    0      0        0 eth2

/etc/resolve.conf
Code:

nameserver 8.8.8.8
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
Code:

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 google.com, slashdot.org, 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?

Regards,

Fordeck

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

ahhh...in CentOS, the file has to be created

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

GATEWAY0=2ND.ROUTER.IP.ADDRESS
NETMASK0=255.255.255.255
ADDRESS0=IP.OF.WEB.SERVER

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


All times are GMT -5. The time now is 08:39 PM.