Merge branch 'master' of git+ssh://gnunet.org/gnunet
[oweals/gnunet.git] / doc / man / gnunet-nat.1
1 .TH GNUNET\-NAT 1 "27 Nov 2016" "GNUnet"
2
3 .SH NAME
4 gnunet\-nat \- interact with the NAT service
5
6 .SH SYNOPSIS
7 .B gnunet\-nat
8 .RI [ options ]
9 .br
10
11 .SH DESCRIPTION
12
13 This tool allows testing various NAT traversal functions, as well
14 as attempting auto\-configuration.
15
16 .SH OPTIONS
17
18 .B
19 .IP "\-b ADDRESS,  \-\-bind=ADDRESS"
20 Assume that the service is (locally) bound to ADDRESS.
21
22 .B
23 .IP "\-c FILENAME,  \-\-config=FILENAME"
24 Use the configuration file FILENAME.
25
26 .B
27 .IP "\-e ADDRESS,  \-\-external=ADDRESS"
28 Assume that ADDRESS is the globally visible address of the peer.
29
30 .B
31 .IP "\-i ADDRESS,  \-\-in=ADDRESS"
32 Assuming we are listening at ADDRESS for connection reversal requests.
33
34 .B
35 .IP "\-r ADDRESS,  \-\-remote=ADDRESS"
36 Ask the peer at ADDRESS for connection reversal, using the local address for the target address of the reversal.
37
38 .B
39 .IP "\-S NAME,  \-\-section=NAME"
40 Name of section in configuration file to use for additional options.
41
42 .B
43 .IP "\-s,  \-\-stun"
44 Enable processing of STUN requests.  Will try to read UDP packets from the bind address and handle the packets if they are STUN packets. Will only work with UDP.
45
46 .B
47 .IP "\-t,  \-\-tcp"
48 Use TCP.
49
50 .B
51 .IP "\-u,  \-\-udp"
52 Use UDP.
53
54 .B
55 .IP "\-W,  \-\-watch"
56 Watch for connection reversal requests.  
57
58 .SH EXAMPLES
59 .PP
60
61 \fBBasic examples\fR
62
63 We are bound to "0.0.0.0:8080" on UDP and want to obtain all applicable IP addresses:
64
65   # gnunet-nat -i 0.0.0.0:8080 -u
66
67 We are bound to "::0" on port 8080 on TCP and want to obtain all applicable IP addresses:
68
69   # gnunet-nat -i '[::0]':8080 -t
70
71 We are bound to "127.0.0.1:8080" on UDP and want to obtain all applicable IP addresses:
72
73   # gnunet-nat -i 127.0.0.1:8080 -u
74
75 \fBICMP-based NAT traversal:\fR
76
77 Watch for connection reversal request (you must be bound to NAT range or to wildcard, 0.0.0.0), only works for IPv4:
78
79   # gnunet-nat -Wt -i 192.168.178.12:8080
80
81 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):
82
83   # gnunet-nat -t -r 1.2.3.4:8080 -i 2.3.4.5:8080
84
85 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:
86
87   # gnunet-nat -t -r 1.2.3.4:8080 -i 0.0.0.0:8080 
88
89 \fBManual hole punching:\fR
90
91 Assume manually punched NAT, but determine external IP automatically:
92
93   # gnunet-nat -t -p AUTO:8080
94
95 \fBSTUN-based XXX:\fR
96
97 XXX:
98
99   # gnunet-nat FIXME -s
100
101
102 .SH BUGS
103 Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending electronic mail to <gnunet\-developers@gnu.org>
104
105 .SH SEE ALSO
106 gnunet\-transport(1)
107