Re: [CentOS] redirecting when behind a firewall

2008-07-11 Thread Mikael Fridh
On Thu, Jul 10, 2008 at 12:29:18PM -0700, bruce wrote:
> 
> 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!!
> 


You wrote a really long mail so sorry if I missed some of your intentions but
here's some pseudo-code showing an example ...



DNS
===
foo.example.com. IN A 123.123.123.123
foo1.example.com. IN CNAME foo.gotdns.com
foo2.example.com. IN CNAME foo.gotdns.com


ROUTER
==
redirects all WAN traffic to internal LAN server:
WAN: 123.123.123.123 => LAN: 192.168.0.10



FRONT-END APACHE (192.168.0.10)

NameVirtualHost *:80


  ServerName foo1.example.com
  ProxyRequests Off
  
Order deny,allow
Allow from all
  

  ProxyPass / http://internal1.foo.example.com/
  ProxyPassReverse  / http://internal1.foo.example.com/



  ServerName foo2.example.com
  ProxyRequests Off
  
Order deny,allow
Allow from all
  
  ProxyPass / http://internal2.foo.example.com/
  ProxyPassReverse  / http://internal2.foo.example.com/



Now all you need is to set up internal[12].foo.example.com as either vhosts or
on physical web servers.

That's one possible solution. Others might be more complex load balancer
setups.

--
Fridh
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] redirecting when behind a firewall

2008-07-10 Thread bruce
Hi..

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

thanks

VV

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..




___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos