gnunet-nat.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. .\" This file is part of GNUnet.
  2. .\" Copyright (C) 2001-2019 GNUnet e.V.
  3. .\"
  4. .\" Permission is granted to copy, distribute and/or modify this document
  5. .\" under the terms of the GNU Free Documentation License, Version 1.3 or
  6. .\" any later version published by the Free Software Foundation; with no
  7. .\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
  8. .\" copy of the license is included in the file
  9. .\" FDL-1.3.
  10. .\"
  11. .\" A copy of the license is also available from the Free Software
  12. .\" Foundation Web site at http://www.gnu.org/licenses/fdl.html}.
  13. .\"
  14. .\" Alternately, this document is also available under the General
  15. .\" Public License, version 3 or later, as published by the Free Software
  16. .\" Foundation. A copy of the license is included in the file
  17. .\" GPL3.
  18. .\"
  19. .\" A copy of the license is also available from the Free Software
  20. .\" Foundation Web site at http://www.gnu.org/licenses/gpl.html
  21. .\"
  22. .\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later
  23. .\"
  24. .Dd October 26, 2018
  25. .Dt GNUNET-NAT 1
  26. .Os
  27. .Sh NAME
  28. .Nm gnunet-nat
  29. .Nd
  30. interact with the NAT service
  31. .Sh SYNOPSIS
  32. .Nm
  33. .Op Fl b Ar ADDRESS | Fl \-bind= Ns Ar ADDRESS
  34. .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME
  35. .Op Fl e Ar ADDRESS | Fl \-external= Ns Ar ADDRESS
  36. .Op Fl i Ar ADDRESS | Fl \-in= Ns Ar ADDRESS
  37. .Op Fl r Ar ADDRESS | Fl \-remote= Ns Ar ADDRESS
  38. .Op Fl S Ar NAME | Fl \-section= Ns Ar NAME
  39. .Op Fl s | \-stun
  40. .Op Fl t | \-tcp
  41. .Op Fl u | \-udp
  42. .Op Fl W | \-watch
  43. .Sh DESCRIPTION
  44. This tool allows testing various NAT traversal functions, as well as attempting auto-configuration.
  45. .Sh OPTIONS
  46. .Bl -tag -width indent
  47. .It Fl b Ar ADDRESS | Fl \-bind= Ns Ar ADDRESS
  48. Assume that the service is (locally) bound to ADDRESS.
  49. .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME
  50. Use the configuration file FILENAME.
  51. .It Fl e Ar ADDRESS | Fl \-external= Ns Ar ADDRESS
  52. Assume that ADDRESS is the globally visible address of the peer.
  53. .It Fl i Ar ADDRESS | Fl \-in= Ns Ar ADDRESS
  54. Assuming we are listening at ADDRESS for connection reversal requests.
  55. .It Fl r Ar ADDRESS | Fl \-remote= Ns Ar ADDRESS
  56. Ask the peer at ADDRESS for connection reversal, using the local address for the target address of the reversal.
  57. .It Fl S Ar NAME | Fl \-section= Ns Ar NAME
  58. Name of section in configuration file to use for additional options.
  59. .It Fl s | \-stun
  60. Enable processing of STUN requests.
  61. Will try to read UDP packets from the bind address and handle the packets if they are STUN packets.
  62. Will only work with UDP.
  63. .It Fl t | \-tcp
  64. Use TCP.
  65. .It Fl u | \-udp
  66. Use UDP.
  67. .It Fl W | \-watch
  68. Watch for connection reversal requests.
  69. .El
  70. .Sh EXAMPLES
  71. .Ss Basic examples
  72. .Pp
  73. .Dl # gnunet-nat -i 0.0.0.0:8080 -u
  74. .Pp
  75. We are bound to "0.0.0.0:8080" on UDP and want to obtain all applicable IP addresses.
  76. .Pp
  77. .Dl # gnunet-nat -i '[::0]':8080 -t
  78. .Pp
  79. We are bound to "::0" on port 8080 on TCP and want to obtain all applicable IP addresses.
  80. .Pp
  81. .Dl # gnunet-nat -i 127.0.0.1:8080 -u
  82. .Pp
  83. We are bound to "127.0.0.1:8080" on UDP and want to obtain all applicable IP addresses:
  84. .Ss ICMP-based NAT traversal
  85. .Pp
  86. .Dl # gnunet-nat -Wt -i 192.168.178.12:8080
  87. .Pp
  88. Watch for connection reversal request (you must be bound to NAT range or to wildcard, 0.0.0.0), only works for IPv4:
  89. .Pp
  90. .Dl # gnunet-nat -t -r 1.2.3.4:8080 -i 2.3.4.5:8080
  91. .Pp Initiate connection reversal request from peer at external IPv4 address 1.2.3.4, while we are running ourselves at 2.3.4.5:8080 (must use IPv4 addresses):
  92. .Pp
  93. .Dl # gnunet-nat -t -r 1.2.3.4:8080 -i 0.0.0.0:8080
  94. .Pp
  95. Initiate connection reversal request from peer at external IPv4 address 1.2.3.4, and let the kernel fill in whatever IPv4 address we happen to have:
  96. .Ss Manual hole punching
  97. .Pp
  98. .Dl # gnunet-nat -t -p AUTO:8080
  99. .Pp
  100. Assume manually punched NAT, but determine external IP automatically:
  101. .Ss STUN-based XXX:
  102. .Pp
  103. .Dl # gnunet-nat FIXME -s
  104. .Pp
  105. XXX
  106. .Sh SEE ALSO
  107. .Xr gnunet-transport 1
  108. .sp
  109. The full documentation for gnunet is maintained as a Texinfo manual.
  110. If the
  111. .Xr info 1
  112. and gnunet programs are properly installed at your site, the command
  113. .Pp
  114. .Dl info gnunet
  115. .Pp
  116. should give you access to the complete handbook,
  117. .Pp
  118. .Dl info gnunet-c-tutorial
  119. .Pp
  120. will give you access to a tutorial for developers.
  121. .sp
  122. Depending on your installation, this information is also available in
  123. .Xr gnunet 7 and
  124. .Xr gnunet-c-tutorial 7 .
  125. .\".Sh HISTORY
  126. .\".Sh AUTHORS
  127. .Sh BUGS
  128. Report bugs by using
  129. .Lk https://bugs.gnunet.org
  130. or by sending electronic mail to
  131. .Aq Mt gnunet-developers@gnu.org .