# # test tproxy # # ip a a 2.0.0.1/16 dev eth0 # ip a a 1.0.0.1/16 dev eth1 # ip li set eth1 up # # sudo rmmod -r iptable_tproxy # modprobe ip_conntrack hashsize=65536 # modprobe iptable_tproxy hashsize=65536 # or : # sudo insmod net/ipv4/netfilter/ip_conntrack.o hashsize=65536;sudo insmod net/ipv4/netfilter/iptable_nat.o;sudo insmod net/ipv4/netfilter/iptable_tproxy.o hashsize=65536 # This is a test configuration. # It must load-balance across active servers. Check local apache logs to # verify : # # tail /var/log/apache/access_log global maxconn 10000 listen sample1 mode http option httplog option dontlognull retries 1 redispatch contimeout 5000 clitimeout 5000 srvtimeout 5000 maxconn 40000 bind 1.0.0.1:8081 balance roundrobin server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc 1.0.0.3 #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client #server srv1 10.0.3.2:80 cookie s0 source 127.0.0.1 usesrc clientip #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client check inter 1000 option httpclose #errorloc 503 /503 listen sample1 mode http option httplog option dontlognull retries 1 redispatch contimeout 5000 clitimeout 5000 srvtimeout 5000 maxconn 40000 bind 1.0.0.1:8082 balance roundrobin server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client check inter 1000 option httpclose #errorloc 503 /503