turnserver.1 42 KB

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