source: man/iodine.8 @ 72aedb

Revision 72aedb, 7.2 KB checked in by Erik Ekman <yarrick@…>, 4 years ago (diff)

Update readme and manpage

  • Property mode set to 100644
Line 
1.\" groff -man -Tascii iodine.8
2.TH IODINE 8 "JUL 2008" "User Manuals"
3.SH NAME
4iodine, iodined \- tunnel IPv4 over DNS
5.SH SYNOPSIS
6.B iodine [-v]
7
8.B iodine [-h]
9
10.B iodine [-f] [-u
11.I user
12.B ] [-P
13.I password
14.B ] [-m
15.I fragsize
16.B ] [-t
17.I chrootdir
18.B ] [-d
19.I device
20.B ] [-m
21.I fragsize
22.B ] [-z
23.I context
24.B ]
25.B [
26.I nameserver
27.B ]
28.I topdomain
29
30.B iodined [-v]
31
32.B iodined [-h]
33
34.B iodined [-c] [-s] [-f] [-D] [-u
35.I user
36.B ] [-t
37.I chrootdir
38.B ] [-d
39.I device
40.B ] [-m
41.I mtu
42.B ] [-l
43.I listen_ip
44.B ] [-p
45.I port
46.B ] [-n
47.I external ip
48.B ] [-b
49.I dnsport
50.B ] [-P
51.I password
52.B ] [-z
53.I context
54.B ]
55.I tunnel_ip
56.B [
57.I /netmask
58.B ]
59.I topdomain
60.SH DESCRIPTION
61.B iodine
62lets you tunnel IPv4 data through a DNS
63server. This can be useful in situations where Internet access is firewalled,
64but DNS queries are allowed. It needs a TUN/TAP device to operate. The
65bandwidth is asymmetrical with limited upstream and up to 1 Mbit/s downstream.
66.B iodine
67is the client application,
68.B iodined
69is the server.
70.SH OPTIONS
71.SS Common Options:
72.TP
73.B -v
74Print version info and exit.
75.TP
76.B -h
77Print usage info and exit.
78.TP
79.B -f
80Keep running in foreground.
81.TP
82.B -u user
83Drop privileges and run as user 'user' after setting up tunnel.
84.TP
85.B -t chrootdir
86Chroot to 'chrootdir' after setting up tunnel.
87.TP
88.B -d device
89Use the TUN device 'device' instead of the normal one, which is dnsX on Linux
90and otherwise tunX.
91.TP
92.B -P password
93Use 'password' to authenticate. If not used,
94.B stdin
95will be used as input. Only the first 32 characters will be used.
96.TP
97.B -z context
98Apply SELinux 'context' after initialization.
99.SS Client Options:
100.TP
101.B -m fragsize
102Maximum downstream fragsize. Not setting this will cause the client to probe
103the maximum accepted downstream packet size.
104.SS Server Options:
105.TP
106.B -c
107Disable checks on client IP on all incoming requests.
108.TP
109.B -s
110Don't try to configure IP address or MTU. This should only be used if
111you have already configured the device that will be used.
112.TP
113.B -D
114Increase debug level. Level 1 prints info about each RX/TX packet.
115.TP
116.B -m mtu
117Set 'mtu' as mtu size for the tunnel device. This will be sent to the client
118on connect, and the client will use the same mtu.
119.TP
120.B -l listen_ip
121Make the server listen only on 'listen_ip' instead of on 0.0.0.0 for incoming
122connections.
123.TP
124.B -p port
125Make the server listen on 'port' instead of 53 for traffic.
126.B Note:
127You must make sure the dns requests are forwarded to this port yourself.
128.TP
129.B -n external ip
130The IP address to return in NS responses. Default is to return the address used
131as destination in the query.
132.TP
133.B -b dnsport
134If this port is specified, all incoming requests not inside the tunnel domain
135will be forwarded to this port on localhost, to be handled by a real dns.
136.SS Client Arguments:
137.TP
138.B nameserver
139The nameserver to use to relay the dns traffic. This can be any relaying
140nameserver  or the ip number of the server running iodined if reachable.
141This argument is optional, and if not specified a nameserver will be read
142from the
143.I /etc/resolv.conf
144file.
145.TP
146.B topdomain
147The dns traffic will be sent as querys of type NULL for subdomains under
148\'topdomain'. This is normally a subdomain to a domain you own. Use a short
149domain name to get better throughput. If
150.B nameserver
151is the iodined server, then the topdomain can be chosen freely. This argument
152must be the same on both the client and the server.
153.SS Server Arguments:
154.TP
155.B tunnel_ip[/netmask]
156This is the servers ip address on the tunnel interface. The client will be
157given the next ip number in the range. It is recommended to use the
15810.0.0.0 or 172.16.0.0 ranges. The default netmask is /27, can be overriden
159by specifying it here. Using a smaller network will limit the number of
160concurrent users.
161.TP
162.B topdomain
163The dns traffic will is expected to be sent as querys of type NULL for
164subdomains under 'topdomain'. This is normally a subdomain to a domain you
165own. Use a short domain name to get better throughput. This argument must be
166the same on both the client and the server.
167.SH EXAMPLES
168.SS Quickstart:
169.TP
170Try it out within your own LAN! Follow these simple steps:
171.TP
172- On your server, run: ./iodined \-f 10.0.0.1 test.asdf
173(If you already use the 10.0.0.0 network, use another internal net like
174172.16.0.0)
175.TP
176- Enter a password
177.TP
178- On the client, run: ./iodine \-f 192.168.0.1 test.asdf
179(Replace 192.168.0.1 with the server's ip address)
180.TP
181- Enter the same password
182.TP
183- Now the client has the tunnel ip 10.0.0.2 and the server has 10.0.0.1
184.TP
185- Try pinging each other through the tunnel
186.TP
187- Done! :)
188.TP
189To actually use it through a relaying nameserver, see below.
190.SS Full setup:
191
192.TP
193.B Server side:
194To use this tunnel, you need control over a real domain (like mytunnel.com),
195and a server with a public IP number. If the server already runs a DNS
196server, change the listening port and then use the \-b option to let
197iodined forward the DNS requests. Then, delegate a subdomain
198(say, tunnel1.mytunnel.com) to the server. If you use BIND for the domain,
199add these lines to the zone file (replace 10.15.213.99 with your server ip):
200
201.nf
202tunnel1host     IN      A       10.15.213.99
203tunnel1         IN      NS      tunnel1host.mytunnel.com.
204.fi
205
206Now any DNS querys for domains ending with tunnel1.mytunnnel.com will be sent
207to your server. Start iodined on the server. The first argument is the tunnel
208IP address (like 192.168.99.1) and the second is the assigned domain (in this
209case tunnel1.mytunnel.com). The \-f argument will keep iodined running in the
210foreground, which helps when testing. iodined will start a virtual interface,
211and also start listening for DNS queries on UDP port 53. Either enter a
212password on the commandline (\-P pass) or after the server has started. Now
213everything is ready for the client.
214.TP
215.B Client side:
216All the setup is done, just start iodine. It also takes two
217arguments, the first is the local relaying DNS server and the second is the
218domain used (tunnel1.mytunnnel.com). If DNS queries are allowed to any
219computer, you can use the tunnel endpoint (example: 10.15.213.99 or
220tunnel1host.mytunnel.com) as the first argument. The tunnel interface will get
221an IP close to the servers (in this case 192.168.99.2) and a suitable MTU.
222Enter the same password as on the server either by argument or after the client
223has started. Now you should be able to ping the other end of the tunnel from
224either side. 
225.TP
226.B Routing:
227The normal case is to route all traffic through the DNS tunnel. To do this, first
228add a route to the nameserver you use with the default gateway as gateway. Then
229replace the default gateway with the servers IP address within the DNS tunnel,
230and configure the server to do NAT.
231.TP
232.B Troubleshooting:
233Use the \-D option on the server to show received and sent queries, or a
234tool like Wireshark/tcpdump. The iodined server replies to NS requests sent for
235subdomains of the tunnel domain. If your domain is tunnel.com, send a NS
236request for foo.tunnel.com to see if the delegation works. dig is a good tool
237for this: dig \-t NS foo123.tunnel.com
238.TP
239.B MTU issues:
240These issues should be solved now, with automatic fragmentation of downstream
241packets. There should be no need to set the MTU explicitly on the server.
242.SH BUGS
243File bugs at http://dev.kryo.se/iodine/
244.SH AUTHORS
245Erik Ekman <yarrick@kryo.se> and Bjorn Andersson <flex@kryo.se>
Note: See TracBrowser for help on using the repository browser.