Hi all.

Due to the fact that the server template is new please can anyone help
me to understand how to use it.

I have the following setup.

```
listen unit0005
    bind *:10005 ssl crt /etc/haproxy/certs/my-domain.com.pem

    acl allow_access src IP1
    acl allow_access src IP2
    tcp-request connection reject if !allow_access

    server rasp 10.0.8.5:10005 maxconn 2 check

listen unit0006
    bind *:10006 ssl crt /etc/haproxy/certs/my-domain.com.pem

    acl allow_access src IP1
    acl allow_access src IP2
    tcp-request connection reject if !allow_access

    server rasp 10.0.8.6:10006 maxconn 2 check

listen unit0007
    bind *:10007 ssl crt /etc/haproxy/certs/my-domain.com.pem

    acl allow_access src IP1
    acl allow_access src IP2
    tcp-request connection reject if !allow_access

    server rasp 10.0.8.7:10007 maxconn 2 check

```

Can I run something like this?

```
listen units
    bind *:10000-10040 ssl crt /etc/haproxy/certs/my-domain.com.pem

    acl allow_access src IP1
    acl allow_access src IP2
    tcp-request connection reject if !allow_access

    server-template units 1-40 "10.0.8.${num}":"1000${num}" maxconn 2  check
```

Because I haven't seen that the iterator is exported maybe it's not
possible.

That's my version.

```
 4776 ?        Ss     0:00 /usr/sbin/haproxy -Ws -f
/etc/haproxy/haproxy.cfg -p /run/haproxy.pid
 4778 ?        Ss     0:00  \_ /usr/sbin/haproxy -Ws -f
/etc/haproxy/haproxy.cfg -p /run/haproxy.pid
root@app001:~# /usr/sbin/haproxy -vv
HA-Proxy version 1.8.3-1ppa1~xenial 2018/01/02
Copyright 2000-2017 Willy Tarreau <[email protected]>

Build options :
  TARGET  = linux2628
  CPU     = generic
  CC      = gcc
  CFLAGS  = -g -O2 -fPIE -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
  OPTIONS = USE_GETADDRINFO=1 USE_ZLIB=1 USE_REGPARM=1 USE_OPENSSL=1
USE_LUA=1 USE_SYSTEMD=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_NS=1

Default settings :
  maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200

Built with OpenSSL version : OpenSSL 1.0.2g  1 Mar 2016
Running on OpenSSL version : OpenSSL 1.0.2g  1 Mar 2016
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : TLSv1.0 TLSv1.1 TLSv1.2
Built with Lua version : Lua 5.3.1
Built with transparent proxy support using: IP_TRANSPARENT
IPV6_TRANSPARENT IP_FREEBIND
Encrypted password support via crypt(3): yes
Built with multi-threading support.
Built with PCRE version : 8.38 2015-11-23
Running on PCRE version : 8.41 2017-07-05
PCRE library supports JIT : yes
Built with zlib version : 1.2.8
Running on zlib version : 1.2.8
Compression algorithms supported : identity("identity"),
deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
Built with network namespace support.

Available polling systems :
      epoll : pref=300,  test result OK
       poll : pref=200,  test result OK
     select : pref=150,  test result OK
Total: 3 (3 usable), will use epoll.

Available filters :
        [SPOE] spoe
        [COMP] compression
        [TRACE] trace
```

on

```
root@app001:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
```

Thanks for help
Best regards
aleks

Reply via email to