Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
1,649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. global
  2. log /dev/log local0
  3. log /dev/log local1 notice
  4. chroot /var/lib/haproxy
  5. stats socket /run/haproxy/admin.sock mode 660 level admin
  6. stats timeout 30s
  7. user haproxy
  8. group haproxy
  9. maxconn 2000
  10. daemon
  11.  
  12. tune.ssl.default-dh-param 2048
  13.  
  14. # Default SSL material locations
  15. ca-base /etc/ssl/certs
  16. crt-base /etc/ssl/private
  17.  
  18. # Default ciphers to use on SSL-enabled listening sockets.
  19. # For more information, see ciphers(1SSL). This list is from:
  20. # https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
  21. ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
  22. ssl-default-bind-options no-sslv3
  23.  
  24. defaults
  25. log global
  26. mode http
  27. option httplog
  28. option dontlognull
  29. option http-no-delay
  30. option contstats
  31. option httplog
  32. option logasap
  33. log global
  34. # Logging Setting. Local to Local Syslog and Control from There
  35. log-tag haproxy
  36.  
  37. balance source
  38. timeout connect 5000
  39. timeout client 50000
  40. timeout server 50000
  41. timeout queue 30s
  42. errorfile 400 /etc/haproxy/errors/400.http
  43. errorfile 403 /etc/haproxy/errors/403.http
  44. errorfile 408 /etc/haproxy/errors/408.http
  45. errorfile 500 /etc/haproxy/errors/500.http
  46. errorfile 502 /etc/haproxy/errors/502.http
  47. errorfile 503 /etc/haproxy/errors/503.http
  48. errorfile 504 /etc/haproxy/errors/504.http
  49. default-server inter 10s fall 3 rise 2
  50.  
  51.  
  52. frontend ft_ex01
  53. mode http
  54. maxconn 2000
  55. ## External IP or DMZ IP of Proxy Server
  56. bind 99.99.99.99:443 ssl crt /etc/letsencrypt/live/exchange.external.company.com/haproxy.pem ciphers ECDHE+aRSA+AES256+GCM+SHA384:ECDHE+aRSA+AES128+GCM+SHA256:ECDHE+aRSA+AES256+SHA384:ECDHE+aRSA+AES128+SHA256:ECDHE+aRSA+AES256+SHA:ECDHE+aRSA+AES128+SHA:AES256+GCM+SHA384:AES128+GCM+SHA256:AES128+SHA256:AES256+SHA256:DHE+aRSA+AES128+SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS
  57. # Define a List of Accepted ACLs for Future use
  58. acl all-exchange path_beg -i /autodiscover /owa /oab /ews /public /microsoft-server-activesync /rpc /ecp /mapi /favicon.ico
  59. acl root url_len 1
  60. acl mail_internal_dns hdr(host) -i exchange.internal.company.com
  61.  
  62. http-request deny unless all-exchange OR root OR mail_internal_dns
  63. http-request redirect code 301 location https://exchange.external.company.com if mail_internal_dns
  64.  
  65. # Redirect is the URL is a Single Character, which can only mean /
  66. #redirect location /owa if root
  67. # Capture the User-Agent Header, so that it is Added to the Log
  68. capture request header User-Agent len 50
  69. capture request header Content-Length len 120
  70. capture response header Content-Length len 120
  71. default_backend bk_exchange
  72.  
  73.  
  74. frontend ft_http
  75. mode http
  76. maxconn 2000
  77. bind 99.99.99.99:80 ## External IP or DMZ IP of Proxy Server
  78. acl letsencrypt path_beg -i /.well-known
  79.  
  80. acl mailbt_dns hdr(host) -i exchange.external.company.com
  81.  
  82. acl root url_len 1
  83. http-request deny unless letsencrypt OR mail_dns
  84. capture request header User-Agent len 50
  85. capture request header Content-Length len 120
  86. capture response header Content-Length len 120
  87.  
  88. http-request redirect code 301 location https://exchange.external.company.com if mail_dns !letsencrypt
  89. default_backend localh
  90.  
  91. backend bk_exchange change
  92. mode http
  93. fullconn 500
  94. ## internal connection to exchange server
  95. server exchange.internal.company.com 192.168.0.10:443 check ssl verify none
  96.  
  97. backend localh
  98. mode http
  99. fullconn 500
  100. server localhost 127.0.0.1:8081 ## Serving let's encrypt well-known. (http)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement