LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-24-2007, 11:04 PM   #1
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Rep: Reputation: 15
Apache is not working on my Linux box that is acting as a router


I finally have the port forwarding and masquerading working, so my other computers can access the internet through my Linux box. However, I also want to run a web server on the same computer. It's not working: Apache serves web pages when I connect using computers within the network, but when I go outside the network, it doesn't work. I thought it had something to do with the internet connection sharing, but I flushed all the iptables rules, set ip_forward to "0," killed dhcpd and named, and I still cannot connect to the server from outside the network.

I have one iptables rule: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE.

I'm pretty sure my ISP isn't blocking port 80, because when I kill apache, I get an error almost immediately; when I have apache running, my browser tries to connect for a while before outputting an error.

Ideas? Solutions?

Thanks in advance.
 
Old 06-24-2007, 11:57 PM   #2
got_nix
Member
 
Registered: Oct 2004
Location: Jamaica
Distribution: Ubuntu 6.0.6 (Dapper Drake)
Posts: 59

Rep: Reputation: 15
and your using a service like dyndns to access outside your network?
 
Old 06-25-2007, 01:21 AM   #3
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
Aye. I actually use www.no-ip.com, but they're similar enough.
 
Old 06-25-2007, 02:27 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok, let's look for tcp traffic on port 80 on the box with tcpdum por wireshark... eth0 is your external nic? so run "tcpdump -n port 80 -i eth0" to show traffic there. if you never even see a syn to the box from the remote client it's not the machine's fault... things like transparent proxies could easily fudge this up if they aren't configured right...
 
Old 06-25-2007, 06:25 PM   #5
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
I see several packets heading for my computer from outside when I run that, and I also see packets heading from my internal IP back out. I'll assume this means it has something to do with my computer? Apache's configuration is the configuration that came with Slackware. I haven't changed anything yet.
 
Old 06-26-2007, 03:12 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well it's hard to comment too much without seeing the traffic captures, but that would suggest that it's likely to be apache itself. anything in the apache access log file? if you open that capture in wireshark then you'll be able to easily see the http conversation if it exists.
 
Old 06-26-2007, 02:40 PM   #7
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
When I run wireshark on the interface and try to access my website externally, I get a bunch of TCP "Retransmission"s and TCP "Dup Ack"s. I just installed wireshark, so I'm still trying to figure out how I am to copy the traffic captures into this li'l post box.

Edit: I just tried pinging retypepassword.myftp.org (no-ip.com name), and I get replies from my external IP address, so no-ip.com is probably doing what it says it does.

Last edited by notapplicable; 06-26-2007 at 03:03 PM.
 
Old 06-26-2007, 06:06 PM   #8
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
I just tested my site through a proxy server, and it works. Apparently, I can't access my server from anywhere inside my network unless I use the internal IP address of my computer; this is rather odd.
 
Old 06-27-2007, 02:49 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
oh right, you never tried it remotely????? ugh.

yes of course you can't reach it internally as the ip you connect to is on a different device, and a port forward only fowrard from the external side of the interface, not the inside, so you shouldn't be able to reach it ever.
 
  


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
apache bringing up router login box kola Linux - Networking 0 12-18-2004 03:31 AM
static IP, a router, getting apache working ok Lan-side flippantfig Linux - Networking 2 06-04-2004 12:02 PM
qmail acting funny maybe box owned zuessh Linux - Software 2 09-22-2003 09:49 PM
apache, port-forward and router on same box quickbeam Linux - Networking 2 05-14-2002 08:54 AM
My Suse box is acting strange, hack or just traffic? skarlet Linux - Security 3 01-17-2002 03:34 PM

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

All times are GMT -5. The time now is 08:42 AM.

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