patch-tools_stunnel_conf-sample_in 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. $OpenBSD: patch-tools_stunnel_conf-sample_in,v 1.15 2016/11/09 23:14:31 gsoares Exp $
  2. --- tools/stunnel.conf-sample.in.orig Tue Jul 5 18:27:57 2016
  3. +++ tools/stunnel.conf-sample.in Thu Nov 3 23:16:09 2016
  4. @@ -7,17 +7,18 @@
  5. ; * Global options *
  6. ; **************************************************************************
  7. +chroot = /var/stunnel/
  8. ; It is recommended to drop root privileges if stunnel is started by root
  9. -;setuid = nobody
  10. -;setgid = @DEFAULT_GROUP@
  11. +setuid = _stunnel
  12. +setgid = _stunnel
  13. ; PID file is created inside the chroot jail (if enabled)
  14. -;pid = @localstatedir@/run/stunnel.pid
  15. +pid = /stunnel.pid
  16. ; Debugging stuff (may be useful for troubleshooting)
  17. ;foreground = yes
  18. ;debug = info
  19. -;output = @localstatedir@/log/stunnel.log
  20. +;output = stunnel.log
  21. ; Enable FIPS 140-2 mode if needed for compliance
  22. ;fips = yes
  23. @@ -37,7 +38,7 @@
  24. ; * Include all configuration file fragments from the specified folder *
  25. ; **************************************************************************
  26. -;include = @sysconfdir@/stunnel/conf.d
  27. +;include = ${SYSCONFDIR}/stunnel/conf.d
  28. ; **************************************************************************
  29. ; * Service definitions (remove all services for inetd mode) *
  30. @@ -50,72 +51,72 @@
  31. ; a hardcoded path of the stunnel package, as it is not related to the
  32. ; stunnel configuration in @sysconfdir@/stunnel/.
  33. -[gmail-pop3]
  34. -client = yes
  35. -accept = 127.0.0.1:110
  36. -connect = pop.gmail.com:995
  37. -verifyChain = yes
  38. -CApath = /etc/ssl/certs
  39. -checkHost = pop.gmail.com
  40. -OCSPaia = yes
  41. +;[gmail-pop3]
  42. +;client = yes
  43. +;accept = 127.0.0.1:110
  44. +;connect = pop.gmail.com:995
  45. +;verifyChain = yes
  46. +;CApath = ${SYSCONFDIR}/ssl/certs
  47. +;checkHost = pop.gmail.com
  48. +;OCSPaia = yes
  49. -[gmail-imap]
  50. -client = yes
  51. -accept = 127.0.0.1:143
  52. -connect = imap.gmail.com:993
  53. -verifyChain = yes
  54. -CApath = /etc/ssl/certs
  55. -checkHost = imap.gmail.com
  56. -OCSPaia = yes
  57. +;[gmail-imap]
  58. +;client = yes
  59. +;accept = 127.0.0.1:143
  60. +;connect = imap.gmail.com:993
  61. +;verifyChain = yes
  62. +;CApath = ${SYSCONFDIR}/ssl/certs
  63. +;checkHost = imap.gmail.com
  64. +;OCSPaia = yes
  65. -[gmail-smtp]
  66. -client = yes
  67. -accept = 127.0.0.1:25
  68. -connect = smtp.gmail.com:465
  69. -verifyChain = yes
  70. -CApath = /etc/ssl/certs
  71. -checkHost = smtp.gmail.com
  72. -OCSPaia = yes
  73. +;[gmail-smtp]
  74. +;client = yes
  75. +;accept = 127.0.0.1:25
  76. +;connect = smtp.gmail.com:465
  77. +;verifyChain = yes
  78. +;CApath = ${SYSCONFDIR}/ssl/certs
  79. +;checkHost = smtp.gmail.com
  80. +;OCSPaia = yes
  81. ; ***************************************** Example TLS server mode services
  82. -;[pop3s]
  83. -;accept = 995
  84. -;connect = 110
  85. -;cert = @sysconfdir@/stunnel/stunnel.pem
  86. +[pop3s]
  87. +accept = 995
  88. +connect = 110
  89. +cert = ${SYSCONFDIR}/stunnel/stunnel.pem
  90. -;[imaps]
  91. -;accept = 993
  92. -;connect = 143
  93. -;cert = @sysconfdir@/stunnel/stunnel.pem
  94. +[imaps]
  95. +accept = 993
  96. +connect = 143
  97. +cert = ${SYSCONFDIR}/stunnel/stunnel.pem
  98. -;[ssmtp]
  99. -;accept = 465
  100. -;connect = 25
  101. -;cert = @sysconfdir@/stunnel/stunnel.pem
  102. +[ssmtp]
  103. +accept = 465
  104. +connect = 25
  105. +cert = ${SYSCONFDIR}/stunnel/stunnel.pem
  106. ; TLS front-end to a web server
  107. ;[https]
  108. ;accept = 443
  109. ;connect = 80
  110. -;cert = @sysconfdir@/stunnel/stunnel.pem
  111. +;cert = ${SYSCONFDIR}/stunnel/stunnel.pem
  112. ; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SChannel
  113. ; Microsoft implementations do not use TLS close-notify alert and thus they
  114. ; are vulnerable to truncation attacks
  115. ;TIMEOUTclose = 0
  116. ; Remote shell protected with PSK-authenticated TLS
  117. -; Create "@sysconfdir@/stunnel/secrets.txt" containing IDENTITY:KEY pairs
  118. +; Create "${SYSCONFDIR}/stunnel/secrets.txt" containing IDENTITY:KEY pairs
  119. ;[shell]
  120. ;accept = 1337
  121. ;exec = /bin/sh
  122. ;execArgs = sh -i
  123. ;ciphers = PSK
  124. -;PSKsecrets = @sysconfdir@/stunnel/secrets.txt
  125. +;PSKsecrets = ${SYSCONFDIR}/stunnel/secrets.txt
  126. ; Non-standard MySQL-over-TLS encapsulation connecting the Unix socket
  127. ;[mysql]
  128. -;cert = @sysconfdir@/stunnel/stunnel.pem
  129. +;cert = ${SYSCONFDIR}/stunnel/stunnel.pem
  130. ;accept = 3307
  131. ;connect = /run/mysqld/mysqld.sock