PDA

View Full Version : Apache problem: PLZ HELP!!!!


illscience
January 8th, 2009, 18:02
I have a Apahce running on FreeBSD 7 behind a Linux router serving as my firewall. I can access the web server from inside my network but I cannot acces it from outside. My gut tells me it is a firewall issue but I strongly doubt it to be the Linux firewall because my DNS server is configured similarly and it has no problems getting data through. Does FreeBSD start it's own firewall by default and if so, does it have default rules that would prevent me from being able to access the server from the outside? My ISP does not block port 80 so that shouldn't be it.

Thanks,
Ian

DutchDaemon
January 8th, 2009, 18:07
FreeBSD has no firewall enabled by default.

illscience
January 8th, 2009, 18:13
Awww crap do you know any other reason why I can't get to my server from the outside?

DutchDaemon
January 8th, 2009, 18:17
Do you have one or two network cards (one inside, one outside)? Is Apache enabled on both interfaces if there are two?

ifconfig -a
netstat -an | grep 80

Also try a tcpdump on the external interface and listen on port 80

tcpdump -pnli <nic> port 80

See if it responds when you try to visit your webserver from the outside. If there's nothing showing up in tcpdump output, the packets are not making it in (tcpdump is in front of any local firewall, so it will always see packets destined for the interface).

SaveTheRbtz
January 8th, 2009, 18:18
Have you tried telneting on external IP?

illscience
January 8th, 2009, 18:29
yes...to port 80 with no luck

DutchDaemon
January 8th, 2009, 18:32
Are you connecting to the outside IP from the inside? This may not always be possible, especially if you're using NAT or portforwarding. Only if the external IP is actually on the Apache server will you be able to connect to it from the inside.

illscience
January 8th, 2009, 18:53
Are you connecting to the outside IP from the inside? This may not always be possible, especially if you're using NAT or portforwarding. Only if the external IP is actually on the Apache server will you be able to connect to it from the inside.


No I connect from the outside.

DutchDaemon
January 8th, 2009, 21:02
So, does tcpdump show packets to port 80 arriving on the interface? If not, the problem lies elsewhere.

illscience
January 8th, 2009, 21:05
Tcpdump does output data when I connect from the outside but when I filter only port 80 traffic it displays nothing

illscience
January 8th, 2009, 21:06
Thats why I thought the FreeBSD firewall may be dropping the packets but I have not enabled the firewall.

DutchDaemon
January 8th, 2009, 21:11
tcpdump shows all traffic to an interface, even when firewalled. If no traffic shows up on port 80, it does not arrive on the interface. Try tcpdump on your Linux router.

illscience
January 8th, 2009, 21:16
Well that only leaves the perimeter firewall but I don't understand why. It has the same NAT and Forward rules as my DNS server and it's is working fine. Arghhh frustrating!!

SaveTheRbtz
January 8th, 2009, 21:20
grep ^Listen /usr/local/etc/apache22/httpd.conf
pfctl -d
ipfw disable firewall
Post output here and then try to telnet to server again