gnunet-nat.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 interact with the NAT service
  30. .Sh SYNOPSIS
  31. .Nm
  32. .Op Fl b Ar ADDRESS | Fl -bind= Ns Ar ADDRESS
  33. .Op Fl c Ar FILENAME | Fl -config= Ns Ar FILENAME
  34. .Op Fl e Ar ADDRESS | Fl -external= Ns Ar ADDRESS
  35. .Op Fl i Ar ADDRESS | Fl -in= Ns Ar ADDRESS
  36. .Op Fl r Ar ADDRESS | Fl -remote= Ns Ar ADDRESS
  37. .Op Fl S Ar NAME | Fl -section= Ns Ar NAME
  38. .Op Fl s | -stun
  39. .Op Fl t | -tcp
  40. .Op Fl u | -udp
  41. .Op Fl W | -watch
  42. .Sh DESCRIPTION
  43. This tool allows testing various NAT traversal functions, as well as attempting auto-configuration.
  44. .Sh OPTIONS
  45. .Bl -tag -width indent
  46. .It Fl b Ar ADDRESS | Fl -bind= Ns Ar ADDRESS
  47. Assume that the service is (locally) bound to ADDRESS.
  48. .It Fl c Ar FILENAME | Fl -config= Ns Ar FILENAME
  49. Use the configuration file FILENAME.
  50. .It Fl e Ar ADDRESS | Fl -external= Ns Ar ADDRESS
  51. Assume that ADDRESS is the globally visible address of the peer.
  52. .It Fl i Ar ADDRESS | Fl -in= Ns Ar ADDRESS
  53. Assuming we are listening at ADDRESS for connection reversal requests.
  54. .It Fl r Ar ADDRESS | Fl -remote= Ns Ar ADDRESS
  55. Ask the peer at ADDRESS for connection reversal, using the local address for the target address of the reversal.
  56. .It Fl S Ar NAME | Fl -section= Ns Ar NAME
  57. Name of section in configuration file to use for additional options.
  58. .It Fl s | -stun
  59. Enable processing of STUN requests.
  60. Will try to read UDP packets from the bind address and handle the packets if they are STUN packets.
  61. Will only work with UDP.
  62. .It Fl t | -tcp
  63. Use TCP.
  64. .It Fl u | -udp
  65. Use UDP.
  66. .It Fl W | -watch
  67. Watch for connection reversal requests.
  68. .El
  69. .Sh EXAMPLES
  70. .Ss Basic examples
  71. .Pp
  72. .Dl # gnunet-nat -i 0.0.0.0:8080 -u
  73. .Pp
  74. We are bound to "0.0.0.0:8080" on UDP and want to obtain all applicable IP addresses.
  75. .Pp
  76. .Dl # gnunet-nat -i '[::0]':8080 -t
  77. .Pp
  78. We are bound to "::0" on port 8080 on TCP and want to obtain all applicable IP addresses.
  79. .Pp
  80. .Dl # gnunet-nat -i 127.0.0.1:8080 -u
  81. .Pp
  82. We are bound to "127.0.0.1:8080" on UDP and want to obtain all applicable IP addresses:
  83. .Ss ICMP-based NAT traversal
  84. .Pp
  85. .Dl # gnunet-nat -Wt -i 192.168.178.12:8080
  86. .Pp
  87. Watch for connection reversal request (you must be bound to NAT range or to wildcard, 0.0.0.0), only works for IPv4:
  88. .Pp
  89. .Dl # gnunet-nat -t -r 1.2.3.4:8080 -i 2.3.4.5:8080
  90. .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):
  91. .Pp
  92. .Dl # gnunet-nat -t -r 1.2.3.4:8080 -i 0.0.0.0:8080
  93. .Pp
  94. 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:
  95. .Ss Manual hole punching
  96. .Pp
  97. .Dl # gnunet-nat -t -p AUTO:8080
  98. .Pp
  99. Assume manually punched NAT, but determine external IP automatically:
  100. .Ss STUN-based XXX:
  101. .Pp
  102. .Dl # gnunet-nat FIXME -s
  103. .Pp
  104. XXX
  105. .Sh SEE ALSO
  106. .Xr gnunet-transport 1
  107. .sp
  108. The full documentation for gnunet is maintained as a Texinfo manual.
  109. If the
  110. .Xr info 1
  111. and gnunet programs are properly installed at your site, the command
  112. .Pp
  113. .Dl info gnunet
  114. .Pp
  115. should give you access to the complete handbook,
  116. .Pp
  117. .Dl info gnunet-c-tutorial
  118. .Pp
  119. will give you access to a tutorial for developers.
  120. .sp
  121. Depending on your installation, this information is also available in
  122. .Xr gnunet 7 and
  123. .Xr gnunet-c-tutorial 7 .
  124. .\".Sh HISTORY
  125. .\".Sh AUTHORS
  126. .Sh BUGS
  127. Report bugs by using
  128. .Lk https://bugs.gnunet.org
  129. or by sending electronic mail to
  130. .Aq Mt gnunet-developers@gnu.org .