Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-27-2004, 11:56 PM
|
#1
|
LQ Newbie
Registered: May 2004
Location: Texas
Posts: 18
Rep:
|
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
|
|
|
06-28-2004, 03:35 AM
|
#2
|
LQ Newbie
Registered: Jun 2004
Location: Prince George BC Ca
Distribution: Debian
Posts: 22
Rep:
|
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.
|
|
|
06-28-2004, 03:50 AM
|
#3
|
Member
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541
Rep:
|
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.
|
|
|
06-28-2004, 09:58 AM
|
#4
|
LQ Newbie
Registered: May 2004
Location: Texas
Posts: 18
Original Poster
Rep:
|
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
|
|
|
06-28-2004, 07:54 PM
|
#5
|
Member
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150
Rep:
|
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
|
|
|
06-28-2004, 09:43 PM
|
#6
|
LQ Newbie
Registered: May 2004
Location: Texas
Posts: 18
Original Poster
Rep:
|
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!
|
|
|
06-28-2004, 10:40 PM
|
#7
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
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.
|
|
|
06-29-2004, 09:25 AM
|
#8
|
LQ Newbie
Registered: May 2004
Location: Texas
Posts: 18
Original Poster
Rep:
|
awesome i'll give it a try when i get home and post how it goes. thanks a bunch!
|
|
|
06-30-2004, 01:04 AM
|
#9
|
LQ Newbie
Registered: May 2004
Location: Texas
Posts: 18
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 07:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|