* iptables, multiple hosts, one IP
@ 2007-04-07 0:43 jj
2007-04-07 8:25 ` Martijn Lievaart
0 siblings, 1 reply; 2+ messages in thread
From: jj @ 2007-04-07 0:43 UTC (permalink / raw)
To: netfilter
Hi,
I searched all over the internet, but cant find this in any forum, so
hopefully someone can help. I dont even know if iptables can help, but
hopefully it will.
I have only dedicated IP address, and I have 3 hosts (same for physical or
virtual hosts, I guess) and what I would like is:
to have each host have its own LAMP hosting its own domains, but from the
outside world, everyone should only see www.whatever.tld, without the need
to add port numbers, etc
can this be done with some form of iptables, apache redirects (via a control
panel like ispconfig, or similar)?
I have a test server running with a xen domain, hosting a couple of them,
and need to expand (currently only the dom-u is visible from outside)
it does not matter to me whether I use xen or vm or anything else, so long
as I can have one machine dictate where each request goes, e.g.:
if dedicated IP is 1.2.3.4, and hosts are
apple 192.168.0.5, hosting first.com, second.com, third.net,
pear 192.168.0.6, hosting fourth.com, fifth.net, sixth.org,
... plum 192.168.0.15 hosting tenth.com, eleventh.com, etc
the idea being that from the outside, someone would enter www.fifth.com, and
it would get to the right host. Ideally, of course, it would be nice to have
only one hosting control panel, but I dont mind having one on each host
can it be done, or must I have multiple dedicated IP's?
any help will be gratefully appreciated : )
jj
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: iptables, multiple hosts, one IP
2007-04-07 0:43 iptables, multiple hosts, one IP jj
@ 2007-04-07 8:25 ` Martijn Lievaart
0 siblings, 0 replies; 2+ messages in thread
From: Martijn Lievaart @ 2007-04-07 8:25 UTC (permalink / raw)
To: jj; +Cc: netfilter
jj wrote:
> Hi,
>
> I searched all over the internet, but cant find this in any forum, so
> hopefully someone can help. I dont even know if iptables can help, but
> hopefully it will.
>
> I have only dedicated IP address, and I have 3 hosts (same for physical or
> virtual hosts, I guess) and what I would like is:
>
> to have each host have its own LAMP hosting its own domains, but from the
> outside world, everyone should only see www.whatever.tld, without the need
> to add port numbers, etc
>
> can this be done with some form of iptables, apache redirects (via a control
> panel like ispconfig, or similar)?
>
Use apache with mod_proxy. This cannot be done with iptables, the
hostname is not in the first packet (the SYN) that iptables sees, after
that it is to late to do anything about it as you cannot suddenly rejank
the connection to another host.
> can it be done, or must I have multiple dedicated IP's?
>
For https you will need dedicated ips, for http use mod_proxy.
HTH,
M4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-07 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-07 0:43 iptables, multiple hosts, one IP jj
2007-04-07 8:25 ` Martijn Lievaart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox