Hi!
"Oliver Welter" <mail@oliwel.de> írta 2008-03-08 11:55-kor:
> can anybody point out, if and how it is possible to share a single IP
> between guests?
>
> I have one IP assigned to the host box and a second one, which should
> point to the services. For maintenance reasons we want to have each
> service in a single vserver but do not wnat to assign a single IP to
> each of them.
In that case, use iptables nat rules.
eg. if you have x.y.u.v for servive ip, and 192.168.0.1 as webserver's
guest use this:
iptables -t nat -A PREROUTING -d x.y.u.v -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1
etc for other ports.
The harder case is, when you have only one ip for the services, and many
eg. webserver guests. Then you should use a reverse proxy, or zorp or sg.
which forwards the requests to the appropriate webserver, based on the http
Host: directive.
Cheers,
-- -------[ Free Software ISOs - http://www.fsn.hu/?f=download ]------- --
PÁSZTOR György e-mail: pasztor@fsn.hu
Free Software Network (FSN.HU) phone @work: +36 62 54 6666
URL: http://people.fsn.hu/~pasztor/ cell.: +3620 512 3335
Received on Sat Mar 8 11:29:59 2008