Hi Roberto,
thanks for this reply.
I do not know much about iptables syntax and configuration.
I copied your iptables syntax and set it up.
Is there anything to set up with iptables or these four lines are all what i
need?
I ask this, because everything looks fine, iptables and ipvsadm on my LVS but
nothing happens.
Which means, it looks like ipvsadm or iptables, maybe both do not care about
the packets.
If i tried telnet from 10.1.1.1 to the VIP and i got the login from the
LVS-Director, not the login from the RealServer 10.1.5.7 as i expect.
iptables -t mangle -n -L PREROUTING is similar to yours.
ipvsadm -L -n dto.
> No, but fwmark is made for this. With your example:
>
> iptables -t mangle -A PREROUTING -s 10.1.1.1/32 -m mark --mark 1
> iptables -t mangle -A PREROUTING -s 10.1.1.3/32 -m mark --mark 1
> iptables -t mangle -A PREROUTING -s 10.10.0.2/32 -m mark --mark 1
> iptables -t mangle -A PREROUTING -s 10.1.1.2/32 -m mark --mark 2
> ipvsadm -A -f 1
> ipvsadm -A -f 2
> ipvsadm -a -f 1 -r 10.1.5.7
> ipvsadm -a -f 2 -r 10.1.5.12
>
> It will then look as follows:
> milk-net_tfxdev:~# iptables -t mangle -n -L PREROUTING
> Chain PREROUTING (policy ACCEPT)
> target prot opt source destination
> all -- 10.1.1.1 0.0.0.0/0 MARK match 0x1
> all -- 10.1.1.3 0.0.0.0/0 MARK match 0x1
> all -- 10.10.0.2 0.0.0.0/0 MARK match 0x1
> all -- 10.1.1.2 0.0.0.0/0 MARK match 0x2
> milk-net_tfxdev:~# ipvsadm -L -n
> IP Virtual Server version 1.0.6 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
> FWM 1 wlc
> -> 10.1.5.7:0 Route 1 0 0
> FWM 2 wlc
> -> 10.1.5.12:0 Route 1 0 0
> milk-net_tfxdev:~#
>
> Does this do the trick for you? Be warned however, that this setup could have
> severe impact on the functionality of a healthcheck when you don't design it
> in
> an intelligent way.
______________________________________________________________________________
Keinen passenden Spruch fur die SMS parat? Mit WEB.DE FreeMail
kein Problem mehr! http://freemail.web.de/features?mc=021149
|