[CentOS] redirecting when behind a firewall

Thu Jul 10 19:29:18 UTC 2008
bruce <bedouglas at earthlink.net>

Hi..

I know this isn't a centos/rhel/fedora issue... but i'm hopeful that someone
might have an answer!!!

thanks

VVVVVVVVVV

Got a bit of an issue here, that I can't seem to resolve.

I have a test domain on a dynamic service (dyndns.org). the test domain is
foo.gotdns.com, which i have pointing to my external cable/dsl address.
Here's my issue, I would really like to be able to have the external user be
able to see multiple websites which might be sitting on different physical
machines/apache servers within my network.

Behind the modem, I have a firewall which is set up to port-forward the
traffic to a machine with my network. So, for my example, the machine is dog
(192.168.1.52), and the "foo.gotdns.com" would point to the app on the
machine, based on the vhost setup in the dog httpd.conf file.

However, I would also like to have multiple external test sites/domains,
each of which might point back to sites on different internal servers. The
forwarding capability of the router only allows for all wan * (addresses) to
be forwarded to a given internal machine. At the same time, the
external/internal ports have to match.

So i don't have the ability to do something like "forward foo.gotdns.com to
machine1, and forward foo2.gotdns.com to machine2" which is exactly what i'm
trying to accomplish!!

I've been looking into using vhosts, and the redirect functionaility, but I
can't seem to get it to work, using the external domain name.

So. i'm trying to:
 -be able to access multiple test sites, on multiple servers
  from a browser external to my network
 -be able to access the same sites, from inside my network, using
  the local/internal namespace
 -be able to access the same sites, from inside my network, using
  the external namespace (testing purposes)

I've looked high/low for how to accomplish this with no real luck.

thanks

ps. I've seen others who've been looking for similar solutions, so this
would definitely help.

ps. I'm able to do a redirect from one server to another, if I restrict to
using internal addresses. Just can't get the external stuff to work..