Question on Apache behind a firewall + NAT

Question on Apache behind a firewall + NAT

Post by Jaco » Wed, 16 Apr 2003 01:14:08


I'm working on a project for a sys admin class and I have a (probably)
simple question. Part of my project is setting up Apache on one of the
lab machines. All lab machines are behind are connected to the rest of
the campus (and whole world) through a firewall machine and using NAT.
Students have root access to all client machines but not the the
firewall machine. My professor has added the requirement to the
project that the web pages be accessible to everyone on the WWW.

The question is, if I set up Apache on a client machine (which is
using NAT behind the firewall) is there any way to set it up such that
anyone on the WWW can access pages hosted there? From what I know it
doesn't seem possible - what IP address would someone out on the WWW
be surfing to?

Thanks a bunch,


1. Q: Apache Virtual Hosting Behind NAT Firewall RH7.1


I have just spent the last 6 hours perusing documents and posts about
virtual hosting apache behind a NAT firewall.  I still can't get it to work.
Please HELP...

The linux box is out of the box RedHat 7.1.  The box is a primary DNS for
the hosted domains as well as a www and sendmail server.

Here is my configuration:

External IP -
Internal IP -

I am not doing reverse DNS on the 10.0.0.x network.  (I have debated trying

Hosts file:    localhost    apoc



Apache's httpd.conf:


    DocumentRoot /www/

    DocumentRoot /www/

If I lynx into the box locally, everything works correctly.  If I run a
httpd -S, all the virtual hosts look correct.  But, if I try to access a
virtual host through the firewall, I get the main server default test page.
I assume this has something to do with the TCP/IP headers and the HTTP
headers.  From all the documentation, the above should work.  I am curious
if the fact that the box is a primary DNS server for these domains, is that
causing problems?  I have seen other examples using a proxypass directive,
but that doesn't seem like it should be the correct solution.  I have also
heard that some people have problems with the apache build that was shipped
with a particular distro.  Could my problem be with the distribution that
RedHat 7.1 ships with?  Do I need to rebuild apache?

Thank You for any help,
Kevin Hammond


3. Question about nat and real ips behind firewall

4. AIX and 3270

5. FreeBSD and natd - routing from behind firewall to behind firewall.

6. Display Help

7. FTP server behind linux firewall communicating w/ FTP behind linux firewall

8. Telnet Client Local Echo

9. Apache behind Proxy/Socks firewalls question

10. MSN messenger behind Firewall+NAT

11. VPN with Client behind firewall doing NAT

12. Server behind NAT firewall

13. iptables, NAT, sending mail from machines behind the firewall