LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-25-2004, 08:08 AM   #1
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Rep: Reputation: 15
Getting Apache online ...


Hi,
besides from getting odbc running on postgresql,
my server is ready to go ...
But how do I get it online ?
Local is everything working,
but nobody can access from outside my lan ...

I run Apache 2 on mandrake 10
 
Old 08-25-2004, 08:12 AM   #2
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
How are you connected to the internet? Directly or through a router / gateway?`
Have you set the appropriate firewall rules to allow traffic on the desired ports?
 
Old 08-25-2004, 08:32 AM   #3
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
Cool

I'm new to linux, have mercy

What I have done:
installed mandrake 10
internet access through cable modem
internet sharing (ip masquerading) with windoze pc's in a lan
got apache, tomcat connected and running (with everything else needed)

And with the wizard in the control centre set up the firewall to
"Allow Web Server"

I suppose you suggest do test without the firewall ?
 
Old 08-25-2004, 09:05 AM   #4
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Is the cable modem just a modem or has it a router integrated?
Is your pc with the web server running directly connected to the modem or through your windows pc, which is connected to the modem?
If it is your windows box through which you access the internet, you have to enable in windows to forward the desired connections to your server.
 
Old 08-25-2004, 09:13 AM   #5
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
all running on linux,
linux is configured as a router
(it doesn't really matter, just to show it's all connected to internet),
the cable modem is just a "stupid" modem.

So ...
localhost works,
and from the windoze I can access the apache webserver pages
with the ip address linux got from the provider.
My ip address can even be pinged from outside my lan,
just my webserver isn't available ...

It's purely a configuration issue ...
and I can't find info on the internet that helps me.
 
Old 08-25-2004, 09:26 AM   #6
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Quote:
Originally posted by pelgrimforever
(it doesn't really matter, just to show it's all connected to internet)
Well it does matter, since if your server box was not directly connected to the internet, but through a gateway / router, you would have to configure the gateway / router to forward the desired services to your server box.

Now, you are directly connected to the modem. aren't you?
Try if you can reach your server while firewall disabled (but do it quick )
Be sure to connect to the correct ip.
 
Old 08-25-2004, 09:39 AM   #7
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
anything you say ;+)

so my firewall is down,
still nobody get any result loading a page ...
 
Old 08-25-2004, 09:42 AM   #8
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
Please answer all of my questions. I can't help you if i don't know the answers to them.
Those were:
- Is your server directly connected to the modem or not?
- Do you use the correct ip (really the one of your server)? Check it (ifconfig).
 
Old 08-25-2004, 09:47 AM   #9
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
sorry, thought is was clear from earlier posts ...

eth0: internet
eth1: lan
linux has ofcourse the apache 2 webserver running.

the ip address is right ;+)
 
Old 08-25-2004, 09:53 AM   #10
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
mmhh, i can't think of any other issue that could cause that people from outside can't but people inside your lan can access your webserver than those 2 i mentioned: either firewall or forwarding problem.
Have you checked whether the firewall successfully shut down?
Type iptables -L to check and post the output.

Last edited by Charalambos; 08-25-2004 at 09:55 AM.
 
Old 08-25-2004, 10:08 AM   #11
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
iptables -L brings both my LAN connections
as internet all together down :+)
 
Old 08-25-2004, 10:23 AM   #12
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
iptables -L just prints out all iptables (=firewall) rules, it doesn't affect anything about the firewall itself.
Either you turn off the firewall temporarily to check whether you can be accessed from the internet, or you verify that you have applied the rules to allow traffic to your web server on both interfaces (both eth0 and eth1). On eth1 (intranet) your server can be accessed, so there must be something missing on the rules on eth0 (to internet).
 
Old 08-25-2004, 10:29 AM   #13
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
My mistake,
that happens when you work on 2 different pc's at the same time.
I performed a iptables -F (flush) ...
never mind, here's the iptables -L output

[root@d5772a62 conf]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP !icmp -- anywhere anywhere state INVALID
eth0_in all -- anywhere anywhere
eth1_in all -- anywhere anywhere
common all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:INPUT:REJECT:'
reject all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
DROP !icmp -- anywhere anywhere state INVALID
eth0_fwd all -- anywhere anywhere
eth1_fwd all -- anywhere anywhere
common all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:FORWARD:REJECT:'
reject all -- anywhere anywhere

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP !icmp -- anywhere anywhere state INVALID
fw2net all -- anywhere anywhere
all2all all -- anywhere anywhere
common all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:OUTPUT:REJECT:'
reject all -- anywhere anywhere

Chain all2all (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
common all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:all2all:REJECT:'
reject all -- anywhere anywhere

Chain common (5 references)
target prot opt source destination
icmpdef icmp -- anywhere anywhere
reject udp -- anywhere anywhere udp dpt:135
reject udp -- anywhere anywhere udp dpts:netbios-ns:netbios-ssn
reject udp -- anywhere anywhere udp dpt:microsoft-ds
reject tcp -- anywhere anywhere tcp dpt:netbios-ssn
reject tcp -- anywhere anywhere tcp dpt:microsoft-ds
reject tcp -- anywhere anywhere tcp dpt:135
DROP udp -- anywhere anywhere udp dpt:1900
DROP all -- anywhere 255.255.255.255
DROP all -- anywhere BASE-ADDRESS.MCAST.NET/4
reject tcp -- anywhere anywhere tcp dpt:auth
DROP udp -- anywhere anywhere state NEW udp spt:domain

Chain dynamic (4 references)
target prot opt source destination

Chain eth0_fwd (1 references)
target prot opt source destination
dynamic all -- anywhere anywhere state NEW
net2all all -- anywhere anywhere

Chain eth0_in (1 references)
target prot opt source destination
dynamic all -- anywhere anywhere state NEW
net2fw all -- anywhere anywhere

Chain eth1_fwd (1 references)
target prot opt source destination
dynamic all -- anywhere anywhere state NEW
loc2net all -- anywhere anywhere

Chain eth1_in (1 references)
target prot opt source destination
dynamic all -- anywhere anywhere state NEW
loc2fw all -- anywhere anywhere

Chain fw2net (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere

Chain icmpdef (1 references)
target prot opt source destination

Chain loc2fw (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere state NEW multiport dports domain,netbios-ns,netbios-dgm,netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW multiport dports http,https,domain,ssh,ftp-data,ftp,netbios-ns,netbios-dgm,netbios-ssn
ACCEPT icmp -- anywhere anywhere icmp echo-request
all2all all -- anywhere anywhere

Chain loc2net (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere

Chain net2all (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
common all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:net2allROP:'
DROP all -- anywhere anywhere

Chain net2fw (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
newnotsyn tcp -- anywhere anywhere state NEW tcp flags:!SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere state NEW multiport dports domain,netbios-ns,netbios-dgm,netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW multiport dports http,https,domain,ssh,ftp-data,ftp,netbios-ns,netbios-dgm,netbios-ssn
ACCEPT icmp -- anywhere anywhere icmp echo-request
net2all all -- anywhere anywhere

Chain newnotsyn (6 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level info prefix `Shorewall:newnotsynROP:'
DROP all -- anywhere anywhere

