LinuxQuestions.org
Register a domain and help support LQ
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 06-27-2004, 11:56 PM   #1
nooodles
LQ Newbie
 
Registered: May 2004
Location: Texas
Posts: 18

Rep: Reputation: 0
apache webserver


i've started an apache webserver in my local lan. it's up and running b/c when i type in http://localhost/ on the webserver i get the webserver test page. however, i can't seem to get the same page when i type in the webserver ip in the browser on other computers in the lan. it attempts to go online to search for that page. does anyone know how to fix this?

thanks!
-anthony
 
Old 06-28-2004, 03:35 AM   #2
Freaky Dave
LQ Newbie
 
Registered: Jun 2004
Location: Prince George BC Ca
Distribution: Debian
Posts: 22

Rep: Reputation: 15
Are you running any firewalls or routers that mite be blocking port 80? You could try changing the port number in the appache config file.
 
Old 06-28-2004, 03:50 AM   #3
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Distribution: RH,FC/SuSE/Debian/HPUX/OSX
Posts: 511

Rep: Reputation: 30
have you an active firewall (www) on your linux/apache-machine? check the logfiles for connection attempts. is your client config ok? can you ping your webserver? it seems like a routing prob.
 
Old 06-28-2004, 09:58 AM   #4
nooodles
LQ Newbie
 
Registered: May 2004
Location: Texas
Posts: 18

Original Poster
Rep: Reputation: 0
i knwo the router isn't blocking port 80. as for the firewall on the webserver/linux machine i'm not too sure. how do i check that? the client machine is configured alright. i can ping the webserver from command prompt (windows 2000 os), but it searches the net when i enter the webserver ip in the browser =(

thanks again for you help so far. bare w/ me i'm quite new w/ this.

-Anthony
 
Old 06-28-2004, 07:54 PM   #5
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
From the CLI type "iptables -L" and it should list out all the iptables rules you have configured. The output should look something like this.

ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http

If you are blocking the port, it will say either DROP or REJECT
 
Old 06-28-2004, 09:43 PM   #6
nooodles
LQ Newbie
 
Registered: May 2004
Location: Texas
Posts: 18

Original Poster
Rep: Reputation: 0
YUP! I think it is the ip tables. apparently all tcp ports are blocked. strange...

[root@localhost root]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- aus-dns-cac-02-dmfe0.austin.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- aus-dns-cac-01-dmfe0.austin.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- rgv-dns-cac-02-dmfe0.rgv.rr.com anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- 192.168.1.103 anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

How do i change it? i looked at some tutorials and most of the stuff is over my head. does anyone know of a good tutorial in lamens terms?

thanks a lot for your help!
 
Old 06-28-2004, 10:40 PM   #7
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
temporarily, you can

#/sbin/service iptables stop

use this elementary script

Code:
#!/bin/sh

iptables -X
iptables -F
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

iptables -A OUTPUT -o lo -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT

iptables -A OUTPUT -o eth0 -j ACCEPT -m state --state NEW,RELATED,ESTABLISHED
iptables -A INPUT -i eth0 -j ACCEPT -m state --state RELATED,ESTABLISHED
save and run this script.

If you wish to keep the RedHat generated script, you can

# mv /etc/sysconfig/iptables /etc/sysconfig/iptables.orig-RH

#/sbin/service iptables save // this will make the above script your default ptables.

#/sbin/service iptables start // start using the above rules


Last edited by ppuru; 06-28-2004 at 10:44 PM.
 
Old 06-29-2004, 09:25 AM   #8
nooodles
LQ Newbie
 
Registered: May 2004
Location: Texas
Posts: 18

Original Poster
Rep: Reputation: 0
awesome i'll give it a try when i get home and post how it goes. thanks a bunch!
 
Old 06-30-2004, 01:04 AM   #9
nooodles
LQ Newbie
 
Registered: May 2004
Location: Texas
Posts: 18

Original Poster
Rep: Reputation: 0
WOOOHOO! it works! i used the iptables script. the only minor adjustment i had to do was change the policy from drop to accept.

THanks to all those that helped!
 
  


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
Apache webserver name karupt Linux - Networking 2 08-01-2004 11:55 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
How to configure apache webserver jagadish Linux - Networking 3 07-17-2003 11:01 AM
Apache webserver trusouthrnplaya Linux - Networking 1 03-30-2003 11:34 AM
Apache webserver questions filsed Linux - Networking 4 03-01-2002 10:41 PM


All times are GMT -5. The time now is 06:04 PM.

Main Menu
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