Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Apache not visible from external box
#1

Hi,

 

I have two boxes. My main one is Windows XP, and is connected to the internet. My second box is CentOS 5, and is connected directly to my XP box via a crossover cable. It took some work to get XP and CentOS to talk to each other, but now they are actually communicating.

 

I do NOT want a website posted to the public... I just want to be able to access it from my XP box. My linux boxes IP is 192.168.0.245, and I can successfully PuTTy into it from my XP machine. So I know the connection is good to go.

 

I updated my httpd.conf file with the 192.168.0.245, and have the service up and running. I can connect to httpd locally via "telnet localhost 80" no problem. It works.

 

The problem is I can't connect to it from my XP box. I try http://192.168.0.245 in my browser, but that doesn't work.

 

I've tried all sorts of things... after all that's said and done, I think it must be a firewall issue. Maybe not though. I've tried changing the httpd port to 7000, 8000, etc, and it still doesn't work. I tried disabling SELinux, and it still doesn't work (although maybe I disabled it incorrectly?).

 

Right now I'm running it on port 8000 with no luck. Here is some output that might get people started:

 



Code:
[root@bleedbox /]# ps aux | grep httpd
root      2809  0.0  1.8  22808  9168 ?        Ss   13:50   0:00 /usr/sbin/httpd
apache    2811  0.0  1.0  22940  5376 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2812  0.0  1.0  22940  5336 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2813  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2814  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2815  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2816  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2817  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
apache    2818  0.0  0.9  22940  4708 ?        S    13:50   0:00 /usr/sbin/httpd
root      3227  0.0  0.1   3880   660 pts/0    R+   14:31   0:00 grep httpd
[root@bleedbox /]# iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
[root@bleedbox /]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:BA:15:FE:55
         inet addr:192.168.0.245  Bcast:192.168.0.255  Mask:255.255.255.0
         inet6 addr: fe80::250:baff:fe15:fe55/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:4544 errors:0 dropped:0 overruns:0 frame:0
         TX packets:4710 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:429065 (419.0 KiB)  TX bytes:731950 (714.7 KiB)
         Interrupt:12 Base address:0x2000

lo        Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:56 errors:0 dropped:0 overruns:0 frame:0
         TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:8724 (8.5 KiB)  TX bytes:8724 (8.5 KiB)




 

Any help would be appreciated.

 

-smlefo

Reply
#2

0.first make httpd to listen on port 80 . so change apache port to 80. restart httpd service

 

1. stop iptables on your linux box.

 

do in shell : service iptables stop , if it is redhat box

 

2.ping 192.168.0.254

result should not any have "100% packt lose" message

 

2.from windows xp box - got o dos shell ( cmd) and do

 

telnet 192.168.0.245 80

 

it should respond , if it shows like time out - unable to connect then some problem with network.

 

3.in linux box type netstat -a

 

so paste all of above details ... lets see

 

 

-Rav

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)