LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-22-2008, 05:00 AM   #1
karazy-k
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
cannot access server over internet after successful installation of apache2


I am newb to the home server, so please bear with me.

I am running Fedora 8 and installed apache2 manually. I know it installed correctly and is running, because I see the "It Works!" html page on my server's own browser when at the url "localhost". I am also pointed towards the "It Works!" page if I enter my server's IP address from another computer on my network, so it works on my LAN, too.

I have also configured my router to forward port 80 to my server. I should note that my router has assigned a static IP address based on my server's MAC address to my server.

Furthermore, I have also checked to see whether or not my ISP has port 80 opened by a test done at .canyouseeme.org

I have checked my server's firewall and confirmed that port 80 is not being blocked there either.

I have checked the access.log and error.log, but there isn't an obvious answer there. The error log is empty and the access log documents the times I connected through my network.

Whenever I enter my server's IP as a url, my browser times out.

In summary, apache2 is working on my LAN, but not on the internet.

Does anyone know how to fix this problem?

Thank you,
Kyle
 
Old 02-22-2008, 05:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
well do you have any dns set up? what url are you using? can you resolve / ping the box by hostname remotely at all?
 
Old 02-22-2008, 05:43 AM   #3
karazy-k
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Dear Chris,

I don't quite understand everything you are asking, but I will answer to the best of my abilities.

I do not have a DNS setup. I was planning on only using the IP my ISP gave me, so I guess my url is my IP address.

I do not know how to remotely ping my box by hostname. Could you please explain this process and also what this method would tell us about my problem.

Thanks,
Kyle
 
Old 02-22-2008, 06:21 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
ahh, i thought you said you *could* reach it by ip. my mistake.

on the server, run "tcpdump -n port 80" and then try again from the remote location. if you see anything coming in from the connection attempt then there's somethign on the linux side, if you see nothing then it's on your router.
 
Old 02-22-2008, 06:55 AM   #5
karazy-k
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Dear Chris,

Thank you for your advice. I have done as your said and ran "tcpdump -n port 80". While running I attempted to connect to the server through my browser and I did get some information on my terminal.

Periodically a couple of lines of numbers the contained the IP address of my ISP and the IP address my router assigned my computer appeared. I got results like this when I tried to access my server from my server's browser and another computer's browser.

I believe I understand why I can access my server's homepage from my LAN too. When I ran the tcpdump and then connected through my LAN I instantly pulled up my server's homepage, but nothing appeared on the terminal. Does that mean computers on the same network don't need to use port 80?

You mentioned that this would mean the problem is on the Linux side. I agree. I don't know where to go from here. Do you have any more advice? Would it help if I sent the text from my terminal after I run tcpdump?

Thanks,
Kyle
 
Old 02-22-2008, 06:58 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
well can you show us the info? quite possible you have a software firewall on the linux box maybe. and port 80 will *always* be used, nothign special about a lan connection as far as the server is concerned.
 
Old 02-22-2008, 01:49 PM   #7
karazy-k
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Dear Chris,

Here what tcpdump gathers.

[root@localhost ~]# tcpdump -n port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:46:30.725817 IP 192.168.1.6.55761 > 209.132.176.122.http: S 3583241640:3583241640(0) win 5840 <mss 1460,sackOK,timestamp 72617256 0,nop,wscale 5>
10:46:30.772824 IP 209.132.176.122.http > 192.168.1.6.55761: S 3052579816:3052579816(0) ack 3583241641 win 5792 <mss 1380,sackOK,timestamp 647780817 72617256>
10:46:30.772904 IP 192.168.1.6.55761 > 209.132.176.122.http: . ack 1 win 5840 <nop,nop,timestamp 72617303 647780817>
10:46:30.772986 IP 192.168.1.6.55761 > 209.132.176.122.http: P 1:526(525) ack 1 win 5840 <nop,nop,timestamp 72617303 647780817>

Last edited by karazy-k; 02-22-2008 at 09:04 PM.
 
Old 02-22-2008, 09:08 PM   #8
karazy-k
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Dear Chris,

I have an update. I believe the problem is actually with the router and port forwarding. It turns out that whenever look my IP address up in a browser using the internet from some outside location apache is working. Therefore, there really isn't a problem anymore.

However, I am curious as to what is really going on.

To recap. I can apache works from my server at localhost, at any other computer on my network using the IP designated by my router, and any computer outside of my network with an internet connection.

I cannot however use the IP my ISP gave me from within my network to connect to my server. I'm not sure why, but this definitely makes me think it is a router issue. If you can explain this I'd love to know what is going on.

Thanks,
Kyle
 
Old 02-23-2008, 03:22 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
right, you can't use your public IP from inside your network as it's the IP of the router, not your server. ip forwards only work on the outside, not the inside, as normally if you were to have it working inside, then you'd not be able to reach the web interface on the adsl router etc..
 
Old 08-18-2008, 07:17 AM   #10
midisite
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
I just joined this forum cause the last post p!55ed me off.

Why do people come on to these things and talk rubbish about things they know nothing about?

Of course a router can port forward from an inside host. I run several large websites, and I can access each and every one of them from inside my network using my domain name (which resolves to my outside IP address). I can also access using IP address but using Name Based Virtual Hosting, I would only see the default site this way.

You were definitely right Kyle. This will be an issue with your router settings. I you still have the problem, let us know what router you are using.

Paul.
 
  


Reply

Tags
apache, apache2, linux, nat, port forwarding, router


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
iFolder Enterprise Server Installation on Apache2 GibsonDL Linux - Server 0 01-27-2008 05:54 AM
successful installation of mail server but has 2 problem drluong Linux - Server 2 03-05-2007 12:29 PM
internet server that use a prepaid account to access the internet elgieb1 Linux - General 0 02-20-2007 12:59 AM
Samba + WindowsXP: Access Denied even after successful connection... emalbum Linux - Networking 4 07-05-2004 08:06 PM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 06:17 PM


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