Chain reject (11 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable
REJECT icmp -- anywhere anywhere reject-with icmp-host-unreachable
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain shorewall (0 references)
target prot opt source destination
 
Old 08-25-2004, 10:38 AM   #14
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
I didn't mean to print the whole iptables, but the content of it after turning off the firewall (to verify that it shut down correctly).

Anyway, i had a quick look at it, and the Problem seems to be in your FORWARD chain:
Quote:
eth0_fwd all -- anywhere anywhere
This rule forwards all your traffic from the internet to somewhere else (i don't know where though) instead of letting the connection to your linux box directly access.
 
Old 08-25-2004, 10:47 AM   #15
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
ok ..............

how do I solve it ?
 
  


Reply



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
How to watch Online TV or listen to Online radiostations? polemon Linux - Newbie 4 10-07-2005 01:49 PM
Server goes online when started and stays online ... joepl Linux - Networking 1 08-18-2005 02:12 PM
kopete online then away the online tnf Mandriva 2 04-10-2004 05:12 PM
How do I get apache to be accessible for everyone online ? TheFrogMr Linux - Newbie 6 04-04-2004 12:32 PM
Online Banking / Online Shopping in Linux? JROCK1980 Linux - General 14 02-27-2004 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:17 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
Open Source Consulting | Domain Registration