LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2008, 06:48 AM   #1
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
accessing apache from lan


i am having problems accessing web pages on my fedora 9 machine. I can access it by going to localhost from the fedora machine, but i can not do so by the entering the ip address in a browser address bar on a client machine; ex: going to 192.168.166.112 (ip of fedora). I sense that it's something system wide not specific to apache, since i have a tomcat web application that uses port 8080 and i am experiencing the same behavior; i can access the pages locally, but not from a client machine. Note that i can ping the machine from other machines on the lan.
 
Old 06-17-2008, 06:51 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Is the apache on fedora running? And what port is it running if it is?
 
Old 06-17-2008, 06:53 AM   #3
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Did you check to see what interface you're binding to? If you're only binding to the local loopback device, remote machines will not get a response when they attempt an http connection.
 
Old 06-17-2008, 07:12 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
might also want to look at firewall rules..

#iptables -L
 
Old 06-17-2008, 07:40 AM   #5
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
access from lan

apache is running on fedora 9 on port 80. pinneped, how do u check interface binding?

here is the result of iptables -L

[root@webserver ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:domain
ACCEPT udp -- anywhere anywhere state NEW udp dpt:domain
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:imaps
ACCEPT ah -- anywhere anywhere
ACCEPT esp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp
ACCEPT udp -- anywhere 224.0.0.251 state NEW udp dpt:mdns
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ipp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:nfs
ACCEPT udp -- anywhere anywhere state NEW udp dpt:nfs
ACCEPT udp -- anywhere anywhere state NEW udp dptpenvpn
ACCEPT tcp -- anywhere anywhere state NEW tcp dptop3s
ACCEPT udp -- anywhere anywhere state NEW udp dpt:radius
ACCEPT udp -- anywhere anywhere state NEW udp dpt:radius-acct
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:microsoft-ds
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Old 06-17-2008, 11:29 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Apache docs on Binding
 
Old 06-18-2008, 12:17 PM   #7
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
i read the apache bind docs then commented the <virtualhost tag in httpd.conf and apache worked right away. but i have an installation for a software that uses tomcat, and it listens on port 8080. I can't get that to work, seems to be the same issue but i don't know how to handle this for tomcat, anyone? any clue?
 
Old 06-18-2008, 12:55 PM   #8
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
It looks like you do not have a firewall rule that allows a connection on port 8080 to start with... If you are connecting from an external machine to port 8080 then you need to address that issue first.

Last edited by farslayer; 06-18-2008 at 12:57 PM.
 
Old 06-18-2008, 01:38 PM   #9
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
i have the firewall and selinux disabled. it's a machine on the local network not exposed to the internet.
 
Old 06-18-2008, 02:32 PM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
so iptables -L no longer shows the output you posted above ? just verifying..
 
Old 06-18-2008, 03:06 PM   #11
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
the iptables command was ran after the firewall and selinux were disabled.
 
Old 06-18-2008, 03:56 PM   #12
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
a firewall showing that output doesn't appear to be disabled..

This is an empty/disabled firewall rule set..
Code:
it-etch:~# iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Notice how yours lists rules for specific protocols ? http, https, etc.. Your list has quite a few entries.. inclkuding a REJECT ALL at the bottom for anything that wasn't specifically allowed. ..

you may want to try iptables -F to flush the rule set for testing.. (provided there is an external firewall or NAT router between this box and the internet)

then try iptables -L again and your output should mirror what I have posted above..

if so try connecting to the box again on port 8080
 
Old 06-19-2008, 06:38 AM   #13
mizos13
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
thanks

farslayer, thanx for your help i got it to work after i flushed iptables. why was this step needed though? shouldn't iptables be flushed right after i disable the firewall?
 
  


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
accessing internet on LAN outstream Linux - Newbie 4 01-11-2007 02:56 PM
Problem accessing computer through LAN jojojo Linux - Newbie 5 05-27-2006 03:56 PM
LAN accessing problem aditya1 Linux - Networking 1 03-09-2005 12:42 PM
Accessing LAN from outside OliXNet Linux - Networking 11 02-08-2005 05:46 AM
Accessing MY virtual hosts from MY Lan. TheSwine Linux - Networking 2 03-02-2004 02:41 PM


All times are GMT -5. The time now is 02:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration