From: Lloyd Brown <somewhere_or_other@xxxxxxx>
Reply-To: "LinuxVirtualServer.org users mailing list."
<lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
To: "LinuxVirtualServer.org users mailing list."
<lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Using LVS to forward HTTP from port 80 to servers running on
port 81
Date: Thu, 13 Jul 2006 15:33:00 -0600
I think you can just specify the source and destination ports when you
add the services; iptables isn't really necessary. So, basically in the
man page for ipvsadm, where it says "service-address", you'd put your
external hostname/IP address followed by a port, something like this:
external-server:80
Similarly, when you specify the "server-address" (meaning the
realserver), you just append a ":81" to the hostname or IP.
So, to associate "server1" on port 81 as a realserver under "external"
on port 80, using LVS-NAT with a weight of 1, you'd try something like
this (someone should check my syntax here):
"ipvsadm -a -t external:80 -r server1:81 -m -w 1"
I'm not sure if this will be helpful, but we use ldirectord at my work,
and so your configuration would be something like this, in this
situation (assuming LVS-NAT & weight of 1 again):
...
virtual=external:80
real=server1:81 masq 1
real=server2:81 masq 1
real=server3:81 masq 1
... (etc)
Hope this helps,
Lloyd Brown
Travis Melhiser wrote:
> I'm pretty new to LVS and can't seem to find the right configuration or
> the right documentation to get my environment set up.
>
> I would like to have requests come to the LVS server on port 80 an then
> have the LVS server forward these requests to the machines in the
> cluster running the web servers on port 81.
>
> Does anyone have an example of how to set this up?
>
> Thanks in advance,
>
> -T
>
> _________________________________________________________________
> Don?t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>
>
>