LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 07-27-2006, 11:37 AM   #1
frankd99
LQ Newbie
 
Registered: Dec 2003
Location: Ballston Lake, NY
Distribution: Fedora 5.0
Posts: 24

Rep: Reputation: 15
Question Can't see Apache test page


I just installed Fedora 5 and plan to use it to run an Apache web server in my home. After the install was done I started Apache and opened a browser page. I typed http://192.168.2.106 and saw the default test page so I figured everything was setup OK. I tried doing the same from another computer on my lan but got a page not found. I also tried it from outside the lan by typing www.compunerdsdev.com and http://compunerdsdev.com, but got the same result. I checked the settings in ZoneEdit and the web server should be live, and I have port 80 forwarded in my router. I also found out that my ISP doesn't block port 80. I was able to ping the server from my XP pro computer. I even set SElinux to permit and still nothing. Any suggestions would be much appreciated.
 
Old 07-27-2006, 12:09 PM   #2
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
Hello frankd99,

Most probably your firewall in the Webserver is setup so as to deny any connections from outside the local machine. Please check if you have any rules in your IPTABLES or TCP Wrappers (/etc/host.deny & /etc/host.allow).
Also it would be much appreciated if you could paste your 'iptables -L' output. Think we can solve it...

Thanks..
 
Old 07-27-2006, 01:57 PM   #3
frankd99
LQ Newbie
 
Registered: Dec 2003
Location: Ballston Lake, NY
Distribution: Fedora 5.0
Posts: 24

Original Poster
Rep: Reputation: 15
Wink Can't see Apache test page

Thanks for the quick reply. Here is the contents of my iptables. The /etc/host.allow and deny files contained no additional information except for comments.

[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

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

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:f tp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:s mtp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:s sh
ACCEPT udp -- anywhere anywhere state NEW udp dpt:n etbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:n etbios-dgm
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:n etbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:m icrosoft-ds
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:h ttps
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:t elnet
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:5 900
REJECT all -- anywhere anywhere reject-with icmp-ho st-prohibited
[root@localhost ~]#

Hope this helps.
 
Old 07-27-2006, 04:20 PM   #4
fedora4002
Member
 
Registered: Mar 2004
Posts: 135

Rep: Reputation: 15
As you can se from the list, HTTP port is not open. So firewall blocks it.
 
Old 07-27-2006, 04:30 PM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What about

ACCEPT all -- anywhere anywhere

?

Looks to me like the firewall is totally open
 
Old 07-27-2006, 05:55 PM   #6
fedora4002
Member
 
Registered: Mar 2004
Posts: 135

Rep: Reputation: 15
Just try
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp --dport 80 -j ACCEPT

and it should do it.
As for why ACCEPT all -- anywhere anywhere in the first line does not work. I am not sure. But it seems that the last line of reject all did his work. I tried google for a while but did not find any good explaination. Maybe, someone else can share his knowledge here.

According to documentation of iptables, the rule are parsed one by one in the order of the rule set. If there were a match like ACCEPT, it is accpet and terminated. Clearly, this does not happen here.
 
Old 07-27-2006, 08:02 PM   #7
frankd99
LQ Newbie
 
Registered: Dec 2003
Location: Ballston Lake, NY
Distribution: Fedora 5.0
Posts: 24

Original Poster
Rep: Reputation: 15
Wink Can't see Apache test page

Thanks everyone for the expert advise. I stopped the iptaples and everything worked OK. After adding port 80 to iptables I can now open the test page with http://192.168.106.

Thanks again for all the help
 
Old 07-27-2006, 08:06 PM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can see the test page from both of the links you gave above as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Apache Test Page ApachePadowan Linux - Software 4 04-20-2005 10:28 PM
Apache test page mpalazzini Linux - Software 2 10-03-2004 11:13 AM
Apache test page mpalazzini Linux - General 2 10-03-2004 11:12 AM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 01:35 PM
Apache test page...Now what? Hal Linux - Newbie 6 10-24-2003 11:46 AM


All times are GMT -5. The time now is 09:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration