turnserver.conf 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. # Coturn TURN SERVER configuration file
  2. #
  3. # Boolean values note: where a boolean value is supposed to be used,
  4. # you can use '0', 'off', 'no', 'false', or 'f' as 'false',
  5. # and you can use '1', 'on', 'yes', 'true', or 't' as 'true'
  6. # If the value is missing, then it means 'true' by default.
  7. #
  8. # Listener interface device (optional, Linux only).
  9. # NOT RECOMMENDED.
  10. #
  11. #listening-device=eth0
  12. # TURN listener port for UDP and TCP (Default: 3478).
  13. # Note: actually, TLS & DTLS sessions can connect to the
  14. # "plain" TCP & UDP port(s), too - if allowed by configuration.
  15. #
  16. #listening-port=3478
  17. # TURN listener port for TLS (Default: 5349).
  18. # Note: actually, "plain" TCP & UDP sessions can connect to the TLS & DTLS
  19. # port(s), too - if allowed by configuration. The TURN server
  20. # "automatically" recognizes the type of traffic. Actually, two listening
  21. # endpoints (the "plain" one and the "tls" one) are equivalent in terms of
  22. # functionality; but Coturn keeps both endpoints to satisfy the RFC 5766 specs.
  23. # For secure TCP connections, Coturn currently supports TLS version 1.2.
  24. # TLS 1.0 and TLS 1.1 are deprecated and need to be explicitly enabled.
  25. # For secure UDP connections, Coturn supports DTLS version 1.
  26. #
  27. #tls-listening-port=5349
  28. # Alternative listening port for UDP and TCP listeners;
  29. # default (or zero) value means "listening port plus one".
  30. # This is needed for RFC 5780 support
  31. # (STUN extension specs, NAT behavior discovery). The TURN Server
  32. # supports RFC 5780 only if it is started with more than one
  33. # listening IP address of the same family (IPv4 or IPv6).
  34. # RFC 5780 is supported only by UDP protocol, other protocols
  35. # are listening to that endpoint only for "symmetry".
  36. #
  37. #alt-listening-port=0
  38. # Alternative listening port for TLS and DTLS protocols.
  39. # Default (or zero) value means "TLS listening port plus one".
  40. #
  41. #alt-tls-listening-port=0
  42. # Some network setups will require using a TCP reverse proxy in front
  43. # of the STUN server. If the proxy port option is set a single listener
  44. # is started on the given port that accepts connections using the
  45. # haproxy proxy protocol v2.
  46. # (https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)
  47. #
  48. #tcp-proxy-port=5555
  49. # Listener IP address of relay server. Multiple listeners can be specified.
  50. # If no IP is specified in the config file or in the command line options,
  51. # then all IPv4 system IPs will be used for listening.
  52. #listening-ip=
  53. #
  54. # If you specify '::' as IP, then all IPv6 system IPs will be used for
  55. # listening.
  56. #listening-ip=::
  57. #
  58. # If you want to listen on all IPv4 as well as on all IPv6, you can do
  59. #listening-ip=
  60. #listening-ip=::
  61. # or
  62. #listening-ip=0.0.0.0
  63. #listening-ip=::
  64. #
  65. # to specify just some IPs you prefer:
  66. #listening-ip=172.17.19.101
  67. #listening-ip=10.207.21.238
  68. #listening-ip=2607:f0d0:1002:51::4
  69. # Auxiliary STUN/TURN server listening endpoint.
  70. # Aux servers have almost full TURN and STUN functionality.
  71. # The (minor) limitations are:
  72. #
  73. # 1) Auxiliary servers do not have alternative ports and
  74. # they do not support STUN RFC 5780 functionality (CHANGE REQUEST).
  75. #
  76. # 2) Auxiliary servers also are never returning ALTERNATIVE-SERVER reply.
  77. #
  78. # Valid formats are 1.2.3.4:5555 for IPv4 and [1:2::3:4]:5555 for IPv6.
  79. #
  80. # There may be multiple aux-server options, each will be used for listening
  81. # to client requests.
  82. #
  83. #aux-server=172.17.19.110:33478
  84. #aux-server=[2607:f0d0:1002:51::4]:33478
  85. # (recommended for older Linuxes only)
  86. # Automatically balance UDP traffic over auxiliary servers (if configured).
  87. # The load balancing is using the ALTERNATE-SERVER mechanism.
  88. # The TURN client must support 300 ALTERNATE-SERVER response for this
  89. # functionality.
  90. #
  91. #udp-self-balance
  92. # Relay interface device for relay sockets (optional, Linux only).
  93. # NOT RECOMMENDED.
  94. #
  95. #relay-device=eth1
  96. # Relay address (the local IP address that will be used to relay the
  97. # packets to the peer).
  98. # Multiple relay addresses may be used.
  99. # The same IP(s) can be used as both listening IP(s) and relay IP(s).
  100. #
  101. # If no relay IP(s) specified, then the turnserver will apply the default
  102. # policy: it will decide itself which relay addresses to be used, and it
  103. # will always be using the client socket IP address as the relay IP address
  104. # of the TURN session (if the requested relay address family is the same
  105. # as the family of the client socket).
  106. #
  107. #relay-ip=172.17.19.105
  108. #relay-ip=2607:f0d0:1002:51::5
  109. # For Amazon EC2 users:
  110. #
  111. # TURN Server public/private address mapping, if the server is behind NAT.
  112. # In that situation, if a -X is used in form "-X <ip>" then that ip will be reported
  113. # as relay IP address of all allocations. This scenario works only in a simple case
  114. # when one single relay address is be used, and no RFC5780 functionality is required.
  115. # That single relay address must be mapped by NAT to the 'external' IP.
  116. # The "external-ip" value, if not empty, is returned in XOR-RELAYED-ADDRESS field.
  117. # For that 'external' IP, NAT must forward ports directly (relayed port 12345
  118. # must be always mapped to the same 'external' port 12345).
  119. #
  120. # In more complex case when more than one IP address is involved,
  121. # that option must be used several times, each entry must
  122. # have form "-X <public-ip/private-ip>", to map all involved addresses.
  123. # RFC5780 NAT discovery STUN functionality will work correctly,
  124. # if the addresses are mapped properly, even when the TURN server itself
  125. # is behind A NAT.
  126. #
  127. # By default, this value is empty, and no address mapping is used.
  128. #
  129. #external-ip=60.70.80.91
  130. #
  131. #OR:
  132. #
  133. #external-ip=60.70.80.91/172.17.19.101
  134. #external-ip=60.70.80.92/172.17.19.102
  135. # Number of the relay threads to handle the established connections
  136. # (in addition to authentication thread and the listener thread).
  137. # If explicitly set to 0 then application runs relay process in a
  138. # single thread, in the same thread with the listener process
  139. # (the authentication thread will still be a separate thread).
  140. #
  141. # If this parameter is not set, then the default OS-dependent
  142. # thread pattern algorithm will be employed. Usually the default
  143. # algorithm is optimal, so you have to change this option
  144. # if you want to make some fine tweaks.
  145. #
  146. # In the older systems (Linux kernel before 3.9),
  147. # the number of UDP threads is always one thread per network listening
  148. # endpoint - including the auxiliary endpoints - unless 0 (zero) or
  149. # 1 (one) value is set.
  150. #
  151. #relay-threads=0
  152. # Override system CPU count detection. Use this number instead of the
  153. # auto-detected CPU count. Useful in virtualized/containerized environments
  154. # where the system reports the host CPU count instead of the allocated
  155. # container CPUs. This affects the default number of relay threads when
  156. # relay-threads is not explicitly specified.
  157. #
  158. #cpus=2
  159. # Lower and upper bounds of the UDP relay endpoints:
  160. # (default values are 49152 and 65535)
  161. #
  162. #min-port=49152
  163. #max-port=65535
  164. # Socket buffer size (in bytes).
  165. # (default value is 2097152 which is 2MB)
  166. #
  167. #sock-buf-size=2097152
  168. # Uncomment to run TURN server in 'normal' 'moderate' verbose mode.
  169. # By default the verbose mode is off.
  170. #verbose
  171. # Uncomment to run TURN server in 'extra' verbose mode.
  172. # This mode is very annoying and produces lots of output.
  173. # Not recommended under normal circumstances.
  174. #
  175. #Verbose
  176. # Uncomment to use fingerprints in the TURN messages.
  177. # By default the fingerprints are off.
  178. #
  179. #fingerprint
  180. # Uncomment to use long-term credential mechanism.
  181. # By default no credentials mechanism is used (any user allowed).
  182. #
  183. #lt-cred-mech
  184. # This option is the opposite of lt-cred-mech.
  185. # (TURN Server with no-auth option allows anonymous access).
  186. # If neither option is defined, and no users are defined,
  187. # then no-auth is default. If at least one user is defined,
  188. # in this file, in command line or in usersdb file, then
  189. # lt-cred-mech is default.
  190. #
  191. #no-auth
  192. # Enable prometheus exporter
  193. # If enabled the turnserver will expose an endpoint with stats on a prometheus format
  194. # this endpoint is listening on a different port to not conflict with other configurations.
  195. #
  196. # You can simply run the turnserver and access the port 9641 and path /metrics
  197. #
  198. # This is currently unavailable on apt installations
  199. #
  200. # For more info on the prometheus exporter and metrics
  201. # https://prometheus.io/docs/introduction/overview/
  202. # https://prometheus.io/docs/concepts/data_model/
  203. #
  204. #prometheus
  205. # Enable labeling prometheus traffic metrics with client usernames.
  206. # Labeling with client usernames is disabled by default, because this may cause memory
  207. # leaks when using authentication with ephemeral usernames (e.g. TURN REST API).
  208. #
  209. #prometheus-username-labels
  210. # Prometheus listener port (Default: 9641).
  211. #
  212. #prometheus-port=9641
  213. # TURN REST API flag.
  214. # (Time Limited Long Term Credential)
  215. # Flag that sets a special authorization option that is based upon authentication secret.
  216. #
  217. # This feature's purpose is to support "TURN Server REST API", see
  218. # "TURN REST API" link in the project's page
  219. # https://github.com/coturn/coturn/
  220. #
  221. # This option is used with timestamp:
  222. #
  223. # usercombo -> "timestamp:userid"
  224. # turn user -> usercombo
  225. # turn password -> base64(hmac(secret key, usercombo))
  226. #
  227. # This allows TURN credentials to be accounted for a specific user id.
  228. # If you don't have a suitable id, then the timestamp alone can be used.
  229. # This option is enabled by turning on secret-based authentication.
  230. # The actual value of the secret is defined either by the option static-auth-secret,
  231. # or can be found in the turn_secret table in the database (see below).
  232. #
  233. # Read more about it:
  234. # - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
  235. # - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf
  236. #
  237. # Be aware that use-auth-secret overrides some parts of lt-cred-mech.
  238. # The use-auth-secret feature depends internally on lt-cred-mech, so if you set
  239. # this option then it automatically enables lt-cred-mech internally
  240. # as if you had enabled both.
  241. #
  242. # Note that you can use only one auth mechanism at the same time! This is because,
  243. # both mechanisms conduct username and password validation in different ways.
  244. #
  245. # Use either lt-cred-mech or use-auth-secret in the conf
  246. # to avoid any confusion.
  247. #
  248. #use-auth-secret
  249. # 'Static' authentication secret value (a string) for TURN REST API only.
  250. # If not set, then the turn server
  251. # will try to use the 'dynamic' value in the turn_secret table
  252. # in the user database (if present). The database-stored value can be changed on-the-fly
  253. # by a separate program, so this is why that mode is considered 'dynamic'.
  254. #
  255. #static-auth-secret=north
  256. # Server name used for
  257. # the oAuth authentication purposes.
  258. # The default value is the realm name.
  259. #
  260. #server-name=blackdow.carleon.gov
  261. # Flag that allows oAuth authentication.
  262. #
  263. #oauth
  264. # 'Static' user accounts for the long term credentials mechanism, only.
  265. # This option cannot be used with TURN REST API.
  266. # 'Static' user accounts are NOT dynamically checked by the turnserver process,
  267. # so they can NOT be changed while the turnserver is running.
  268. #
  269. #user=username1:key1
  270. #user=username2:key2
  271. # OR:
  272. #user=username1:password1
  273. #user=username2:password2
  274. #
  275. # Keys must be generated by turnadmin utility. The key value depends
  276. # on user name, realm, and password:
  277. #
  278. # Example:
  279. # $ turnadmin -k -u ninefingers -r north.gov -p youhavetoberealistic
  280. # Output: 0xbc807ee29df3c9ffa736523fb2c4e8ee
  281. # ('0x' in the beginning of the key is what differentiates the key from
  282. # password. If it has 0x then it is a key, otherwise it is a password).
  283. #
  284. # The corresponding user account entry in the config file will be:
  285. #
  286. #user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee
  287. # Or, equivalently, with open clear password (less secure):
  288. #user=ninefingers:youhavetoberealistic
  289. #
  290. # SQLite database file name.
  291. #
  292. # The default file name is /var/db/turndb or /usr/local/var/db/turndb or
  293. # /var/lib/turn/turndb.
  294. #
  295. #userdb=/var/db/turndb
  296. # PostgreSQL database connection string in the case that you are using PostgreSQL
  297. # as the user database.
  298. # This database can be used for the long-term credential mechanism
  299. # and it can store the secret value for secret-based timed authentication in TURN REST API.
  300. # See http://www.postgresql.org/docs/8.4/static/libpq-connect.html for 8.x PostgreSQL
  301. # versions connection string format, see
  302. # http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING
  303. # for 9.x and newer connection string formats.
  304. #
  305. #psql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> connect_timeout=30"
  306. # MySQL database connection string in the case that you are using MySQL
  307. # as the user database.
  308. # This database can be used for the long-term credential mechanism
  309. # and it can store the secret value for secret-based timed authentication in TURN REST API.
  310. #
  311. # Optional connection string parameters for the secure communications (TLS):
  312. # ca, capath, cert, key, cipher
  313. # (see http://dev.mysql.com/doc/refman/5.1/en/ssl-options.html for the
  314. # command options description).
  315. #
  316. # Use the string format below (space separated parameters, all optional):
  317. #
  318. #mysql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> port=<port> connect_timeout=<seconds> read_timeout=<seconds>"
  319. # If you want to use an encrypted password in the MySQL connection string,
  320. # then set the MySQL password encryption secret key file with this option.
  321. #
  322. # Warning: If this option is set, then the mysql password must be set in "mysql-userdb" in an encrypted format!
  323. # If you want to use a cleartext password then do not set this option!
  324. #
  325. # This is the file path for the aes encrypted secret key used for password encryption.
  326. #
  327. #secret-key-file=/path/
  328. # MongoDB database connection string in the case that you are using MongoDB
  329. # as the user database.
  330. # This database can be used for long-term credential mechanism
  331. # and it can store the secret value for secret-based timed authentication in TURN REST API.
  332. # Use the string format described at http://hergert.me/docs/mongo-c-driver/mongoc_uri.html
  333. #
  334. #mongo-userdb="mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]"
  335. # Redis database connection string in the case that you are using Redis
  336. # as the user database.
  337. # This database can be used for long-term credential mechanism
  338. # and it can store the secret value for secret-based timed authentication in TURN REST API.
  339. # Use the string format below (space separated parameters, all optional):
  340. #
  341. #redis-userdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
  342. # Redis status and statistics database connection string, if used (default - empty, no Redis stats DB used).
  343. # This database keeps allocations status information, and it can be also used for publishing
  344. # and delivering traffic and allocation event notifications.
  345. # The connection string has the same parameters as redis-userdb connection string.
  346. # Use the string format below (space separated parameters, all optional):
  347. #
  348. #redis-statsdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
  349. # The default realm to be used for the users when no explicit
  350. # origin/realm relationship is found in the database, or if the TURN
  351. # server is not using any database (just the commands-line settings
  352. # and the userdb file). Must be used with long-term credentials
  353. # mechanism or with TURN REST API.
  354. #
  355. # Note: If the default realm is not specified, then realm falls back to the host domain name.
  356. # If the domain name string is empty, or set to '(None)', then it is initialized as an empty string.
  357. #
  358. #realm=mycompany.org
  359. # This flag sets the origin consistency
  360. # check. Across the session, all requests must have the same
  361. # main ORIGIN attribute value (if the ORIGIN was
  362. # initially used by the session).
  363. #
  364. #check-origin-consistency
  365. # Per-user allocation quota.
  366. # default value is 0 (no quota, unlimited number of sessions per user).
  367. # This option can also be set through the database, for a particular realm.
  368. #
  369. #user-quota=0
  370. # Total allocation quota.
  371. # default value is 0 (no quota).
  372. # This option can also be set through the database, for a particular realm.
  373. #
  374. #total-quota=0
  375. # Max bytes-per-second bandwidth a TURN session is allowed to handle
  376. # (input and output network streams are treated separately). Anything above
  377. # that limit will be dropped or temporarily suppressed (within
  378. # the available buffer limits).
  379. # This option can also be set through the database, for a particular realm.
  380. #
  381. #max-bps=0
  382. #
  383. # Maximum server capacity.
  384. # Total bytes-per-second bandwidth the TURN server is allowed to allocate
  385. # for the sessions, combined (input and output network streams are treated separately).
  386. #
  387. #bps-capacity=0
  388. # Uncomment if no UDP client listener is desired.
  389. # By default UDP client listener is always started.
  390. #
  391. #no-udp
  392. # Uncomment if no TCP client listener is desired.
  393. # By default TCP client listener is always started.
  394. #
  395. #no-tcp
  396. # Uncomment if no TLS client listener is desired.
  397. # By default TLS client listener is always started.
  398. #
  399. #no-tls
  400. # Uncomment if no DTLS client listener is desired.
  401. # By default DTLS client listener is always started.
  402. #
  403. #no-dtls
  404. # Uncomment if no UDP relay endpoints are allowed.
  405. # By default UDP relay endpoints are enabled (like in RFC 5766).
  406. #
  407. #no-udp-relay
  408. # Uncomment if no TCP relay endpoints are allowed.
  409. # By default TCP relay endpoints are enabled (like in RFC 6062).
  410. #
  411. #no-tcp-relay
  412. # Uncomment if extra security is desired,
  413. # with nonce value having a limited lifetime.
  414. # The nonce value is unique for a session.
  415. # Set this option to limit the nonce lifetime.
  416. # Set it to 0 for unlimited lifetime.
  417. # It defaults to 600 secs (10 min) if no value is provided. After that delay,
  418. # the client will get 438 error and will have to re-authenticate itself.
  419. #
  420. #stale-nonce=600
  421. # Uncomment if you want to set the maximum allocation
  422. # time before it has to be refreshed.
  423. # Default is 3600s.
  424. #
  425. #max-allocate-lifetime=3600
  426. # Uncomment to set the lifetime for the channel.
  427. # Default value is 600 secs (10 minutes).
  428. # This value MUST not be changed for production purposes.
  429. #
  430. #channel-lifetime=600
  431. # Uncomment to set the permission lifetime.
  432. # Default to 300 secs (5 minutes).
  433. # In production this value MUST not be changed,
  434. # however it can be useful for test purposes.
  435. #
  436. #permission-lifetime=300
  437. # Certificate file.
  438. # Use an absolute path or path relative to the
  439. # configuration file.
  440. # Use PEM file format.
  441. #
  442. #cert=/usr/local/etc/turn_server_cert.pem
  443. # Private key file.
  444. # Use an absolute path or path relative to the
  445. # configuration file.
  446. # Use PEM file format.
  447. #
  448. #pkey=/usr/local/etc/turn_server_pkey.pem
  449. # Raw public keys support.
  450. # On/off switch for RFC-7250 aka raw public keys.
  451. # Keep in mind, in order for rpks to work,
  452. # coturn must be built against openSSL version at least 3.2.1
  453. #
  454. #raw-public-keys
  455. # Private key file password, if it is in encoded format.
  456. # This option has no default value.
  457. #
  458. #pkey-pwd=...
  459. # Allowed OpenSSL cipher list for TLS/DTLS connections.
  460. # Default value is "DEFAULT".
  461. #
  462. #cipher-list="DEFAULT"
  463. # CA file in OpenSSL format.
  464. # Forces TURN server to verify the client SSL certificates.
  465. # By default this is not set: there is no default value and the client
  466. # certificate is not checked.
  467. #
  468. # Example:
  469. #CA-file=/etc/ssh/id_rsa.cert
  470. # Curve name for EC ciphers, if supported by OpenSSL
  471. # library (TLS and DTLS). The default value is prime256v1,
  472. # if pre-OpenSSL 1.0.2 is used. With OpenSSL 1.0.2+,
  473. # an optimal curve will be automatically calculated, if not defined
  474. # by this option.
  475. #
  476. #ec-curve-name=prime256v1
  477. # Use 566 bits predefined DH TLS key. Default size of the key is 2066.
  478. #
  479. #dh566
  480. # Use 1066 bits predefined DH TLS key. Default size of the key is 2066.
  481. #
  482. #dh1066
  483. # Use custom DH TLS key, stored in PEM format in the file.
  484. # Flags --dh566 and --dh1066 are ignored when the DH key is taken from a file.
  485. #
  486. #dh-file=<DH-PEM-file-name>
  487. # Flag to prevent stdout log messages.
  488. # By default, all log messages go to both stdout and to
  489. # the configured log file. With this option everything will
  490. # go to the configured log only (unless the log file itself is stdout).
  491. #
  492. #no-stdout-log
  493. # Option to set the log file name.
  494. # By default, the turnserver tries to open a log file in
  495. # /var/log, /var/tmp, /tmp and the current directory
  496. # (Whichever file open operation succeeds first will be used).
  497. # With this option you can set the definite log file name.
  498. # The special names are "stdout" and "-" - they will force everything
  499. # to the stdout. Also, the "syslog" name will force everything to
  500. # the system log (syslog).
  501. # In the runtime, the logfile can be reset with the SIGHUP signal
  502. # to the turnserver process.
  503. #
  504. #log-file=/var/tmp/turn.log
  505. # Option to redirect all log output into system log (syslog).
  506. #
  507. #syslog
  508. # Set syslog facility for syslog messages
  509. # Default values is ''.
  510. #
  511. #syslog-facility="LOG_LOCAL1"
  512. # This flag means that no log file rollover will be used, and the log file
  513. # name will be constructed as-is, without PID and date appendage.
  514. # This option can be used, for example, together with the logrotate tool.
  515. #
  516. #simple-log
  517. # Enable full ISO-8601 timestamp in all logs.
  518. #new-log-timestamp
  519. # Set timestamp format (in strftime(1) format). Depends on new-log-timestamp to be enabled.
  520. #new-log-timestamp-format "%FT%T%z"
  521. # Disabled by default binding logging in verbose log mode to avoid DoS attacks.
  522. # Enable binding logging and UDP endpoint logs in verbose log mode.
  523. #log-binding
  524. # Option to set the "redirection" mode. The value of this option
  525. # will be the address of the alternate server for UDP & TCP service in the form of
  526. # <ip>[:<port>]. The server will send this value in the attribute
  527. # ALTERNATE-SERVER, with error 300, on ALLOCATE request, to the client.
  528. # Client will receive only values with the same address family
  529. # as the client network endpoint address family.
  530. # See RFC 5389 and RFC 5766 for the description of ALTERNATE-SERVER functionality.
  531. # The client must use the obtained value for subsequent TURN communications.
  532. # If more than one --alternate-server option is provided, then the functionality
  533. # can be more accurately described as "load-balancing" than a mere "redirection".
  534. # If the port number is omitted, then the default port
  535. # number 3478 for the UDP/TCP protocols will be used.
  536. # Colon (:) characters in IPv6 addresses may conflict with the syntax of
  537. # the option. To alleviate this conflict, literal IPv6 addresses are enclosed
  538. # in square brackets in such resource identifiers, for example:
  539. # [2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478 .
  540. # Multiple alternate servers can be set. They will be used in the
  541. # round-robin manner. All servers in the pool are considered of equal weight and
  542. # the load will be distributed equally. For example, if you have 4 alternate servers,
  543. # then each server will receive 25% of ALLOCATE requests. A alternate TURN server
  544. # address can be used more than one time with the alternate-server option, so this
  545. # can emulate "weighting" of the servers.
  546. #
  547. # Examples:
  548. #alternate-server=1.2.3.4:5678
  549. #alternate-server=11.22.33.44:56789
  550. #alternate-server=5.6.7.8
  551. #alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
  552. # Option to set alternative server for TLS & DTLS services in form of
  553. # <ip>:<port>. If the port number is omitted, then the default port
  554. # number 5349 for the TLS/DTLS protocols will be used. See the previous
  555. # option for the functionality description.
  556. #
  557. # Examples:
  558. #tls-alternate-server=1.2.3.4:5678
  559. #tls-alternate-server=11.22.33.44:56789
  560. #tls-alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
  561. # Option to suppress TURN functionality, only STUN requests will be processed.
  562. # Run as STUN server only, all TURN requests will be ignored.
  563. # By default, this option is NOT set.
  564. #
  565. #stun-only
  566. # Option to hide software version. Enhance security when used in production.
  567. # Revealing the specific software version of the agent through the
  568. # SOFTWARE attribute might allow them to become more vulnerable to
  569. # attacks against software that is known to contain security holes.
  570. # Implementers SHOULD make usage of the SOFTWARE attribute a
  571. # configurable option (https://tools.ietf.org/html/rfc5389#section-16.1.2)
  572. #
  573. #no-software-attribute
  574. # Option to suppress STUN functionality, only TURN requests will be processed.
  575. # Run as TURN server only, all STUN requests will be ignored.
  576. # By default, this option is NOT set.
  577. #
  578. #no-stun
  579. # This is the timestamp/username separator symbol (character) in TURN REST API.
  580. # The default value is ':'.
  581. #
  582. #rest-api-separator=:
  583. # Flag that can be used to allow peers on the loopback addresses (127.x.x.x and ::1).
  584. # This is an extra security measure.
  585. #
  586. # (To avoid any security issue that allowing loopback access may raise,
  587. # the no-loopback-peers option is replaced by allow-loopback-peers.)
  588. #
  589. # Allow it only for testing in a development environment!
  590. # In production it adds a possible security vulnerability, so for security reasons
  591. # it is not allowed using it together with empty cli-password.
  592. #
  593. #allow-loopback-peers
  594. # Flag that can be used to disallow peers on well-known broadcast addresses (224.0.0.0 and above, and FFXX:*).
  595. # This is an extra security measure.
  596. #
  597. #no-multicast-peers
  598. # Option to set the max time, in seconds, allowed for full allocation establishment.
  599. # Default is 60 seconds.
  600. #
  601. #max-allocate-timeout=60
  602. # Option to allow or ban specific ip addresses or ranges of ip addresses.
  603. # If an ip address is specified as both allowed and denied, then the ip address is
  604. # considered to be allowed. This is useful when you wish to ban a range of ip
  605. # addresses, except for a few specific ips within that range.
  606. #
  607. # This can be used when you do not want users of the turn server to be able to access
  608. # machines reachable by the turn server, but would otherwise be unreachable from the
  609. # internet (e.g. when the turn server is sitting behind a NAT)
  610. #
  611. # Examples:
  612. # denied-peer-ip=83.166.64.0-83.166.95.255
  613. # allowed-peer-ip=83.166.68.45
  614. # File name to store the pid of the process.
  615. # Default is /var/run/turnserver.pid (if superuser account is used) or
  616. # /var/tmp/turnserver.pid .
  617. #
  618. #pidfile="/var/run/turnserver.pid"
  619. # Require authentication of the STUN Binding request.
  620. # By default, the clients are allowed anonymous access to the STUN Binding functionality.
  621. #
  622. #secure-stun
  623. # Mobility with ICE (MICE) specs support.
  624. #
  625. #mobility
  626. # Allocate Address Family according (DEPRECATED and will be removed in favor of allocation-default-address-family)
  627. # If enabled then TURN server allocates address family according the TURN
  628. # Client <=> Server communication address family.
  629. # (By default Coturn works according RFC 6156.)
  630. # !!Warning: Enabling this option breaks RFC6156 section-4.2 (violates use default IPv4)!!
  631. #
  632. #keep-address-family
  633. # TURN server allocates address family according TURN client requested address family.
  634. # If address family not requested explicitly by the client, then it falls back to this default.
  635. # The standard RFC explicitly define that this default must be IPv4,
  636. # so use other option values with care!
  637. # Possible values: "ipv4" or "ipv6" or "keep"
  638. # "keep" sets the allocation default address family according to
  639. # the TURN client allocation request connection address family.
  640. #
  641. #allocation-default-address-family="ipv4"
  642. # User name to run the process. After the initialization, the turnserver process
  643. # will attempt to change the current user ID to that user.
  644. #
  645. #proc-user=<user-name>
  646. # Group name to run the process. After the initialization, the turnserver process
  647. # will attempt to change the current group ID to that group.
  648. #
  649. #proc-group=<group-name>
  650. # Turn OFF the CLI support.
  651. # By default it is always ON.
  652. # See also options cli-ip and cli-port.
  653. #
  654. #no-cli
  655. #Local system IP address to be used for CLI server endpoint. Default value
  656. # is 127.0.0.1.
  657. #
  658. #cli-ip=127.0.0.1
  659. # CLI server port. Default is 5766.
  660. #
  661. #cli-port=5766
  662. # CLI access password. Default is empty (no password).
  663. # For the security reasons, it is recommended that you use the encrypted
  664. # form of the password (see the -P command in the turnadmin utility).
  665. #
  666. # Secure form for password 'qwerty':
  667. #
  668. #cli-password=$5$79a316b350311570$81df9cfb9af7f5e5a76eada31e7097b663a0670f99a3c07ded3f1c8e59c5658a
  669. #
  670. # Or unsecure form for the same password:
  671. #
  672. #cli-password=qwerty
  673. # Enable Web-admin support on https. By default it is Disabled.
  674. # If it is enabled it also enables a http a simple static banner page
  675. # with a small reminder that the admin page is available only on https.
  676. # Not supported if no-tls option used
  677. #
  678. #web-admin
  679. # Local system IP address to be used for Web-admin server endpoint. Default value is 127.0.0.1.
  680. #
  681. #web-admin-ip=127.0.0.1
  682. # Web-admin server port. Default is 8080.
  683. #
  684. #web-admin-port=8080
  685. # Web-admin server listen on STUN/TURN worker threads
  686. # By default it is disabled for security reasons! (Not recommended in any production environment!)
  687. #
  688. #web-admin-listen-on-workers
  689. # Redirect ACME, i.e. HTTP GET requests matching '^/.well-known/acme-challenge/(.*)' to '<URL>$1'.
  690. # Default is '', i.e. no special handling for such requests.
  691. #
  692. #acme-redirect=http://redirectserver/.well-known/acme-challenge/
  693. # Server relay. NON-STANDARD AND DANGEROUS OPTION.
  694. # Only for those applications when you want to run
  695. # server applications on the relay endpoints.
  696. # This option eliminates the IP permissions check on
  697. # the packets incoming to the relay endpoints.
  698. #
  699. #server-relay
  700. # Maximum number of output sessions in ps CLI command.
  701. # This value can be changed on-the-fly in CLI. The default value is 256.
  702. #
  703. #cli-max-output-sessions
  704. # Set network engine type for the process (for internal purposes).
  705. #
  706. #ne=[1|2|3]
  707. # Do not allow an TLS/DTLS version of protocol
  708. #
  709. #no-tlsv1_2
  710. # Enable RFC5780 (NAT behavior discovery).
  711. #
  712. # This option is disabled by default.
  713. # Originally, if there are more than one listener address from the same
  714. # address family, then by default the NAT behavior discovery feature enabled.
  715. # This option disables the original behavior, because the NAT behavior
  716. # discovery adds extra attributes to response, and this increase the
  717. # possibility of an amplification attack.
  718. #
  719. # Strongly encouraged to keep this option off to decrease gain factor in STUN
  720. # binding responses.
  721. #
  722. # rfc5780
  723. # Enable handling old STUN Binding requests and disable MAPPED-ADDRESS
  724. # attribute in binding response (use only the XOR-MAPPED-ADDRESS).
  725. #
  726. # Strongly encouraged to keep this option off to decrease gain factor in STUN
  727. # binding responses.
  728. #
  729. # stun-backward-compatibility
  730. # Return an HTTP/S response when an HTTP/S connection is made to a TCP port
  731. # otherwise only supporting STUN/TURN. This may be useful for debugging and
  732. # diagnosing connection problems. A "400 Not supported" response is currently
  733. # returned.
  734. #respond-http-unsupported