blob: 541f431a9b23e3a6cdc3825cc48f0ea9552ffcbc [file] [log] [blame]
Willy Tarreau85270da2007-01-02 00:59:39 +01001#
2# test tproxy
3
4#
5# ip a a 2.0.0.1/16 dev eth0
6# ip a a 1.0.0.1/16 dev eth1
7# ip li set eth1 up
8#
9# sudo rmmod -r iptable_tproxy
10# modprobe ip_conntrack hashsize=65536
11# modprobe iptable_tproxy hashsize=65536
12
13
14# or :
15# 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
16
17
18# This is a test configuration.
19# It must load-balance across active servers. Check local apache logs to
20# verify :
21#
22# tail /var/log/apache/access_log
23
24
25global
26 maxconn 10000
27
28listen sample1
29 mode http
30 option httplog
31 option dontlognull
32 retries 1
33 redispatch
34 contimeout 5000
35 clitimeout 5000
36 srvtimeout 5000
37 maxconn 40000
38 bind 1.0.0.1:8081
39 balance roundrobin
40 server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc 1.0.0.3
41 #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client
42 #server srv1 10.0.3.2:80 cookie s0 source 127.0.0.1 usesrc clientip
43 #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client check inter 1000
44 option httpclose
45 #errorloc 503 /503
46
47listen sample1
48 mode http
49 option httplog
50 option dontlognull
51 retries 1
52 redispatch
53 contimeout 5000
54 clitimeout 5000
55 srvtimeout 5000
56 maxconn 40000
57 bind 1.0.0.1:8082
58 balance roundrobin
59 server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1
60 #server srv1 10.0.3.2:80 cookie s0 source 10.0.3.1 usesrc client check inter 1000
61 option httpclose
62 #errorloc 503 /503
63