LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-27-2008, 02:34 AM   #1
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 0
Apache2: Localhost works, but outside doesn't


So I am setting up an Apache2 Http server, Im fairly new to linux and such but I can usually figure stuff out or google for answers, but this has me stumped.
The problem is that I cannot connect to my server from outside my network. Localhost returns with the "It Works!." but my ip adress but it returns with "An error occurred while loading xx.xxx.xx.x:
Timeout on server
Connection was to xx.xxx.xx.x at port 80."
I have tired on basic port 80, firewall off, port forwarding to this computer, xx.xxx.xx.x.103, with apache httpd.conf setup like:
<Directory />
Options None
AllowOverride All
Order deny,allow
Allow from all
</Directory>
and nothing else changed.
So while that seems like it should work it didn't, I tried port 8080 and 5000, also, port forwarded and such. Also I used DMZ on xx.xxx.xx.x.103 also, hoping that would work, no such luck. I also tried no-ip.coms's port 80 redirect and that didn't work either.
If anyone has a clue please help me, I might just be missing something small or huge, I'm still new to this but learning, thanks for your time.
PS running OpenSuse, and ISP is Comcast, as far as i know they only block port 445.

Last edited by Navanax; 08-27-2008 at 02:36 AM.
 
Old 08-27-2008, 02:39 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What does

netstat -lnp | grep http

show?
 
Old 08-27-2008, 02:42 AM   #3
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
tcp 0 0 :::5000 :::* LISTEN 13081/httpd2-prefor
 
Old 08-27-2008, 02:49 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you actually trying to connect from outside, or from inside using your exernal IP?
 
Old 08-27-2008, 02:53 AM   #5
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
both really, brother on outside IP says it says the same thing.
 
Old 08-27-2008, 03:03 AM   #6
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
The thing is, a port scan from https://www.securetrust.com/resources/portscan/
shows that NO open ports are found, but this can't be. Heres some of my router settings:
1 Enable 0Disable
DMZ Host IP Address: 192.168.1. 103
So surely that right there should not block ANY ports, but also to follow that up I have the ports forwarded.
 
Old 08-27-2008, 03:31 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Sounds like a router configuration issue. Don't know how well it will work, but can your brother do a traceroute to your IP?

So

traceroute IP -p 80 (or whatever port)
 
Old 08-27-2008, 03:33 AM   #8
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
OK, he got the same thing I got on my traceroute:
traceroute 67.160.25.3 -p 8080
traceroute to 67.160.25.3 (67.160.25.3), 30 hops max, 40 byte packets
1 * * *
2 c-67-160-25-3.hsd1.wa.comcast.net (67.160.25.3) 2.759 ms 8.310 ms 8.630 ms
3 c-67-160-25-3.hsd1.wa.comcast.net (67.160.25.3) 15.597 ms 25.284 ms 23.302 ms

Last edited by Navanax; 08-27-2008 at 03:45 AM.
 
Old 08-27-2008, 04:10 AM   #9
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
It really does looks like a router issue, any settings I should be aware of besides the port forwarding? Im using 8080 ATM, just incase comcast does block port 80. I would really like to get this resloved and I appreciate the help so far and any to come.
PS, using a Linksys WRT54G router.

Last edited by Navanax; 08-27-2008 at 04:12 AM.
 
Old 08-27-2008, 04:18 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I cant' you a lot with the router since I don't know what you are using, but even if I did, I probably haven't used the same one.

I'd be checking:

forwarding
firewalls (router and server)
are you sure that the router and server can communicate (are on same subnet, etc)
 
Old 08-27-2008, 04:23 AM   #11
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I posted what router I'm using, Linksys WRT54G wireless. As for the subnet thing, how do i check/set them to the same subnet, as far as I know my routers subnet is 255.255.255.0
 
Old 08-27-2008, 04:26 AM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No it's not - that's the netmask. What's the ip of the server and the router?

edit - router lan not wan

sorry missed router type earlier

Last edited by billymayday; 08-27-2008 at 04:27 AM.
 
Old 08-27-2008, 04:33 AM   #13
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, my setup is this computer(server) - to - the wireless router, so my Ip(from "whatismyip.com") is 67.160.25.3. and to access my router its the default 192.168.1.1 from inside. So inside my server would be 192.168.1.103, thats what the router says this box is. The router is forwarding all requests on 80 or 8080 to 192.168.1.103. I have no firewall on this comp up ATM, its a fresh install.
 
Old 08-27-2008, 04:46 AM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can the server talk to the router? ie - can you ping the router or similar?
 
Old 08-27-2008, 04:50 AM   #15
Navanax
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
From server to external IP:
ping 67.160.25.3
PING 67.160.25.3 (67.160.25.3) 56(84) bytes of data.
64 bytes from 67.160.25.3: icmp_seq=1 ttl=64 time=2.09 ms
64 bytes from 67.160.25.3: icmp_seq=2 ttl=64 time=1.60 ms
64 bytes from 67.160.25.3: icmp_seq=3 ttl=64 time=1.58 ms

From server to router:
ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.92 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=2.46 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.60 ms

and from server to server?:
ping 192.168.1.103
PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
64 bytes from 192.168.1.103: icmp_seq=1 ttl=64 time=0.079 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from 192.168.1.103: icmp_seq=3 ttl=64 time=0.070 ms

Ok, Im sure I over did it, but you get the point. Thing I don't get is how come a portscan shows all my ports are closed...

Last edited by Navanax; 08-27-2008 at 04:52 AM.
 
  


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 : localhost/ works localhost/index.html does not PhilA Linux - Server 4 05-27-2007 07:32 PM
localhost on apache2 radiodee1 Debian 7 12-06-2006 05:49 PM
[Apache2] Localhost can connect to HTTPS, but not clients in the LAN Akhran Linux - Newbie 3 09-12-2005 05:13 PM
Apache2 debian sarge: browser can't connect to the localhost blueheart Linux - Software 5 07-15-2005 11:12 AM
[apache2] could not connect to host localhost LordFrancis Linux - Networking 1 09-30-2004 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:47 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