> I would use an fwmark service for that. Then, when I want the
> client to be
> directed to the service, I'd add the iptables rule, and I
> just have to remove
> it to close the pipeline. The fwmark entry could stay in the LVS
> configuration; you can even define one fwmark service per
> realserver and play
> with the mark value to redirect the connections to the needed
> realserver.
Specific period of time? Do you mean persistance?
# rule for LVS to redirect source IP addresses to different places
$IPTABLES -A INPUT -i $EXT_INT -p tcp -s $CLIENT_IP_OR_NET -d $VIP1 --dport
80 -m 1 -j ACCEPT
$IPVSADM -A -f 1 -s wlc
$IPVSADM -a -f 1 -r $REAL_SERVER1
Regards,
P
|