On Thu, Jan 29, 2004 at 05:04:54PM -0500, 02fun-u2 wrote:
>
> this is what i'm looking to do at home..
> i would like to set up two servers one w/ bsd and the other w/ linux. both are
> behind firewall. all inconing connections for domain BSDXXX.com got to the bsd box.
> all requests to domain LNX.com (all .com used for example only)go to the linux box.
>
> i don't even know what to call this?
> does that m0n0wall do this?
> is there any one who whould know?
> or recomend a setup for this?
>
> maybe this would be more of an ip or dns, thing.
> or maybe a rules thing?
> "forword all udp, tcp for dns BSDXXX.com to host BSD at IP XXX.XXX.XXX"
> Routing maybe?
BSD
/
---GATEWAY
\
LINUX
If by "requests" you just mean requests to your web server, then
thing you want is name based virtual hosting in apache, which is
documented out the wazzoo in the normal places, but you're going
to have to get Apache involved either on the gateway or behind
it to forward the apache traffic around, either through
ProxyPass or something like that.
If by "requests" you mean any generic network service request, I
don't think you can get it to do that with most home network
setups.
never say never, but I think what you need is two different IP
numbers in order to pass *everything* meant for the BSD box
through to the BSD box and everything meant for the Linux box to
the Linux box. At that point, you assign each IP number to its
own ethernet device alias (you can do this in Linux, I assume so
in other free OSes) both of which are using the same physical
network connection and card connecting to your incoming service.
If you have DSL, and if you have a cooperative ISP, you can get
multiple IPs--reportedly several friends here in Ames get that
from Freese Notis--but it's the exception, rather than the rule,
and it causes its own problem.
For example at work, where getting multiple IPs is not so hard,
I've got a machine with one card but several IP numbers. One of
them is assigned to eth0, another to eth0:0, another to eth0:1
and so forth but they all use just the one card.
You'd maybe put a second card in, let's call it eth1, and put it
on your internal network (192.168.x.y) then use something like
iptables to send all traffic from, say, eth0:0 out eth1 to your
Linux box (192.168.69.69 for example) an all for eth:1 out eth1
to your BSD box (192.168.69.42) on your internal network.
you can also do port forwarding, for any given service, so that,
for instance, requests coming to your.external.ip.number:80 go
to the web server on the Linux box, but requests coming to
your.external.ip.number:8080 go to the web server on the Apache
box. You can play games like that for any service, ssh,
passive-mode ftp, whatever. But you have to use distinct port
numbers to distinguish which host the traffic is supposed to go
to internally. This kind of thing is built-in to most of the
cable/dsl routers you get for the home/SOHO market (though it
has to be set up).
--Joe