On Tuesday 17 December 2002 20:41, Matthew S. Crocker wrote:
> On Tue, 17 Dec 2002, Leonard Soetedjo wrote:
> > Hi,
> >
> > From the HOWTO, when using fwmark, I can set the port to be 0. Is this
> > correct? Is it ok if I do that for a single port service such as telnet?
> >
> > for example
> > iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 0/0 -d VIP --dport
> > telnet -j MARK --set-mark 1
> > ipvsadm -a -f 1 -r RS1:0 -g -w 1
> >
> > Is the use of "0" not important? i.e. I can set to whatever I want?
>
> You can set it to what ever you want. For Telnet service set it to port
> 23. Setting it to port 0 means ALL ports. If you set it to 0 you'll load
> balance all inbound connections on every port into the real servers. This
> may not be what you want. If you want to send multiple ports you can
> create multiple iptables rools to mark the traffic with the same fwmark
>
> -Matt
I'm not so sure I get what you mean. Do you mean that, for telnet, even if I
have set the fwmark using iptables (let's say to 1), and added
ipvsadm -a -f 1 -r RS1:0 -g -w 1
The director would still load balance on all ports? i.e., whatever the value
of the fwmark, if the port is 0, then director will load balance on every
port. So, for example, an incoming port 80 would be load balanced too?
|