turnserver.1 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "19 November 2014" "" ""
  3. .SH GENERAL INFORMATION
  4. The \fBTURN Server\fP project contains the source code of a TURN server and TURN client
  5. messaging library. Also, some extra programs provided, for testing\-only
  6. purposes.
  7. .PP
  8. See the INSTALL file for the building instructions.
  9. .PP
  10. After the build, you will have the following binary images:
  11. .TP
  12. .B
  13. 1.
  14. \fIturnserver\fP: \fBTURN Server\fP relay.
  15. The compiled binary image of the \fBTURN Server\fP program is located in bin/ sub\-directory.
  16. .TP
  17. .B
  18. 2.
  19. \fIturnadmin\fP: TURN administration tool. See README.turnadmin and \fIturnadmin\fP man page.
  20. .TP
  21. .B
  22. 3.
  23. turnutils_uclient. See README.turnutils and \fIturnutils\fP man page.
  24. .TP
  25. .B
  26. 4.
  27. turnutils_peer. See README.turnutils and \fIturnutils\fP man page.
  28. .TP
  29. .B
  30. 5.
  31. turnutils_stunclient. See README.turnutils and \fIturnutils\fP man page.
  32. .TP
  33. .B
  34. 6.
  35. turnutils_rfc5769check. See README.turnutils and \fIturnutils\fP man page.
  36. .PP
  37. In the "examples/scripts" sub\-directory, you will find the examples of command lines to be used
  38. to run the programs. The scripts are meant to be run from examples/ sub\-directory, for example:
  39. .PP
  40. $ cd examples
  41. $ ./scripts/secure_relay.sh
  42. .SH RUNNING THE TURN SERVER
  43. Options note: \fIturnserver\fP has long and short option names, for most options.
  44. Some options have only long form, some options have only short form. Their syntax
  45. somewhat different, if an argument is required:
  46. .PP
  47. The short form must be used as this (for example):
  48. .PP
  49. .nf
  50. .fam C
  51. $ turnserver \-L 12.34.56.78
  52. .fam T
  53. .fi
  54. The long form equivalent must use the "=" character:
  55. .PP
  56. .nf
  57. .fam C
  58. $ turnserver \-\-listening\-ip=12.34.56.78
  59. .fam T
  60. .fi
  61. If this is a flag option (no argument required) then their usage are the same, for example:
  62. .PP
  63. .nf
  64. .fam C
  65. $ turnserver \-a
  66. .fam T
  67. .fi
  68. is equivalent to:
  69. .PP
  70. .nf
  71. .fam C
  72. $ turnserver \-\-lt\-cred\-mech
  73. .fam T
  74. .fi
  75. =====================================
  76. .SS NAME
  77. \fB
  78. \fBturnserver \fP\- a TURN relay server implementation.
  79. \fB
  80. .SS SYNOPSIS
  81. .nf
  82. .fam C
  83. $ \fIturnserver\fP [\fB\-n\fP | \fB\-c\fP <config\-file> ] [\fIflags\fP] [ \fB\-\-userdb\fP=<userdb\-file> | \fB\-\-psql\-userdb\fP=<db\-conn\-string> | \fB\-\-mysql\-userdb\fP=<db\-conn\-string> | \fB\-\-mongo\-userdb\fP=<db\-conn\-string> | \fB\-\-redis\-userdb\fP=<db\-conn\-string> ] [\fB\-z\fP | \fB\-\-no\-auth\fP | \fB\-a\fP | \fB\-\-lt\-cred\-mech\fP ] [\fIoptions\fP]
  84. $ \fIturnserver\fP \fB\-h\fP
  85. .fam T
  86. .fi
  87. .fam T
  88. .fi
  89. .SS DESCRIPTION
  90. .TP
  91. .B
  92. Config file settings:
  93. .TP
  94. .B
  95. \fB\-n\fP
  96. Do not use configuration file, use only command line parameters.
  97. .TP
  98. .B
  99. \fB\-c\fP
  100. Configuration file name (default \- turnserver.conf).
  101. The format of config file can be seen in
  102. the supplied examples/etc/turnserver.conf example file. Long
  103. names of the \fIoptions\fP are used as the configuration
  104. items names in the file. If not an absolute path is supplied,
  105. then the file is searched in the following directories:
  106. .RS
  107. .IP \(bu 3
  108. current directory
  109. .IP \(bu 3
  110. current directory etc/ sub\-directory
  111. .IP \(bu 3
  112. upper directory level etc/
  113. .IP \(bu 3
  114. /etc/
  115. .IP \(bu 3
  116. /usr/local/etc/
  117. .IP \(bu 3
  118. installation directory /etc
  119. .RE
  120. .TP
  121. .B
  122. User database settings:
  123. .TP
  124. .B
  125. \fB\-b\fP, \fB\-\-db\fP, \fB\-\-userdb\fP
  126. SQLite user database file name (default \- /var/db/turndb).
  127. .TP
  128. .B
  129. \fB\-e\fP, \fB\-\-psql\-userdb\fP
  130. User database connection string for PostgreSQL.
  131. This database can be used for long\-term and short\-term
  132. credentials mechanisms, and it can store the secret value
  133. for secret\-based timed authentication in TURN RESP API.
  134. The connection string format is like that:
  135. .RS
  136. .PP
  137. "host=<host> dbname=<dbname> user=<db\-user> password=<db\-user\-password> connect_timeout=<seconds>"
  138. (for 8.x or newer Postgres).
  139. .PP
  140. Or:
  141. .PP
  142. "postgresql://username:password@hostname:port/databasename"
  143. (for 9.x or newer Postgres).
  144. .PP
  145. See the INSTALL file for more explanations and examples.
  146. .PP
  147. Also, see http://www.PostgreSQL.org for full PostgreSQL documentation.
  148. .RE
  149. .TP
  150. .B
  151. \fB\-M\fP, \fB\-\-mysql\-userdb\fP
  152. User database connection string for MySQL or MariaDB.
  153. This database can be used for long\-term and short\-term
  154. credentials mechanisms, and it can store the secret value for
  155. secret\-based timed authentication in TURN RESP API.
  156. The connection string format is like that:
  157. .RS
  158. .PP
  159. "host=<host> dbname=<dbname> user=<db\-user> password=<db\-user\-password> connect_timeout=<seconds>"
  160. .PP
  161. See the INSTALL file for more explanations and examples.
  162. .PP
  163. Also, see http://www.mysql.org or http://mariadb.org
  164. for full MySQL documentation.
  165. .PP
  166. Optional connection string parameters for the secure communications (SSL):
  167. ca, capath, cert, key, cipher
  168. (see http://dev.mysql.com/doc/refman/5.1/en/ssl\-options.html for the
  169. command \fIoptions\fP description).
  170. .RE
  171. .TP
  172. .B
  173. \fB\-J\fP, \fB\-\-mongo\-userdb\fP
  174. User database connection string for MongoDB.
  175. This database can be used for long\-term and short\-term
  176. credentials mechanisms, and it can store the secret value
  177. for secret\-based timed authentication in TURN RESP API.
  178. The connection string format is like that:
  179. .RS
  180. .PP
  181. "mongodb://username:password@host:port/database?\fIoptions\fP"
  182. .PP
  183. See the INSTALL file for more explanations and examples.
  184. .PP
  185. Also, see http://docs.mongodb.org/manual/
  186. for full MongoDB documentation.
  187. .RE
  188. .TP
  189. .B
  190. \fB\-N\fP, \fB\-\-redis\-userdb\fP
  191. User database connection string for Redis.
  192. This database can be used for long\-term and short\-term
  193. credentials mechanisms, and it can store the secret
  194. value for secret\-based timed authentication in TURN RESP API.
  195. The connection string format is like that:
  196. .RS
  197. .PP
  198. "ip=<ip\-addr> dbname=<db\-number> password=<db\-password> connect_timeout=<seconds>"
  199. .PP
  200. See the INSTALL file for more explanations and examples.
  201. .PP
  202. Also, see http://redis.io for full Redis documentation.
  203. .RE
  204. .TP
  205. .B
  206. Flags:
  207. .TP
  208. .B
  209. \fB\-v\fP, \fB\-\-verbose\fP
  210. Moderate verbose mode.
  211. .TP
  212. .B
  213. \fB\-V\fP, \fB\-\-Verbose\fP
  214. Extra verbose mode, very annoying and not recommended.
  215. .TP
  216. .B
  217. \fB\-o\fP, \fB\-\-daemon\fP
  218. Run server as daemon.
  219. .TP
  220. .B
  221. \fB\-f\fP, \fB\-\-fingerprint\fP
  222. Use fingerprints in the TURN messages. If an incoming request
  223. contains a fingerprint, then TURN server will always add
  224. fingerprints to the messages in this session, regardless of the
  225. per\-server setting.
  226. .TP
  227. .B
  228. \fB\-a\fP, \fB\-\-lt\-cred\-mech\fP
  229. Use long\-term credentials mechanism (this one you need for WebRTC usage).
  230. .TP
  231. .B
  232. \fB\-A\fP, \fB\-\-st\-cred\-mech\fP
  233. Use the short\-term credentials mechanism.
  234. .TP
  235. .B
  236. \fB\-z\fP, \fB\-\-no\-auth\fP
  237. Do not use any credentials mechanism, allow anonymous access.
  238. Opposite to \fB\-a\fP and \fB\-A\fP \fIoptions\fP. This is default option when no
  239. authentication\-related \fIoptions\fP are set.
  240. By default, no credential mechanism is used \-
  241. any user is allowed.
  242. .TP
  243. .B
  244. \fB\-\-use\-auth\-secret\fP
  245. TURN REST API flag.
  246. Flag that sets a special WebRTC authorization option
  247. that is based upon authentication secret. The feature purpose
  248. is to support "\fBTURN Server\fP REST API" as described in
  249. the TURN REST API section below.
  250. This option uses timestamp as part of combined username:
  251. usercombo \-> "timestamp:username",
  252. turn user \-> usercombo,
  253. turn password \-> \fBbase64\fP(hmac(secret key, usercombo)).
  254. This allows TURN credentials to be accounted for a specific user id.
  255. If you don't have a suitable id, the timestamp alone can be used.
  256. This option is just turns on secret\-based authentication.
  257. The actual value of the secret is defined either by option static\-auth\-secret,
  258. or can be found in the turn_secret table in the database.
  259. This option can be used with long\-term credentials mechanisms only \-
  260. it does not make much sense with the short\-term mechanism.
  261. .TP
  262. .B
  263. \fB\-\-oauth\fP
  264. Support oAuth authentication, as in the third\-party TURN specs document.
  265. .TP
  266. .B
  267. \fB\-\-dh566\fP
  268. Use 566 bits predefined DH TLS key. Default size of the key is 1066.
  269. .TP
  270. .B
  271. \fB\-\-dh2066\fP
  272. Use 2066 bits predefined DH TLS key. Default size of the key is 1066.
  273. .TP
  274. .B
  275. \fB\-\-no\-sslv2\fP
  276. Do not allow SSLv2 protocol.
  277. .TP
  278. .B
  279. \fB\-\-no\-sslv3\fP
  280. Do not allow SSLv3 protocol.
  281. .TP
  282. .B
  283. \fB\-\-no\-tlsv1\fP
  284. Do not allow TLSv1 protocol.
  285. .TP
  286. .B
  287. \fB\-\-no\-tlsv1_1\fP
  288. Do not allow TLSv1.1 protocol.
  289. .TP
  290. .B
  291. \fB\-\-no\-tlsv1_2\fP
  292. Do not allow TLSv1.2 protocol.
  293. .TP
  294. .B
  295. \fB\-\-no\-udp\fP
  296. Do not start UDP client listeners.
  297. .TP
  298. .B
  299. \fB\-\-no\-tcp\fP
  300. Do not start TCP client listeners.
  301. .TP
  302. .B
  303. \fB\-\-no\-tls\fP
  304. Do not start TLS client listeners.
  305. .TP
  306. .B
  307. \fB\-\-no\-dtls\fP
  308. Do not start DTLS client listeners.
  309. .TP
  310. .B
  311. \fB\-\-no\-udp\-relay\fP
  312. Do not allow UDP relay endpoints defined in RFC 5766,
  313. use only TCP relay endpoints as defined in RFC 6062.
  314. .TP
  315. .B
  316. \fB\-\-no\-tcp\-relay\fP
  317. Do not allow TCP relay endpoints defined in RFC 6062,
  318. use only UDP relay endpoints as defined in RFC 5766.
  319. .TP
  320. .B
  321. \fB\-\-stale\-nonce\fP
  322. Use extra security with nonce value having limited lifetime (600 secs).
  323. .TP
  324. .B
  325. \fB\-\-no\-stdout\-log\fP
  326. Flag to prevent stdout log messages.
  327. By default, all log messages are going to both stdout and to
  328. the configured log file. With this option everything will be going to
  329. the log file only (unless the log file itself is stdout).
  330. .TP
  331. .B
  332. \fB\-\-syslog\fP
  333. With this flag, all log will be redirected to the system log (syslog).
  334. .TP
  335. .B
  336. \fB\-\-simple\-log\fP
  337. This flag means that no log file rollover will be used, and the log file
  338. name will be constructed as\-is, without PID and date appendage.
  339. This option can be used, for example, together with the logrotate tool.
  340. .TP
  341. .B
  342. \fB\-\-secure\-stun\fP
  343. Require authentication of the STUN Binding request.
  344. By default, the clients are allowed anonymous access to the STUN Binding functionality.
  345. .TP
  346. .B
  347. \fB\-S\fP, \fB\-\-stun\-only\fP
  348. Run as STUN server only, all TURN requests will be ignored.
  349. Option to suppress TURN functionality, only STUN requests will be processed.
  350. .TP
  351. .B
  352. \fB\-\-no\-stun\fP
  353. Run as TURN server only, all STUN requests will be ignored.
  354. Option to suppress STUN functionality, only TURN requests will be processed.
  355. .TP
  356. .B
  357. \fB\-\-no\-loopback\-peers\fP
  358. Disallow peers on the loopback addresses (127.x.x.x and ::1).
  359. .TP
  360. .B
  361. \fB\-\-no\-multicast\-peers\fP
  362. Disallow peers on well\-known broadcast addresses
  363. (224.0.0.0 and above, and FFXX:*).
  364. .TP
  365. .B
  366. \fB\-\-sha256\fP
  367. Require SHA256 digest function to be used for the message integrity.
  368. By default, the server uses SHA1 hashes. With this option, the server
  369. requires the stronger SHA256 hashes. The client application must support
  370. SHA256 hash function if this option is used. If the server obtains a message
  371. from the client with a weaker (SHA1) hash function then the server returns
  372. error code 426.
  373. .TP
  374. .B
  375. \fB\-\-mobility\fP
  376. Mobility with ICE (MICE) specs support.
  377. .TP
  378. .B
  379. \fB\-\-no\-cli\fP
  380. Turn OFF the CLI support. By default it is always ON.
  381. See also \fIoptions\fP \fB\-\-cli\-ip\fP and \fB\-\-cli\-port\fP.
  382. .TP
  383. .B
  384. \fB\-\-server\-relay\fP
  385. Server relay. NON\-STANDARD AND DANGEROUS OPTION.
  386. Only for those applications when we want to run
  387. server applications on the relay endpoints.
  388. This option eliminates the IP permissions check
  389. on the packets incoming to the relay endpoints.
  390. See http://tools.ietf.org/search/rfc5766#section\-17.2.3 .
  391. .TP
  392. .B
  393. \fB\-\-udp\-self\-balance\fP
  394. (recommended for older Linuxes only)
  395. Automatically balance UDP traffic over auxiliary servers
  396. (if configured). The load balancing is using the
  397. ALTERNATE\-SERVER mechanism. The TURN client must support
  398. 300 ALTERNATE\-SERVER response for this functionality.
  399. .TP
  400. .B
  401. \fB\-\-check\-origin\-consistency\fP
  402. The flag that sets the origin consistency
  403. check: across the session, all requests must have the same
  404. main ORIGIN attribute value (if the ORIGIN was
  405. initially used by the session).
  406. .TP
  407. .B
  408. \fB\-h\fP
  409. Help.
  410. .TP
  411. .B
  412. Options with required values:
  413. .TP
  414. .B
  415. \fB\-d\fP, \fB\-\-listening\-device\fP
  416. Listener interface device.
  417. (NOT RECOMMENDED. Optional functionality, Linux only).
  418. The \fIturnserver\fP process must have root privileges to bind the
  419. listening endpoint to a device. If \fIturnserver\fP must run as a
  420. process without root privileges, then just do not use this setting.
  421. .TP
  422. .B
  423. \fB\-L\fP, \fB\-\-listening\-ip\fP
  424. Listener IP address of relay server.
  425. Multiple listeners can be specified, for example:
  426. \fB\-L\fP ip1 \fB\-L\fP ip2 \fB\-L\fP ip3
  427. If no \fBIP\fP(s) specified, then all IPv4 and
  428. IPv6 system IPs will be used for listening.
  429. The same \fBip\fP(s) can be used as both listening and relay \fBip\fP(s).
  430. .TP
  431. .B
  432. \fB\-p\fP, \fB\-\-listening\-port\fP
  433. TURN listener port for UDP and TCP listeners (Default: 3478).
  434. Note: actually, TLS & DTLS sessions can connect to the "plain" TCP & UDP
  435. \fBport\fP(s), too \- if allowed by configuration.
  436. .TP
  437. .B
  438. \fB\-\-tls\-listening\-port\fP
  439. TURN listener port for TLS and DTLS listeners (Default: 5349).
  440. Note: actually, "plain" TCP & UDP sessions can connect to the TLS & DTLS
  441. \fBport\fP(s), too \- if allowed by configuration. The TURN server
  442. "automatically" recognizes the type of traffic. Actually, two listening
  443. endpoints (the "plain" one and the "tls" one) are equivalent in terms of
  444. functionality; but we keep both endpoints to satisfy the RFC 5766 specs.
  445. For secure TCP connections, we currently support SSL version 3 and
  446. TLS versions 1.0, 1.1, 1.2. SSL2 "encapsulation mode" is also supported.
  447. For secure UDP connections, we support DTLS version 1.
  448. .TP
  449. .B
  450. \fB\-\-alt\-listening\-port\fP
  451. Alternative listening port for UDP and TCP listeners;
  452. default (or zero) value means "listening port plus one".
  453. This is needed for STUN CHANGE_REQUEST \- in RFC 5780 sense
  454. or in old RFC 3489 sense \- for NAT behavior discovery). The \fBTURN Server\fP
  455. supports CHANGE_REQUEST only if it is started with more than one
  456. listening IP address of the same family (IPv4 or IPv6). The CHANGE_REQUEST
  457. is only supported by UDP protocol, other protocols are listening
  458. on that endpoint only for "symmetry".
  459. .TP
  460. .B
  461. \fB\-\-alt\-tls\-listening\-port\fP
  462. Alternative listening port for TLS and DTLS protocols.
  463. Default (or zero) value means "TLS listening port plus one".
  464. .TP
  465. .B
  466. \fB\-\-aux\-server\fP
  467. Auxiliary STUN/TURN server listening endpoint.
  468. Aux servers have almost full TURN and STUN functionality.
  469. The (minor) limitations are:
  470. .RS
  471. .IP 1) 4
  472. Auxiliary servers do not have alternative ports and
  473. they do not support STUN RFC 5780 functionality (CHANGE REQUEST).
  474. .IP 2) 4
  475. Auxiliary servers also are never returning ALTERNATIVE\-SERVER reply.
  476. .RE
  477. .PP
  478. Valid formats are 1.2.3.4:5555 for IPv4 and [1:2::3:4]:5555 for IPv6.
  479. There may be multiple aux\-server \fIoptions\fP, each will be used for listening
  480. to client requests.
  481. .TP
  482. .B
  483. \fB\-i\fP, \fB\-\-relay\-device\fP
  484. Relay interface device for relay sockets
  485. (NOT RECOMMENDED. Optional, Linux only).
  486. .TP
  487. .B
  488. \fB\-E\fP, \fB\-\-relay\-ip\fP
  489. Relay address (the local IP address that
  490. will be used to relay the packets to the
  491. peer). Multiple relay addresses may be used:
  492. \fB\-E\fP ip1 \fB\-E\fP ip2 \fB\-E\fP ip3
  493. The same \fBIP\fP(s) can be used as both listening \fBIP\fP(s) and relay \fBIP\fP(s).
  494. If no relay \fBIP\fP(s) specified, then the \fIturnserver\fP will apply the
  495. default policy: it will decide itself which relay addresses to be
  496. used, and it will always be using the client socket IP address as
  497. the relay IP address of the TURN session (if the requested relay
  498. address family is the same as the family of the client socket).
  499. .TP
  500. .B
  501. \fB\-X\fP, \fB\-\-external\-ip\fP
  502. \fBTURN Server\fP public/private address mapping, if the server is behind NAT.
  503. In that situation, if a \fB\-X\fP is used in form "\fB\-X\fP <ip>" then that ip will be reported
  504. as relay IP address of all allocations. This scenario works only in a simple case
  505. when one single relay address is be used, and no CHANGE_REQUEST functionality is
  506. required. That single relay address must be mapped by NAT to the 'external' IP.
  507. The "external\-ip" value, if not empty, is returned in XOR\-RELAYED\-ADDRESS field.
  508. For that 'external' IP, NAT must forward ports directly (relayed port 12345
  509. must be always mapped to the same 'external' port 12345).
  510. In more complex case when more than one IP address is involved,
  511. that option must be used several times, each entry must
  512. have form "\fB\-X\fP <public\-ip/private\-ip>", to map all involved addresses.
  513. CHANGE_REQUEST (RFC5780 or RFC3489) NAT discovery STUN functionality will work
  514. correctly, if the addresses are mapped properly, even when the TURN server itself
  515. is behind A NAT.
  516. By default, this value is empty, and no address mapping is used.
  517. .TP
  518. .B
  519. \fB\-m\fP, \fB\-\-relay\-threads\fP
  520. Number of relay threads to handle the established connections
  521. (in addition to authentication thread and the listener thread).
  522. If set to 0 then application runs relay process in a single thread,
  523. in the same thread with the listener process (the authentication thread will
  524. still be a separate thread). In older systems (before Linux kernel 3.9),
  525. the number of UDP threads is always one threads per network listening endpoint \-
  526. unless "\fB\-m\fP 0" or "\fB\-m\fP 1" is set.
  527. .TP
  528. .B
  529. \fB\-\-min\-port\fP
  530. Lower bound of the UDP port range for relay
  531. endpoints allocation.
  532. Default value is 49152, according to RFC 5766.
  533. .TP
  534. .B
  535. \fB\-\-max\-port\fP
  536. Upper bound of the UDP port range for relay
  537. endpoints allocation.
  538. Default value is 65535, according to RFC 5766.
  539. .TP
  540. .B
  541. \fB\-u\fP, \fB\-\-user\fP
  542. Long\-term security mechanism credentials user account,
  543. in the column\-separated form username:key.
  544. Multiple user accounts may used in the command line.
  545. The key is either the user password, or
  546. the key is generated
  547. by \fIturnadmin\fP command. In the second case,
  548. the key must be prepended with 0x symbols.
  549. The key is calculated over the user name,
  550. the user realm, and the user password.
  551. This setting may not be used with TURN REST API or
  552. with short\-term credentials mechanism.
  553. .TP
  554. .B
  555. \fB\-r\fP, \fB\-\-realm\fP
  556. The default realm to be used for the users when no explicit
  557. origin/realm relationship was found in the database, or if the TURN
  558. server is not using any database (just the commands\-line settings
  559. and the userdb file). Must be used with long\-term credentials
  560. mechanism or with TURN REST API.
  561. .TP
  562. .B
  563. \fB\-C\fP, \fB\-\-rest\-api\-separator\fP
  564. This is the timestamp/username separator symbol
  565. (character) in TURN REST API. The default value is :.
  566. .TP
  567. .B
  568. \fB\-q\fP, \fB\-\-user\-quota\fP
  569. Per\-user allocations quota: how many concurrent
  570. allocations a user can create. This option can also be set
  571. through the database, for a particular realm.
  572. .TP
  573. .B
  574. \fB\-Q\fP, \fB\-\-total\-quota\fP
  575. Total allocations quota: global limit on concurrent allocations.
  576. This option can also be set through the database, for a particular realm.
  577. .TP
  578. .B
  579. \fB\-s\fP, \fB\-\-max\-bps\fP
  580. Max bytes\-per\-second bandwidth a TURN session is allowed to handle
  581. (input and output network streams are treated separately). Anything above
  582. that limit will be dropped or temporary suppressed (within the
  583. available buffer limits). This option can also be set through the
  584. database, for a particular realm.
  585. .TP
  586. .B
  587. \fB\-B\fP, \fB\-\-bps\-capacity\fP
  588. Maximum server capacity.
  589. Total bytes\-per\-second bandwidth the TURN server is allowed to allocate
  590. for the sessions, combined (input and output network streams are treated
  591. separately).
  592. .TP
  593. .B
  594. \fB\-\-static\-auth\-secret\fP
  595. Static authentication secret value (a string) for TURN REST API only.
  596. If not set, then the turn server will try to use the dynamic value
  597. in turn_secret table in user database (if present). The database\-stored
  598. value can be changed on\-the\-fly by a separate program, so this is why
  599. that other mode is dynamic. Multiple shared secrets can be used
  600. (both in the database and in the "static" fashion).
  601. .TP
  602. .B
  603. \fB\-\-server\-name\fP
  604. Server name used for
  605. the oAuth authentication purposes.
  606. The default value is the realm name.
  607. .TP
  608. .B
  609. \fB\-\-cert\fP
  610. Certificate file, PEM format. Same file
  611. search rules applied as for the configuration
  612. file. If both \fB\-\-no\-tls\fP and \fB\-\-no\-dtls\fP \fIoptions\fP
  613. are specified, then this parameter is not needed.
  614. Default value is turn_server_cert.pem.
  615. .TP
  616. .B
  617. \fB\-\-pkey\fP
  618. Private key file, PEM format. Same file
  619. search rules applied as for the configuration
  620. file. If both \fB\-\-no\-tls\fP and \fB\-\-no\-dtls\fP \fIoptions\fP
  621. are specified, then this parameter is not needed.
  622. Default value is turn_server_pkey.pem.
  623. .TP
  624. .B
  625. \fB\-\-pkey\-pwd\fP
  626. If the private key file is encrypted, then this password to be used.
  627. .TP
  628. .B
  629. \fB\-\-cipher\-list\fP
  630. Allowed OpenSSL cipher list for TLS/DTLS connections.
  631. Default value is "DEFAULT".
  632. .TP
  633. .B
  634. \fB\-\-CA\-file\fP
  635. CA file in OpenSSL format.
  636. Forces TURN server to verify the client SSL certificates.
  637. By default, no CA is set and no client certificate check is performed.
  638. .TP
  639. .B
  640. \fB\-\-ec\-curve\-name\fP
  641. Curve name for EC ciphers, if supported by OpenSSL library (TLS and DTLS).
  642. The default value is prime256v1.
  643. .TP
  644. .B
  645. \fB\-\-dh\-file\fP
  646. Use custom DH TLS key, stored in PEM format in the file.
  647. Flags \fB\-\-dh566\fP and \fB\-\-dh2066\fP are ignored when the DH key is taken from a file.
  648. .TP
  649. .B
  650. \fB\-l\fP, \fB\-\-log\-file\fP
  651. Option to set the full path name of the log file.
  652. By default, the \fIturnserver\fP tries to open a log file in
  653. /var/log/\fIturnserver\fP, /var/log, /var/tmp, /tmp and . (current)
  654. directories (which file open operation succeeds
  655. first that file will be used). With this option you can set the
  656. definite log file name.
  657. The special names are "stdout" and "\-" \- they will force everything
  658. to the stdout. Also, "syslog" name will redirect everything into
  659. the system log (syslog), as if the option "\fB\-\-syslog\fP" was set.
  660. In the runtime, the logfile can be reset with the SIGHUP signal
  661. to the \fIturnserver\fP process.
  662. .TP
  663. .B
  664. \fB\-\-alternate\-server\fP
  665. Option to set the "redirection" mode. The value of this option
  666. will be the address of the alternate server for UDP & TCP service in form of
  667. <ip>[:<port>]. The server will send this value in the attribute
  668. ALTERNATE\-SERVER, with error 300, on ALLOCATE request, to the client.
  669. Client will receive only values with the same address family
  670. as the client network endpoint address family.
  671. See RFC 5389 and RFC 5766 for ALTERNATE\-SERVER functionality description.
  672. The client must use the obtained value for subsequent TURN communications.
  673. If more than one \fB\-\-alternate\-server\fP \fIoptions\fP are provided, then the functionality
  674. can be more accurately described as "load\-balancing" than a mere "redirection".
  675. If the port number is omitted, then the default port
  676. number 3478 for the UDP/TCP protocols will be used.
  677. Colon (:) characters in IPv6 addresses may conflict with the syntax of
  678. the option. To alleviate this conflict, literal IPv6 addresses are enclosed
  679. in square brackets in such resource identifiers, for example:
  680. [2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478 .
  681. Multiple alternate servers can be set. They will be used in the
  682. round\-robin manner. All servers in the pool are considered of equal weight and
  683. the load will be distributed equally. For example, if we have 4 alternate servers,
  684. then each server will receive 25% of ALLOCATE requests. An alternate TURN server
  685. address can be used more than one time with the alternate\-server option, so this
  686. can emulate "weighting" of the servers.
  687. .TP
  688. .B
  689. \fB\-\-tls\-alternate\-server\fP
  690. Option to set alternative server for TLS & DTLS services in form of
  691. <ip>:<port>. If the port number is omitted, then the default port
  692. number 5349 for the TLS/DTLS protocols will be used. See the previous option for the
  693. functionality description.
  694. .TP
  695. .B
  696. \fB\-O\fP, \fB\-\-redis\-statsdb\fP
  697. Redis status and statistics database connection string, if used (default \- empty,
  698. no Redis stats DB used). This database keeps allocations status information, and it can
  699. be also used for publishing and delivering traffic and allocation event notifications.
  700. This database option can be used independently of \fB\-\-redis\-userdb\fP option,
  701. and actually Redis can be used for status/statistics and MySQL or MongoDB or PostgreSQL can
  702. be used for the user database.
  703. The connection string has the same parameters as redis\-userdb connection string.
  704. .TP
  705. .B
  706. \fB\-\-max\-allocate\-timeout\fP
  707. Max time, in seconds, allowed for full allocation establishment.
  708. Default is 60 seconds.
  709. .PP
  710. \fB\-\-denied\-peer\-ip\fP=<IPaddr[\fB\-IPaddr\fP]>
  711. .PP
  712. \fB\-\-allowed\-peer\-ip\fP=<IPaddr[\fB\-IPaddr\fP]> Options to ban or allow specific ip addresses or ranges
  713. of ip addresses. If an ip address is specified as both allowed and denied, then
  714. the ip address is considered to be allowed. This is useful when you wish to ban
  715. a range of ip addresses, except for a few specific ips within that range.
  716. This can be used when you do not want users of the turn server to be able to access
  717. machines reachable by the turn server, but would otherwise be unreachable from the
  718. internet (e.g. when the turn server is sitting behind a NAT). The 'white" and "black" peer
  719. IP ranges can also be dynamically changed in the database.
  720. The allowed/denied addresses (white/black lists) rules are very simple:
  721. .RS
  722. .IP 1) 4
  723. If there is no rule for an address, then it is allowed;
  724. .IP 2) 4
  725. If there is an "allowed" rule that fits the address then it is allowed \- no matter what;
  726. .IP 3) 4
  727. If there is no "allowed" rule that fits the address, and if there is a "denied" rule that
  728. fits the address, then it is denied.
  729. .RE
  730. .TP
  731. .B
  732. \fB\-\-pidfile\fP
  733. File name to store the pid of the process.
  734. Default is /var/run/turnserver.pid (if superuser account is used) or
  735. /var/tmp/turnserver.pid .
  736. .TP
  737. .B
  738. \fB\-\-proc\-user\fP
  739. User name to run the process. After the initialization, the \fIturnserver\fP process
  740. will make an attempt to change the current user ID to that user.
  741. .TP
  742. .B
  743. \fB\-\-proc\-group\fP
  744. Group name to run the process. After the initialization, the \fIturnserver\fP process
  745. will make an attempt to change the current group ID to that group.
  746. .TP
  747. .B
  748. \fB\-\-cli\-ip\fP
  749. Local system IP address to be used for CLI management interface.
  750. The \fIturnserver\fP process can be accessed for management with telnet,
  751. at this IP address and on the CLI port (see the next parameter).
  752. Default value is 127.0.0.1. You can use telnet or putty (in telnet mode)
  753. to access the CLI management interface.
  754. .TP
  755. .B
  756. \fB\-\-cli\-port\fP
  757. CLI management interface listening port. Default is 5766.
  758. .TP
  759. .B
  760. \fB\-\-cli\-password\fP
  761. CLI access password. Default is empty (no password).
  762. .TP
  763. .B
  764. \fB\-\-cli\-max\-output\-sessions\fP
  765. Maximum number of output sessions in ps CLI command.
  766. This value can be changed on\-the\-fly in CLI. The default value is 256.
  767. .TP
  768. .B
  769. \fB\-\-ne\fP=[1|2|3]
  770. Set network engine type for the process (for internal purposes).
  771. .PP
  772. ==================================
  773. .SH LOAD BALANCE AND PERFORMANCE TUNING
  774. This topic is covered in the wiki page:
  775. .PP
  776. http://code.google.com/p/coturn/wiki/turn_performance_and_load_balance
  777. .PP
  778. ===================================
  779. .SH WEBRTC USAGE
  780. This is a set of notes for the WebRTC users:
  781. .IP 1) 4
  782. WebRTC uses long\-term authentication mechanism, so you have to use \fB\-a\fP
  783. option (or \fB\-\-lt\-cred\-mech\fP). WebRTC relaying will not work with anonymous access
  784. or with short\-term authentication. With \fB\-a\fP option, do not forget to set the
  785. default realm (\fB\-r\fP option). You will also have to set up the user accounts,
  786. for that you have a number of \fIoptions\fP:
  787. .PP
  788. .nf
  789. .fam C
  790. a) command\-line options (\-u).
  791. b) a database table (SQLite or PostgreSQL or MySQL or MongoDB). You will have to
  792. set keys with turnadmin utility (see docs and wiki for turnadmin).
  793. You cannot use open passwords in the database.
  794. c) Redis key/value pair(s), if Redis is used. You key use either keys or
  795. open passwords with Redis; see turndb/testredisdbsetup.sh file.
  796. d) You also can use the TURN REST API. You will need shared secret(s) set
  797. either through the command line option, or through the config file, or through
  798. the database table or Redis key/value pairs.
  799. .fam T
  800. .fi
  801. .IP 2) 4
  802. Usually WebRTC uses fingerprinting (\fB\-f\fP).
  803. .IP 3) 4
  804. \fB\-v\fP option may be nice to see the connected clients.
  805. .IP 4) 4
  806. \fB\-X\fP is needed if you are running your TURN server behind a NAT.
  807. .IP 5) 4
  808. \fB\-\-min\-port\fP and \fB\-\-max\-port\fP may be needed if you want to limit the relay endpoints ports
  809. number range.
  810. .PP
  811. ===================================
  812. .SH TURN REST API
  813. In WebRTC, the browser obtains the TURN connection information from the web
  814. server. This information is a secure information \- because it contains the
  815. necessary TURN credentials. As these credentials are transmitted over the
  816. public networks, we have a potential security breach.
  817. .PP
  818. If we have to transmit a valuable information over the public network,
  819. then this information has to have a limited lifetime. Then the guy who
  820. obtains this information without permission will be able to perform
  821. only limited damage.
  822. .PP
  823. This is how the idea of TURN REST API \- time\-limited TURN credentials \-
  824. appeared. This security mechanism is based upon the long\-term credentials
  825. mechanism. The main idea of the REST API is that the web server provides
  826. the credentials to the client, but those credentials can be used only
  827. limited time by an application that has to create a TURN server connection.
  828. .PP
  829. The "classic" long\-term credentials mechanism (LTCM) is described here:
  830. .PP
  831. http://tools.ietf.org/html/rfc5389#section\-10.2
  832. .PP
  833. http://tools.ietf.org/html/rfc5389#section\-15.4
  834. .PP
  835. For authentication, each user must know two things: the username and the
  836. password. Optionally, the user must supply the ORIGIN value, so that the
  837. server can figure out the realm to be used for the user. The nonce and
  838. the realm values are supplied by the TURN server. But LTCM is not saying
  839. anything about the nature and about the persistence of the username and
  840. of the password; and this is used by the REST API.
  841. .PP
  842. In the TURN REST API, there is no persistent passwords for users. A user has
  843. just the username. The password is always temporary, and it is generated by
  844. the web server on\-demand, when the user accesses the WebRTC page. And,
  845. actually, a temporary one\-time session only, username is provided to the user,
  846. too.
  847. .PP
  848. The temporary user is generated as:
  849. .PP
  850. temporary\-username="timestamp" + ":" + "username"
  851. .PP
  852. where username is the persistent user name, and the timestamp format is just
  853. seconds sinse 1970 \- the same value as \fBtime\fP(NULL) function returns.
  854. .PP
  855. The temporary password is obtained as HMAC\-SHA1 function over the temporary
  856. username, with shared secret as the HMAC key, and then the result is encoded:
  857. .PP
  858. temporary\-password = \fBbase64_encode\fP(hmac\-sha1(shared\-secret, temporary\-username))
  859. .PP
  860. Both the TURN server and the web server know the same shared secret. How the
  861. shared secret is distributed among the involved entities is left to the WebRTC
  862. deployment details \- this is beyond the scope of the TURN REST API.
  863. .PP
  864. So, a timestamp is used for the temporary password calculation, and this
  865. timestamp can be retrieved from the temporary username. This information
  866. is valuable, but only temporary, while the timestamp is not expired. Without
  867. knowledge of the shared secret, a new temporary password cannot be generated.
  868. .PP
  869. This is all formally described in Justin's Uberti TURN REST API document
  870. that can be obtained following the link "TURN REST API" in the \fBTURN Server\fP
  871. project's page http://code.google.com/p/coturn/.
  872. .PP
  873. Once the temporary username and password are obtained by the client (browser)
  874. application, then the rest is just 'classic" long\-term credentials mechanism.
  875. For developers, we are going to describe it step\-by\-step below:
  876. .RS
  877. .IP \(bu 3
  878. a new TURN client sends a request command to the TURN server. Optionally,
  879. it adds the ORIGIN field to it.
  880. .IP \(bu 3
  881. TURN server sees that this is a new client and the message is not
  882. authenticated.
  883. .IP \(bu 3
  884. the TURN server generates a random nonce string, and return the
  885. error 401 to the client, with nonce and realm included. If the ORIGIN
  886. field was present in the client request, it may affect the realm value
  887. that the server chooses for the client.
  888. .IP \(bu 3
  889. the client sees the 401 error and it extracts two values from
  890. the error response: the nonce and the realm.
  891. .IP \(bu 3
  892. the client uses username, realm and password to produce a key:
  893. .PP
  894. .nf
  895. .fam C
  896. key = MD5(username ":" realm ":" SASLprep(password))
  897. .fam T
  898. .fi
  899. (SASLprep is described here: http://tools.ietf.org/html/rfc4013)
  900. .IP \(bu 3
  901. the client forms a new request, adds username, realm and nonce to the
  902. request. Then, the client calculates and adds the integrity field to
  903. the request. This is the trickiest part of the process, and it is
  904. described in the end of section 15.4:
  905. http://tools.ietf.org/html/rfc5389#section\-15.4
  906. .IP \(bu 3
  907. the client, optionally, adds the fingerprint field. This may be also
  908. a tricky procedure, described in section 15.5 of the same document.
  909. WebRTC usually uses fingerprinted TURN messages.
  910. .IP \(bu 3
  911. the TURN server receives the request, reads the username.
  912. .IP \(bu 3
  913. then the TURN server checks that the nonce and the realm in the request
  914. are the valid ones.
  915. .IP \(bu 3
  916. then the TURN server calculates the key.
  917. .IP \(bu 3
  918. then the TURN server calculates the integrity field.
  919. .IP \(bu 3
  920. then the TURN server compares the calculated integrity field with the
  921. received one \- they must be the same. If the integrity fields differ,
  922. then the request is rejected.
  923. .RE
  924. .PP
  925. In subsequent communications, the client may go with exactly the same
  926. sequence, but for optimization usually the client, having already
  927. information about realm and nonce, pre\-calculates the integrity string
  928. for each request, so that the 401 error response becomes unnecessary.
  929. The TURN server may use "\fB\-\-stale\-nonce\fP" option for extra security: in
  930. some time, the nonce expires and the client will obtain 438 error response
  931. with the new nonce, and the client will have to start using the new nonce.
  932. .PP
  933. In subsequent communications, the sever and the client will always assume
  934. the same password \- the original password becomes the session parameter and
  935. is never expiring. So the password is not changing while the session is valid
  936. and unexpired. So, if the session is properly maintained, it may go forever,
  937. even if the user password has been already changed (in the database). The
  938. session simply is using the old password. Once the session got disconnected,
  939. the client will have to use the new password to re\-connect (if the password
  940. has been changed).
  941. .PP
  942. An example when a new shared secret is generated every hour by the TURN server
  943. box and then supplied to the web server, remotely, is provided in the script
  944. examples/scripts/restapi/shared_secret_maintainer.pl .
  945. .PP
  946. A very important thing is that the nonce must be totally random and it must be
  947. different for different clients and different sessions.
  948. .PP
  949. ===================================
  950. .SH DATABASES
  951. For the user database, the \fIturnserver\fP has the following \fIoptions\fP:
  952. .IP 1) 4
  953. Users can be set in the command line, with multiple \fB\-u\fP or \fB\-\-user\fP \fIoptions\fP.
  954. Obviously, only a few users can be set that way, and their credentials are fixed
  955. for the \fIturnserver\fP process lifetime.
  956. .IP 2) 4
  957. Users can be stored in SQLite DB. The default SQLite database file is /var/db/turndb.
  958. .IP 3) 4
  959. Users can be stored in PostgreSQL database, if the \fIturnserver\fP was compiled with PostgreSQL
  960. support. Each time \fIturnserver\fP checks user credentials, it reads the database (asynchronously,
  961. of course, so that the current flow of packets is not delayed in any way), so any change in the
  962. database content is immediately visible by the \fIturnserver\fP. This is the way if you need the
  963. best scalability. The schema for the database can be found in schema.sql file.
  964. For long\-term credentials, you have to set the "keys" for the users; the "keys" are generated
  965. by the \fIturnadmin\fP utility. For the key generation, you need username, password and the realm.
  966. All users in the database must use the same realm value; if down the road you will decide
  967. to change the realm name, then you will have to re\-generate all user keys (that can be done
  968. in a batch script). If you are using short\-term credentials, then you use open passwords
  969. in the database; you will have to make sure that nobody can access the database outside of
  970. the TURN server box. See the file turndb/testsqldbsetup.sql as an example.
  971. .IP 4) 4
  972. The same is true for MySQL database. The same schema file is applicable.
  973. The same considerations are applicable.
  974. .IP 5) 4
  975. The same is true for the Redis database, but the Redis database has aa different schema \-
  976. it can be found (in the form of explanation) in schema.userdb.redis.
  977. Also, in Redis you can store both "keys" and open passwords (for long term credentials) \-
  978. the "open password" option is less secure but more convenient for low\-security environments.
  979. For short\-term credentials, you will use open passwords only. See the file
  980. turndb/testredisdbsetup.sh as an example.
  981. .IP 6) 4
  982. If a database is used, then users can be divided into multiple independent realms. Each realm
  983. can be administered separately, and each realm can have its own set of users and its own
  984. performance \fIoptions\fP (max\-bps, user\-quota, total\-quota).
  985. .IP 7) 4
  986. If you use MongoDB, the database will be setup for you automatically.
  987. .IP 8) 4
  988. Of course, the \fIturnserver\fP can be used in non\-secure mode, when users are allowed to establish
  989. sessions anonymously. But in most cases (like WebRTC) that will not work.
  990. .PP
  991. For the status and statistics database, there are two choices:
  992. .IP 1) 4
  993. The simplest choice is not to use it. Do not set \fB\-\-redis\-statsdb\fP option, and this functionality
  994. will be simply ignored.
  995. .IP 2) 4
  996. If you choose to use it, then set the \fB\-\-redis\-statsdb\fP option. This may be the same database
  997. as in \fB\-\-redis\-userdb\fP option, or it may be a different database. You may want to use different
  998. database for security or convenience reasons. Also, you can use different database management
  999. systems for the user database and for the ststus and statistics database. For example, you can use
  1000. MySQL as the user database, and you can use redis for the statistics. Or you can use Redis for both.
  1001. .PP
  1002. So, we have 6 choices for the user management, and 2 choices for the statistics management. These
  1003. two are totally independent. So, you have overall 6*2=12 ways to handle persistent information,
  1004. choose any for your convenience.
  1005. .PP
  1006. You do not have to handle the database information "manually" \- the \fIturnadmin\fP program can handle
  1007. everything for you. For PostgreSQL and MySQL you will just have to create an empty database
  1008. with schema.sql SQL script. With Redis, you do not have to do even that \- just run \fIturnadmin\fP and
  1009. it will set the users for you (see the \fIturnadmin\fP manuals).
  1010. .PP
  1011. =================================
  1012. .SH LIBRARIES
  1013. In the lib/ sub\-directory the build process will create TURN client messaging library.
  1014. In the include/ sub\-directory, the necessary include files will be placed.
  1015. The C++ wrapper for the messaging functionality is located in TurnMsgLib.h header.
  1016. An example of C++ code can be found in stunclient.c file.
  1017. .PP
  1018. =================================
  1019. .SH DOCS
  1020. After installation, run the command:
  1021. .PP
  1022. $ man \fIturnserver\fP
  1023. .PP
  1024. or in the project root directory:
  1025. .PP
  1026. $ man \fB\-M\fP man \fIturnserver\fP
  1027. .PP
  1028. to see the man page.
  1029. .PP
  1030. In the docs/html subdirectory of the original archive tree, you will find the client library
  1031. reference. After the installation, it will be placed in PREFIX/share/doc/\fIturnserver\fP/html.
  1032. .PP
  1033. =================================
  1034. .SH LOGS
  1035. When the \fBTURN Server\fP starts, it makes efforts to create a log file turn_<pid>.log
  1036. in the following directories:
  1037. .RS
  1038. .IP \(bu 3
  1039. /var/log
  1040. .IP \(bu 3
  1041. /log/
  1042. .IP \(bu 3
  1043. /var/tmp
  1044. .IP \(bu 3
  1045. /tmp
  1046. .IP \(bu 3
  1047. current directory
  1048. .RE
  1049. .PP
  1050. If all efforts failed (due to the system permission settings) then all
  1051. log messages are sent only to the standard output of the process.
  1052. .PP
  1053. This behavior can be controlled by \fB\-\-log\-file\fP, \fB\-\-syslog\fP and \fB\-\-no\-stdout\-log\fP \fIoptions\fP.
  1054. .PP
  1055. =================================
  1056. .SH TELNET CLI
  1057. The \fIturnserver\fP process provides a telnet CLI access as statistics and basic management
  1058. interface. By default, the \fIturnserver\fP starts a telnet CLI listener on IP 127.0.0.1 and
  1059. port 5766. That can be changed by the command\-cline \fIoptions\fP of the \fIturnserver\fP process
  1060. (see \fB\-\-cli\-ip\fP and \fB\-\-cli\-port\fP \fIoptions\fP). The full list of telnet CLI commands is provided
  1061. in "help" command output in the telnet CLI.
  1062. .PP
  1063. =================================
  1064. .SH CLUSTERS
  1065. \fBTURN Server\fP can be a part of the cluster installation. But, to support the "even port" functionality
  1066. (RTP/RTCP streams pairs) the client requests from a particular IP must be delivered to the same
  1067. \fBTURN Server\fP instance, so it requires some networking setup massaging for the cluster. The reason is that
  1068. the RTP and RTCP relaying endpoints must be allocated on the same relay IP. It would be possible
  1069. to design a scheme with the application\-level requests forwarding (and we may do that later) but
  1070. it would affect the performance.
  1071. .PP
  1072. =================================
  1073. .SH FILES
  1074. /etc/turnserver.conf
  1075. .PP
  1076. /var/db/turndb
  1077. .PP
  1078. /usr/local/etc/turnserver.conf
  1079. .PP
  1080. =================================
  1081. .SH DIRECTORIES
  1082. /usr/local/share/\fIturnserver\fP
  1083. .PP
  1084. /usr/local/share/doc/\fIturnserver\fP
  1085. .PP
  1086. /usr/local/share/examples/\fIturnserver\fP
  1087. .PP
  1088. =================================
  1089. .SH STANDARDS
  1090. obsolete STUN RFC 3489
  1091. .PP
  1092. new STUN RFC 5389
  1093. .PP
  1094. TURN RFC 5766
  1095. .PP
  1096. TURN\-TCP extension RFC 6062
  1097. .PP
  1098. TURN IPv6 extension RFC 6156
  1099. .PP
  1100. STUN/TURN test vectors RFC 5769
  1101. .PP
  1102. STUN NAT behavior discovery RFC 5780
  1103. .PP
  1104. =================================
  1105. .SH SEE ALSO
  1106. \fIturnadmin\fP, \fIturnutils\fP
  1107. .RE
  1108. .PP
  1109. ======================================
  1110. .SS WEB RESOURCES
  1111. project page:
  1112. .PP
  1113. http://code.google.com/p/coturn/
  1114. .PP
  1115. Wiki page:
  1116. .PP
  1117. http://code.google.com/p/coturn/wiki/Readme
  1118. .PP
  1119. forum:
  1120. .PP
  1121. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server
  1122. .PP
  1123. ======================================
  1124. .SS AUTHORS
  1125. Oleg Moskalenko <[email protected]>
  1126. .PP
  1127. Gabor Kovesdan http://kovesdan.org/
  1128. .PP
  1129. Daniel Pocock http://danielpocock.com/
  1130. .PP
  1131. John Selbie ([email protected])
  1132. .PP
  1133. Lee Sylvester <[email protected]>
  1134. .PP
  1135. Erik Johnston <[email protected]>
  1136. .PP
  1137. Roman Lisagor <[email protected]>
  1138. .PP
  1139. Vladimir Tsanev <[email protected]>
  1140. .PP
  1141. Po\-sheng Lin <[email protected]>
  1142. .PP
  1143. Peter Dunkley <[email protected]>
  1144. .PP
  1145. Mutsutoshi Yoshimoto <[email protected]>
  1146. .PP
  1147. Federico Pinna <[email protected]>
  1148. .PP
  1149. Bradley T. Hughes <[email protected]>