Giter Club home page Giter Club logo

iodine's Introduction

This is a piece of software that lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed.

COMPILING

Iodine has no configure script. There are two optional features for Linux (SELinux and systemd support) that will be enabled automatically if the relevant header files are found in /usr/include. (See script at ./src/osflags)

Run make to compile the server and client binaries. Run make install to copy binaries and manpage to the destination directory. Run make test to compile and run the unit tests. (Requires the check library)

QUICKSTART

Try it out within your own LAN! Follow these simple steps:

  • On your server, run: ./iodined -f 10.0.0.1 test.com. If you already use the 10.0.0.0 network, use another internal net like 172.16.0.0.
  • Enter a password.
  • On the client, run: ./iodine -f -r 192.168.0.1 test.com. Replace 192.168.0.1 with your server's ip address.
  • Enter the same password.
  • Now the client has the tunnel ip 10.0.0.2 and the server has 10.0.0.1.
  • Try pinging each other through the tunnel.
  • Done! :)

To actually use it through a relaying nameserver, see below.

HOW TO USE

Note: server and client are required to speak the exact same protocol. In most cases, this means running the same iodine version. Unfortunately, implementing backward and forward protocol compatibility is usually not feasible.

Server side

To use this tunnel, you need control over a real domain (like mydomain.com), and a server with a public IP address to run iodined on. If this server already runs a DNS program, change its listening port and then use iodined's -b option to let iodined forward the DNS requests. (Note that this procedure is not advised in production environments, because iodined's DNS forwarding is not completely transparent, for example zone transfers will not work.) Alternatively you can forward the subdomain from your DNS server to iodined which must then run on a different port (-p).

Then, delegate a subdomain (say, t1.mydomain.com) to the iodined server. If you use BIND for your domain, add two lines like these to the zone file:

t1		IN	NS	t1ns.mydomain.com.		; note the dot!
t1ns		IN	A	10.15.213.99

The NS line is all that's needed to route queries for the t1 subdomain to the t1ns server. We use a short name for the subdomain, to keep as much space as possible available for the data traffic. At the end of the NS line is the name of your iodined server. This can be any name, pointing anywhere, but in this case it's easily kept in the same zone file. It must be a name (not an IP address), and that name itself must have an A record (not a CNAME).

If your iodined server has a dynamic IP, use a dynamic DNS provider. Simply point the NS line to it, and leave the A line out:

t1		IN	NS	myname.mydyndnsprovider.com.	; note the dot!

Then reload or restart your nameserver program. Now any DNS queries for domains ending in t1.mydomain.com will be sent to your iodined server.

Finally start iodined on your server. The first argument is the IP address inside the tunnel, which can be from any range that you don't use yet (for example 192.168.99.1), and the second argument is the assigned domain (in this case t1.mydomain.com). Using the -f option will keep iodined running in the foreground, which helps when testing. iodined will open a virtual interface ("tun device"), and will also start listening for DNS queries on UDP port 53. Either enter a password on the commandline (-P pass) or after the server has started. Now everything is ready for the client.

If there is a chance you'll be using an iodine tunnel from unexpected environments, start iodined with a -c option. Resulting commandline in this example situation:

./iodined -f -c -P secretpassword 192.168.99.1 t1.mydomain.com

Client side

All the setup is done, just start iodine. It takes one or two arguments, the first is the local relaying DNS server (optional) and the second is the domain you used (t1.mydomain.com). If you don't specify the first argument, the system's current DNS setting will be consulted.

If DNS queries are allowed to any computer, you can directly give the iodined server's address as first argument (in the example: t1ns.mydomain.com or 10.15.213.99). In that case, it may also happen that any traffic is allowed to the DNS port (53 UDP) of any computer. Iodine will detect this, and switch to raw UDP tunneling if possible. To force DNS tunneling in any case, use the -r option (especially useful when testing within your own network).

The client's tunnel interface will get an IP close to the server's (in this case 192.168.99.2 or .3 etc.) and a suitable MTU. Enter the same password as on the server either as commandline option or after the client has started. Using the -f option will keep the iodine client running in the foreground.

Resulting commandline in this example situation, adding -r forces DNS tunneling even if raw UDP tunneling would be possible:

./iodine -f -P secretpassword t1.mydomain.com

From either side, you should now be able to ping the IP address on the other end of the tunnel. In this case, ping 192.168.99.1 from the iodine client, and 192.168.99.2 from the iodine server.

MISC. INFO

IPv6

The data inside the tunnel is IPv4 only.

The server listens to both IPv4 and IPv6 for incoming requests by default. Use options -4 or -6 to only listen on one protocol. Raw mode will be attempted on the same protocol as used for the login.

The client can use IPv4 or IPv6 nameservers to connect to iodined. The relay nameservers will translate between protocols automatically if needed. Use options -4 or -6 to force the client to use a specific IP version for its DNS queries.

If your server is listening on IPv6 and is reachable, add an AAAA record for it to your DNS setup. Extending the example above would look like this:

t1		IN	NS	t1ns.mydomain.com.		; note the dot!
t1ns		IN	A	10.15.213.99
t1ns		IN	AAAA	2001:db8::1001:99

Routing

It is possible to route all traffic through the DNS tunnel. To do this, first add a host route to the nameserver used by iodine over the wired/wireless interface with the default gateway as gateway. Then replace the default gateway with the iodined server's IP address inside the DNS tunnel, and configure the server to do NAT.

However, note that the tunneled data traffic is not encrypted at all, and can be read and changed by external parties relatively easily. For maximum security, run a VPN through the DNS tunnel (=double tunneling), or use secure shell (SSH) access, possibly with port forwarding. The latter can also be used for web browsing, when you run a web proxy (for example Privoxy) on your server.

Testing

The iodined server replies to NS requests sent for subdomains of the tunnel domain. If your iodined subdomain is t1.mydomain.com, send a NS request for foo123.t1.mydomain.com to see if the delegation works. dig is a good tool for this:

% dig -t NS foo123.t1.mydomain.com
ns.io.citronna.de.

Also, the iodined server will answer requests starting with 'z' for any of the supported request types, for example:

dig -t TXT z456.t1.mydomain.com
dig -t SRV z456.t1.mydomain.com
dig -t CNAME z456.t1.mydomain.com

The reply should look like garbled text in all these cases.

Mac OS X

On Mac OS X 10.6 and later, iodine supports the native utun devices built into the OS - use -d utunX.

Operational info

The DNS-response fragment size is normally autoprobed to get maximum bandwidth. To force a specific value (and speed things up), use the -m option.

The DNS hostnames are normally used up to their maximum length, 255 characters. Some DNS relays have been found that answer full-length queries rather unreliably, giving widely varying (and mostly very bad) results of the fragment size autoprobe on repeated tries. In these cases, use the -M switch to reduce the DNS hostname length to, for example 200 characters, which makes these DNS relays much more stable. This is also useful on some “de-optimizing” DNS relays that stuff the response with two full copies of the query, leaving very little space for downstream data (also not capable of EDNS0). The -M switch can trade some upstream bandwidth for downstream bandwidth. Note that the minimum -M value is about 100, since the protocol can split packets (1200 bytes max) in only 16 fragments, requiring at least 75 real data bytes per fragment.

The upstream data is sent gzipped encoded with Base32; or Base64 if the relay server supports mixed case and + in domain names; or Base64u if _ is supported instead; or Base128 if high-byte-value characters are supported. This upstream encoding is autodetected. The DNS protocol allows one query per packet, and one query can be max 256 chars. Each domain name part can be max 63 chars. So your domain name and subdomain should be as short as possible to allow maximum upstream throughput.

Several DNS request types are supported, with the NULL and PRIVATE types expected to provide the largest downstream bandwidth. The PRIVATE type uses value 65399 in the private-use range. Other available types are TXT, SRV, MX, CNAME and A (returning CNAME), in decreasing bandwidth order. Normally the “best” request type is autodetected and used. However, DNS relays may impose limits on for example NULL and TXT, making SRV or MX actually the best choice. This is not autodetected, but can be forced using the -T option. It is advisable to try various alternatives especially when the autodetected request type provides a downstream fragment size of less than 200 bytes.

Note that SRV, MX and A (returning CNAME) queries may/will cause additional lookups by "smart" caching nameservers to get an actual IP address, which may either slow down or fail completely.

DNS responses for non-NULL/PRIVATE queries can be encoded with the same set of codecs as upstream data. This is normally also autodetected, but no fully exhaustive tests are done, so some problems may not be noticed when selecting more advanced codecs. In that case, you'll see failures/corruption in the fragment size autoprobe. In particular, several DNS relays have been found that change replies returning hostnames (SRV, MX, CNAME, A) to lowercase only when that hostname exceeds ca. 180 characters. In these and similar cases, use the -O option to try other downstream codecs; Base32 should always work.

Normal operation now is for the server to not answer a DNS request until the next DNS request has come in, a.k.a. being “lazy”. This way, the server will always have a DNS request handy when new downstream data has to be sent. This greatly improves (interactive) performance and latency, and allows to slow down the quiescent ping requests to 4 second intervals by default, and possibly much slower. In fact, the main purpose of the pings now is to force a reply to the previous ping, and prevent DNS server timeouts (usually at least 5-10 seconds per RFC1035). Some DNS servers are more impatient and will give SERVFAIL errors (timeouts) in periods without tunneled data traffic. All data should still get through in these cases, but iodine will reduce the ping interval to 1 second anyway (-I1) to reduce the number of error messages. This may not help for very impatient DNS relays like dnsadvantage.com (ultradns), which time out in 1 second or even less. Yet data will still get trough, and you can ignore the SERVFAIL errors.

If you are running on a local network without any DNS server in-between, try -I 50 (iodine and iodined close the connection after 60 seconds of silence). The only time you'll notice a slowdown, is when DNS reply packets go missing; the iodined server then has to wait for a new ping to re-send the data. You can speed this up by generating some upstream traffic (keypress, ping). If this happens often, check your network for bottlenecks and/or run with -I1.

The delayed answering in lazy mode will cause some “carrier grade” commercial DNS relays to repeatedly re-send the same DNS query to the iodined server. If the DNS relay is actually implemented as a pool of parallel servers, duplicate requests may even arrive from multiple sources. This effect will only be visible in the network traffic at the iodined server, and will not affect the client's connection. Iodined will notice these duplicates, and send the same answer (when its time has come) to both the original query and the latest duplicate. After that, the full answer is cached for a short while. Delayed duplicates that arrive at the server even later, get a reply that the iodine client will ignore (if it ever arrives there).

If you have problems, try inspecting the traffic with network monitoring tools like tcpdump or ethereal/wireshark, and make sure that the relaying DNS server has not cached the response. A cached error message could mean that you started the client before the server. The -D (and -DD) option on the server can also show received and sent queries.

TIPS & TRICKS

If your port 53 is taken on a specific interface by an application that does not use it, use -p on iodined to specify an alternate port (like -p 5353) and use for instance iptables (on Linux) to forward the traffic:

iptables -t nat -A PREROUTING -i eth0 -p udp --dport 53 -j DNAT --to :5353

(Sent in by Tom Schouten)

Iodined will reject data from clients that have not been active (data/pings) for more than 60 seconds. Similarly, iodine will exit when no downstream data has been received for 60 seconds. In case of a long network outage or similar, just restart iodine (re-login), possibly multiple times until you get your old IP address back. Once that's done, just wait a while, and you'll eventually see the tunneled TCP traffic continue to flow from where it left off before the outage.

With the introduction of the downstream packet queue in the server, its memory usage has increased with several megabytes in the default configuration. For use in low-memory environments (e.g. running on your DSL router), you can decrease USERS and undefine OUTPACKETQ_LEN in user.h without any ill conse- quence, assuming at most one client will be connected at any time. A small DNSCACHE_LEN is still advised, preferably 2 or higher, however you can also undefine it to save a few more kilobytes.

One iodine server can handle multiple domains. Set up different NS records on the same domain all pointing to the same host, and use a wildcard at the start of the topdomain argument (example *.mydomain.com). iodine will accept tunnel traffic for all domains matching that pattern. The wildcard has to be at the start of the topdomain argument and be followed by a dot.

PERFORMANCE

This section tabulates some performance measurements. To view properly, use a fixed-width font like Courier.

Measurements were done in protocol 00000502 in lazy mode; upstream encoding always Base128; iodine -M255; iodined -m1130. Network conditions were not extremely favorable; results are not benchmarks but a realistic indication of real-world performance that can be expected in similar situations.

Upstream/downstream throughput was measured by scp'ing a file previously read from /dev/urandom (i.e. incompressible), and measuring size with ls -l ; sleep 30 ; ls -l on a separate non-tunneled connection. Given the large scp block size of 16 kB, this gives a resolution of 4.3 kbit/s, which explains why some values are exactly equal. Ping round-trip times measured with ping -c100, presented are average rtt and mean deviation (indicating spread around the average), in milliseconds.

Situation 1: Laptop -> Wifi AP -> Home server -> DSL provider -> Datacenter

 iodine    DNS "relay"        bind9           DNS cache        iodined

                        downstr.  upstream downstr.  ping-up       ping-down
                        fragsize   kbit/s   kbit/s  avg +/-mdev   avg +/-mdev
-----------------------------------------------------------------------------

iodine -> Wifi AP :53
  -Tnull (= -Oraw)           982    43.6    131.0   28.0    4.6   26.8    3.4

iodine -> Home server :53
  -Tnull (= -Oraw)          1174    48.0    305.8   26.6    5.0   26.9    8.4

iodine -> DSL provider :53
  -Tnull (= -Oraw)          1174    56.7    367.0   20.6    3.1   21.2    4.4
  -Ttxt -Obase32             730    56.7    174.7*
  -Ttxt -Obase64             874    56.7    174.7
  -Ttxt -Obase128           1018    56.7    174.7
  -Ttxt -Oraw               1162    56.7    358.2
  -Tsrv -Obase128            910    56.7    174.7
  -Tcname -Obase32           151    56.7     43.6
  -Tcname -Obase128          212    56.7     52.4

iodine -> DSL provider :53
  wired (no Wifi) -Tnull    1174    74.2    585.4   20.2    5.6   19.6    3.4

 [174.7* : these all have 2frag/packet]

Situation 2: Laptop -> Wifi+vpn / wired -> Home server

 iodine                            iodined

                        downstr.  upstream downstr.  ping-up       ping-down
                        fragsize   kbit/s   kbit/s  avg +/-mdev   avg +/-mdev
-----------------------------------------------------------------------------

wifi + openvpn  -Tnull      1186   166.0   1022.3    6.3    1.3    6.6    1.6

wired  -Tnull               1186   677.2   2464.1    1.3    0.2    1.3    0.1

Notes

Performance is strongly coupled to low ping times, as iodine requires confirmation for every data fragment before moving on to the next. Allowing multiple fragments in-flight like TCP could possibly increase performance, but it would likely cause serious overload for the intermediary DNS servers. The current protocol scales performance with DNS responsivity, since the DNS servers are on average handling at most one DNS request per client.

PORTABILITY

iodine has been tested on Linux (arm, ia64, x86, AMD64 and SPARC64), FreeBSD (ia64, x86), OpenBSD (x86), NetBSD (x86), MacOS X (ppc and x86, with http://tuntaposx.sourceforge.net/). and Windows (with OpenVPN TAP32 driver, see win32 readme file). It should be easy to port to other unix-like systems that have TUN/TAP tunneling support. Let us know if you get it to run on other platforms.

THE NAME

The name iodine was chosen since it starts with IOD (IP Over DNS) and since iodine has atomic number 53, which happens to be the DNS port number.

THANKS

  • To kuxien for FreeBSD and OS X testing
  • To poplix for code audit

AUTHORS & LICENSE

Copyright (c) 2006-2014 Erik Ekman [email protected], 2006-2009 Bjorn Andersson [email protected]. Also major contributions by Anne Bezemer.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

MD5 implementation by L. Peter Deutsch (license and source in src/md5.[ch]) Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.

iodine's People

Contributors

chengzhicn avatar cpatulea avatar deep-42-thought avatar doronbehar avatar endomandi avatar ffontaine avatar fuzion24 avatar gregoa avatar hakankvist avatar jedisct1 avatar jesultra avatar johnazoidberg avatar jwyllie83 avatar l29ah avatar lcapello avatar lenawil avatar lexa avatar masaq- avatar mmuman avatar mscherer avatar mxb78 avatar nbraud avatar nilsirl avatar ppergame avatar rofl0r avatar rralf avatar spmzt avatar vincentbernat avatar yarrick avatar zx2c4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iodine's Issues

Bad IPv6 adress to listen on

iodined: Bad IPv6 address to listen on: '(null)'

I got this issue when trying to run: iodined -f . It returned the error Bad Ipv6 adress to listen on. While trying to find out why i got this issue, i commented out the if statement that is responsible for returning this error. I got the following error: socket: Address family not supported by protocol.

I' m afraid it might have something to do with the configuration of my VPS, but I have no idea what would cause it. If anyone can help with this, that would be great :)

I realized some specific hostnames will be blocked by the firewall

Ex.
From the client side, if I send a DNS query like this

dig @8.8.8.8 vaaaakaxhiu.mysubdomain.com

will be blocked, while this query

dig @8.8.8.8 abcdefghijk.mysubdomain.com

I spent tons of time finding out about this issue.
Just record in case other people encounter this issue

I launch iodined like this:

./iodined -DD -n <my public IP> -f 10.100.99.1 -c -P 0930100010 b.mysubdomain.com
Debug level 2 enabled, will stay in foreground.
Add more -D switches to set higher debug level.
iodined: IPv6 not supported, skipping
Opened dns0
Setting IP of dns0 to 10.100.99.1
Setting MTU of dns0 to 1130
Opened IPv4 UDP socket
Listening to dns for domain b.mysubdomain.com
RX: client 173.194.93.2, type 1, name abcdefghijk.b.mysubdomain.com
TX: client 173.194.93.2, type 1, name abcdefghijk.b.mysubdomain.com, 5 bytes data

Connectivity errors between two linux machines

I'm trying to connect two linux machine via dns tunneling. I've setup duckdns dynamic dns subdomain i.e. crappyhorse.duckdns.org on the server machine, and i also registered a free domain name at freenom with the current dns configuration. The command i issue at the server is

$ sudo iodined -f -c -P justphrase 192.168.99.1 t.vodafonegenericavail.cf
Opened dns0
Setting IP of dns0 to 192.168.1.7
Setting MTU of dns0 to 1130
Opened IPv4 UDP socket
Listening to dns for domain t.vodafonegenericavail.cf

$ sudo iodine -f -P justphrase t.vodafonegenericavail.cf
Opened dns0
Opened IPv4 UDP socket
Sending DNS queries for t.vodafonegenericavail.cf to 127.0.0.53
Autodetecting DNS query type (use -T to override).iodine: Got NOTIMP as reply: server does not support our request
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NOTIMP as reply: server does not support our request
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NOTIMP as reply: server does not support our request
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist
.iodine: Got NXDOMAIN as reply: domain does not exist

iodine: No suitable DNS query type found. Are you connected to a network?
iodine: If you expect very long roundtrip delays, use -T explicitly.
iodine: (Also, connecting to an "ancient" version of iodined won't work.)

$ dig t.vodafonegenericavail.cf

; <<>> DiG 9.16.1-Ubuntu <<>> t.vodafonegenericavail.cf
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27729
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;t.vodafonegenericavail.cf.	IN	A

;; ANSWER SECTION:
t.vodafonegenericavail.cf. 3600	IN	CNAME	dnsrecord.vodafonegenericavail.cf.
dnsrecord.vodafonegenericavail.cf. 3599	IN CNAME crappyhorse.duckdns.org.
crappyhorse.duckdns.org. 59	IN	A	41.36.193.3

;; Query time: 219 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Mar 15 15:02:53 EET 2022
;; MSG SIZE  rcvd: 131

The output of https://code.kryo.se/iodine

Troubleshoot your iodine setup

Analyzing DNS setup for tunnel domain 't.vodafonegenericavail.cf'... (might take some time)

Looking for nameserver for vodafonegenericavail.cf.. got ns04.freenom.com (at 104.155.29.241).
Resolving delegation of t.vodafonegenericavail.cf at 104.155.29.241... not known.

Error: The tunnel name t.vodafonegenericavail.cf is not delegated to any host according to nameserver ns04.freenom.com.

I'm currently incapable of getting my head around what's the culprit of the problem or wrong with this setup. Any ideas ?

Support more than one top domain name to be used with a daemon

Hello.

I'd like to build a small fleet of highly available (hehe) iodined using several domain names, would it be possible to let iodined support more than one top domain names at the same time? Or even better if it will just work with any top domain names regardless of what they are.

Thank you.

Bind to interface instead of IP address?

I'm running iodine daemon on OpenWRT (Linux 4.14)
Having a dynamic WAN IP, I'd find it great if iodined could listen on any IP, but only on a specific interface (WAN).

The current way of binding to 0.0.0.0 on any interface messes with my other DNS services.

Obviously I should (and will continue to try to) get a script hooked on an IP change on the WAN interface, that would then restart iodioned with the new address in the -l parameter (but apparently I'm too stupid for that).

Simpler DNS ? Or...

Excuse me, I found a DNS just connect by importing a simple address like Google DNS, cloud flare DNS it can import on a router.
Mobile, pc...
There's 3 questions:
Can your DNS be work similar dns in up
If (question in top = true)
Q1={How can I config this(your DNS) in my vps }
Type (Q1)
Else:
Q2={how can I config similar first DNS I typed in top}
Q1.List.append{Q2}
Type (Q1)
Excuse me for bad English .
Thanks for your help and time from now.
And it's can be very better if you create a simple setup script because everyone can use it

Raw UDP socket support in macos/ios

Hello,

am I the only one who cannot get raw mode working on macOS / iOS?

Same setup, a linux and even a windows box can connect to raw socket but macos says test failed and goes through DNS queries (with a huge performance penalty).
It's curious to see that a linux VM running on my macbook can make the socket connection, while once again the host cannot.

Is there any limitation in place by Apple or maybe it's just about setting up the socket in a different way?

I'm sorry I cannot help you with the code but I can be a tester here 😁

Brew support

I see a small mention about brew in a yaml file and an old brew package elsewhere on the internet. But has anyone looked at making a recent iodine recipie for brew?

I haven’t created any brew packages before so if nobody else is, I wouldn’t mind creating one for iodine.

Can forward Ip traffic tcp-udp over iodine ?

Hi Dear I run iodine tunnel on ubuntu 18.0.4 Tunnel Establish and have ping interface of tunnel
Nat ip range in iodine server and route to client side
in client donnot have ping by ip range route t the client

please help me

Cannot `make` on macOS

Hi, I'm on MacOS 11.4 (Big Sur) (M1) and I can't compile iodine.

I get the following error:

iodine % make
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
^Cmake[47]: *** [all] Interrupt: 2
make[46]: *** [all] Error 130
make[45]: *** [all] Error 130
make[44]: *** [all] Error 130
make[43]: *** [all] Error 130
make[42]: *** [all] Error 130
make[41]: *** [all] Error 130
make[40]: *** [all] Error 130
make[39]: *** [all] Error 130
make[38]: *** [all] Error 130
make[37]: *** [all] Error 130
make[36]: *** [all] Error 130
make[35]: *** [all] Error 130
make[34]: *** [all] Error 130
make[33]: *** [all] Error 130
make[32]: *** [all] Error 130
make[31]: *** [all] Error 130
make[30]: *** [all] Error 130
make[29]: *** [all] Error 130
make[28]: *** [all] Error 130
make[27]: *** [all] Error 130
make[26]: *** [all] Error 130
make[25]: *** [all] Error 130
make[24]: *** [all] Error 130
make[23]: *** [all] Error 130
make[22]: *** [all] Error 130
make[21]: *** [all] Error 130
make[20]: *** [all] Error 130
make[19]: *** [all] Error 130
make[18]: *** [all] Error 130
make[17]: *** [all] Error 130
make[16]: *** [all] Error 130
make[15]: *** [all] Error 130
make[14]: *** [all] Error 130
make[13]: *** [all] Error 130
make[12]: *** [all] Error 130
make[11]: *** [all] Error 130
make[10]: *** [all] Error 130
make[9]: *** [all] Error 130
make[8]: *** [all] Error 130
make[7]: *** [all] Error 130
make[6]: *** [all] Error 130
make[5]: *** [all] Error 130
make[4]: *** [all] Error 130
make[3]: *** [all] Error 130
make[2]: *** [all] Error 130
make[1]: *** [all] Error 130
make: *** [all] Error 130

I'm not sure where to look for what could be causing the issue.

Slow speeds while doing DNS tunnelling

Hi,

I am using 0.7.0 from iodine, the host is a quite powerful aarch64 machine running Fedora and its not on the same network, not even so close (within EU borders, but in two different countries), but I get an average ping of 48 ms without the tunnel which is quite decent. Raw mode is disabled and lazy mode is enabled.

I am getting speeds of ~20 kbit/s and that's where it caps out. I tried lowering the -m value which didn't help much, but made it even slower. I was thinking it could be the bottleneck of the DNS resolver, but I can reproduce the same issue using 1.1.1.1 or any other public resolver from my unrestricted gigabit home network.

I also tried running dnsperf and hammered my DNS resolver with 10k reqs over 10 seconds and they all went thru except like 16 reqs. I was trying to request the same thing what iodine tried as well, a single TXT query. I can see that the network interface is actually under good use and there is around 4 Mb/s traffic on it. If I try running iodine and the benchmark at the same time, the benchmark seems to run fine with also not many failed reqs, however iodine is slow as usual.

In the stdout output I am seeing some SERVFAIL: server failed or recursion timeout and NXDOIMAIN: domain doesn't exist errors from time to time.

Can I do something about these? Seemingly I don't get as many errors from iodine if its in legacy mode, but then its even slower.

Thank you so much

Cannot make on Android 12

I'm using Samsung S10, Android 12, Termux (latest from f-droid)

This is what I get when I make:

make[1]: Entering directory '/data/data/com.termux/files/home/iodine/src'
OS is LINUX, arch is aarch64
CC common.c
common.c:61:12: error: static declaration of 'daemon' follows non-static declaration
static int daemon(int nochdir, int noclose)
^
/data/data/com.termux/files/usr/include/unistd.h:343:5: note: previous declaration is here
int daemon(int __no_chdir, int __no_close);

Is the problem that it thinks OS is LINUX, rather than ANDROID?

Choose which interface to use?

Hi, I'm more than anything just having some fun learning about this stuff. But I'm wondering if it's at all possible to choose which interface this uses. My reasoning is that en0 is wired ethernet and I'd like to connect to a wifi signal and have a connection available just as an "in case" the main internet goes down.

When is the next release?

I see a lot of work put into iodine after the latest 0.7.0 release (which is 7 years ago). iodine commits newer than 0.7.0 release fix opening utunX devices on Darwin. I'd really like the fix to appear on a release.

Donated servers?

Hello, I just found out that my LTE operator passes DNS requests with ~30kbytes/s, and I think this is not the limit.
I found android package AndIodine, but I can't find any servers, I know maybe it's nerve-wracking question, but since I don't have any knowledge on Linux could you create a place for devs to contribute their iodine configurations for community?
Thanks, also you could reach me at nuzzle[at]duck.com

External IP deduction doesn't work

Hi! The source code tries to resolve external IP of server by using API of api.externalip.net which is no longer available. It is no problem to replace it with another service's URL. But why do it at all? Why can't we use DNS to find out NS record responsible for the given domain and then retrive A record for it? I cannot figure out the case where external IP doesn't match the IP in A-record for the nameserver. Do you?

Version bump

The latest version is 0.7.0 and was released on 2014-06-16. I see there's been quite a lot of commits since that time.

Does it make sense to bump the version so that the new features gets included in the distributions packaging the project?

iodine connection will not work

Hi,
command on server

sudo iodined -f -c -P PRIVATE10.1.1.1 iodine.adridoesthings.com

command on client (windows)

iodine.exe -f -P PRIVATE iodine.adridoesthings.com

dns (cloudflare):
image

My problem is that the client tell me this:

Opening device \\.\Global\{E7A18040-6E0C-49E0-BE8C-5B9B1D47FC34}.tap
Opened UDP socket
Opened UDP socket
Opened UDP socket
You use protocol v 0x0063ed54, server uses v 0x00000000. Giving up

The server doesn't print anything out after it's startet up.

This is the DNS response (got with wireshark):
image

I hope you can help me.

Performance increase with socks on server

Hello there,

I recently have setup iodine similarly to situation 1 from the description in the readme. The performance was not the best but worked out for most of my needs - as always. I usually use a SSH Tunnel from iodine-client to iodine-server with the -D socks tunnel option, but this time I changed it up a bit.

I also have a VPN-client from nordvpn with sockd running on the server. So I passed -L7777:[sockd_Listening_IP]:port instead of -D7777 to the ssh command - just forwarding the traffic to the remote sockd on the server side instead of using the builtin socks proxy. The speed difference is truly amazing. I tested it at 30-40 MBit/s up- and download speed.

I verified it several times and the speed seemed to be limited only by the connection speed of my VPN provider. The documentation on the project site states, that speed should be limited at 1MBit/s, so now I'm wondering, if this is normal behaviour or special circumstance.

can't bring up tunnel through Fedora (36) bind-9.16.27

I'm trying to bring up an iodine tunnel from a client through a vanilla-configured cache running on Fedora 36. The cache config file is:

# /etc/named/named.conf
options {
    listen-on port 53 { any; };
    allow-query { any; };
    recursion yes;
    dnssec-validation no;
    querylog yes;
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";
};

logging {
    channel default_debug {
        file "data/named.run";
        severity dynamic;
    };
};

zone "." IN {
    type hint;
    file "named.ca";
};

I'm starting the server using

iodined -P foobar 192.168.14.1 -DD -f test.com

and the client using

iodine -r -P foobar test.com

The symptom I'm observing is that the cache introduces a huge (around 5 second) delay into the forwarding of some of the client-generated queries (e.g. raacdMAj..., which I think are part of the downstream path fragment size negotiation).

What I'm seeing is that the client gives up on progressively smaller attempted downstream path fragment sizes, until it fails entirely. A few seconds later, the cache starts sending a bunch of the wrongfully-delayed client-generated queries to the server, which immediately replies to them, and the cache then logs them as query failed (timed out) in its /var/named/data/named.run log file.

This all used to work perfectly well back when Fedora used named-9.11.*, and building the old rpm packages of named-9.11 for Fedora-36 and downgrading to them there gets it working perfectly well, so I suspect the problem is a bug (or weird new configuration default) in bind-9.16.*.

I understand this does not appear to be a problem with iodine itself, but rather with bind-9.16.*, but figured if anyone would know or care, or notice the problem, they'd be more likely to be found here than on some Fedora or bind-9 mailing list :)

Any clue on what might be going on much appreciated -- thanks!

Do not panic if not root

Hello.

Given the systemd (or a similar system manager) is available, it should be possible to run iodined with very restricted privileges and on behalf of a non-root user (even a dynamically generated one), granting additional capabilities via AmbientCapabilities=. Hence, unconditional panic in check_superuser() should be avoided. So, instead of calling check_superuser(), at least on Linux, there should be a check against required capability (there's libcap-ng for this). For creating a tun device it'd be CAP_NET_ADMIN, for binding on port 53 it's CAP_NET_BIND_SERVICE, for changing the user it is CAP_SETUID and CAP_SETGID.

Thanks.

DNS tunnel transmission rate is very low

Hi, Yarrick:

My iodine server is centos7, currently running iodine and squid services normally, the server's virtual network card IP address is 172.16.255.254; The Win7 client installs the openvpn virtual network card and sets the browser proxy to 172.16.255.254:3128, the web page can be opened normally, and can watch 1080p video smoothly. Win7 client test ping 172.16.255.254 successfully, the average delay is about 150ms.

I currently encounter a problem as follows:

This iodine server and Win7 iodine client are very slow to transmit data through the virtual network card, FTP transfers about 60MB of data, it takes at least 1 hour.

What direction should this problem be investigated?

Does iodine work on Mac OS X 10.15.6?

I see the following error on Mac OS X 10.15.6. Does iodine support Mac OS X? Thanks.

$ sudo ./iodined -f 10.0.0.1 test.com
Enter password: 
iodined: open_tun: Failed to open tunneling device: No such file or directory

Getting "Segmentation fault: 11" on MacOS Catalina

Hello, I've tried using iodine on MacOS Catalina and I'm getting a segfault error:

kbs@touchbar:~/git/iodine$ /usr/local/sbin/iodine -f -P pelado tunnel.peladonerd.com
iodine: Run as root and you'll be happy.
kbs@touchbar:~/git/iodine$ sudo /usr/local/sbin/iodine -f -P pelado tunnel.peladonerd.com
Segmentation fault: 11

The installation steps went well:

kbs@touchbar:~/git/iodine$ make
OS is DARWIN, arch is x86_64
kbs@touchbar:~/git/iodine$ make install
OS is DARWIN, arch is x86_64
mkdir -p /usr/local/sbin
install  bin/iodine /usr/local/sbin/iodine
chmod 755 /usr/local/sbin/iodine
install  bin/iodined /usr/local/sbin/iodined
chmod 755 /usr/local/sbin/iodined
mkdir -p /usr/local/share/man/man8
install  man/iodine.8 /usr/local/share/man/man8/iodine.8
chmod 644 /usr/local/share/man/man8/iodine.8
mkdir -p /usr/local/share/doc/iodine
install  README.md /usr/local/share/doc/iodine/README.md
chmod 644 /usr/local/share/doc/iodine/README.md

Any ideas?

What does "raw UDP login" mean in this project?

sudo ./bin/iodine -f xxxxx xxxxx
Enter tunnel password:
No tun devices found, trying utun
iodine: open_utun: connect: Resource busy
Opened utun1
Opened IPv4 UDP socket
Sending DNS queries for xxxxx to xxxxxx
Autodetecting DNS query type (use -T to override).
Using DNS type NULL queries
Version ok, both using protocol v 0x00000502. You are user #1
Setting IP of utun1 to 10.0.0.3
Adding route 10.0.0.0/27 to 10.0.0.3
add net 10.0.0.0: gateway 10.0.0.3
Setting MTU of utun1 to 1130
Server tunnel IP is 10.0.0.1
Requesting server address to attempt raw UDP mode (skip with -r)
Server is at xxxxx, trying raw login: (skip with -r) ....failed

and the code:

iodine/src/client.c

Lines 1489 to 1520 in dc307b7

for (i = 0; running && i < 4; i++) {
tv.tv_sec = i + 1;
tv.tv_usec = 0;
send_raw_udp_login(dns_fd, seed);
FD_ZERO(&fds);
FD_SET(dns_fd, &fds);
r = select(dns_fd + 1, &fds, NULL, NULL, &tv);
if (r > 0) {
/* recv() needed for windows, dont change to read() */
len = recv(dns_fd, in, sizeof(in), 0);
if (len >= (16 + RAW_HDR_LEN)) {
char hash[16];
login_calculate(hash, 16, password, seed - 1);
if (memcmp(in, raw_header, RAW_HDR_IDENT_LEN) == 0
&& RAW_HDR_GET_CMD(in) == RAW_HDR_CMD_LOGIN
&& memcmp(&in[RAW_HDR_LEN], hash, sizeof(hash)) == 0) {
fprintf(stderr, "OK\n");
return 1;
}
}
}
fprintf(stderr, ".");
fflush(stderr);
}
fprintf(stderr, "failed\n");
return 0;

But I could not understand the semantic of "raw UDP login"
Would you mind explaining it in the README?

Issue and fix for failed systemd startup at boot.

I encountered an issue with the systemd service failing to start and then failing to restart too fast. It appears that systemd, by default, attempts 5 times to restart and then quits. After the following changes I was able to get iodined.service to start up. (A little digging showed that my server needed 7 failures... just over the 5 that systemd permits by default.)

Here is the Unit file I got to work:

[Unit]
Description=A daemon for tunneling traffic over DNS queries
After=local-fs.target network.target systemd-tmpfiles-setup.service
Documentation=man:iodined(8)

[Service]
EnvironmentFile=/etc/default/iodine
ExecStart=/usr/sbin/iodined -f -u iodine -t /var/run/iodine $IODINED_ARGS -P ${IODINED_PASSWORD}
StartLimitIntervalSec=120
StartLimitBurst=120
Restart=on-failure
Type=simple

[Install]
WantedBy=multi-user.target

The only real difference is the StartLimit* lines. I think the only one that matters is the StartLimitBurst one but I've left both in there since it works consistently.

If it matters, I'm in a VM of Ubuntu 20.04 Desktop (gnome) with no modifications (basically a bare bones Ubuntu desktop install).

Issue with TAP version 9.0.0.21 on Windows

Iodine is not compatible with TAP 9.0.0.21 on Windows 10
File: tap0901.sys
Version: 9.0.0.21
Productversion: 9.21.1 9/21

Connection between client-server gets established without any error message BUT ping from client to server is not working (and vice-versa). Tunnel is not working.
Reason for connection issue/ not working tunnel is not visible.

( It is working with TAP version 9.0.0.9)

Domain in binary format even when not set.

Hello,
I tried to setup iodine, everything seems working. However when I try to check what domains are coming to the server, they all appear to be in binary format. I've started the client to not run in binary format. I'd like to know if it is possible to make the client query domains which container only ascii characters allowed in the domain name? I've tried using -O with different encoding but still in tcpdump I saw binary domains like so:
zwchaA0123456789M-<M-=M->[email protected]

Command to start the client:
iodine -r -f -P password 111.111.111.111 t.iodine.com

iodine fails to find new OpenVPN TAP adapter on Windows

The Windows OpenVPN installer (OpenVPN-2.5.6-I601-amd64.msi) now creates a TAP interface with a root-enumerated hardware ID (ComponentId = root\tap0901). Iodine (tun.c) only looks for legacy hardware IDs (e.g. ComponentId = tap0901), even if a device name is provided (-d).

Please update the registry device enumeration section to match: tap0801, tap0901, and root\tap0901.

Also: there are several malformed warnx statements in tun.c.
e.g.: warnx("Error opening registry key " TAP_ADAPTER_KEY);
should be: warnx("Error (%d) opening registry key: %s", status, TAP_ADAPTER_KEY);

Improve raw login from v4-only network against v6-capable server

If the client only has IPv4 available, and the server has both IPv4 and IPv6, raw login can be attempted on IPv6 anyway if the DNS servers in use prefer it.

It works this way since the server does not always know its addresses (if listen addresses are not set). The server should respond with addresses for both protocols (guessing its address if required) to allow the client to try either one.

$ sudo ./bin/iodine -f4    dns.tun
Enter tunnel password: 
Opened dns0
Opened IPv4 UDP socket
Sending DNS queries for dns.tun to 127.0.0.53
Autodetecting DNS query type (use -T to override).iodine: ..
Using DNS type TXT queries
Version ok, both using protocol v 0x00000502. You are user #1
Setting IP of dns0 to 10.4.5.3
Setting MTU of dns0 to 1130
Server tunnel IP is 10.4.5.1
Requesting server address to attempt raw UDP mode (skip with -r) 
Server is at 2001:db8::1, trying raw login: (skip with -r) ....failed

Failed to set IP and MTU

Hi, i recently tried to use iodine to do tcp over dns and i got Failed to set IP and MTU in client

ip: 169.254.110.0 <--- i used this ip in server instead off 10.0.0.1

didn't work :/ why .??

i'm using windows and tap driver is installed

iodine shutdown

Hi dear Friend I see this in CLI and tunnel is down

iodine: No downstream data received in 60 seconds, shutting down

How solve this ???

lazy-mode doesn't work on cloudflare

On the server:

sudo iodined -f 172.16.0.0 freumh.org

On the client:

$ sudo iodine -f -r 1.1.1.1 freumh.org
Enter password:
Opened dns0
Opened IPv4 UDP socket
Sending DNS queries for freumh.org to 1.1.1.1
Autodetecting DNS query type (use -T to override).
Using DNS type NULL queries
Version ok, both using protocol v 0x00000502. You are user #2
Setting IP of dns0 to 172.16.0.3
Setting MTU of dns0 to 1130
Server tunnel IP is 172.16.0.0
Skipping raw mode
Using EDNS0 extension
Switching upstream to codec Base128
Server switched upstream to codec Base128
No alternative downstream codec available, using default (Raw)
Switching to lazy mode for low-latency
Server switched to lazy mode
Autoprobing max downstream fragment size... (skip with -m fragsize)
768 ok.. ...1152 not ok.. ...960 not ok.. ...864 not ok.. ..816 ok.. .840 ok.. .852 ok.. will use 852-2=850
Setting downstream fragment size to max 850...
Connection setup complete, transmitting data.
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 1. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 2. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 3. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 4. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: I think 5 is too many. Setting interval to 1 to hopefully reduce SERVFAILs. But just ignore them if data still comes through. (Use -I1 next time on this network.)
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
^C%

Trying -c on the server:

$ sudo iodined -c -f 172.16.0.0 freumh.org

On the client resulted in:

$ sudo iodine -f -r 1.1.1.1 freumh.org
Enter password:
Opened dns0
Opened IPv4 UDP socket
Sending DNS queries for freumh.org to 1.1.1.1
Autodetecting DNS query type (use -T to override).
Using DNS type NULL queries
Version ok, both using protocol v 0x00000502. You are user #2
Setting IP of dns0 to 172.16.0.3
Setting MTU of dns0 to 1130
Server tunnel IP is 172.16.0.0
Skipping raw mode
Using EDNS0 extension
Switching upstream to codec Base128
Server switched upstream to codec Base128
No alternative downstream codec available, using default (Raw)
Switching to lazy mode for low-latency
Server switched to lazy mode
Autoprobing max downstream fragment size... (skip with -m fragsize)
768 ok.. ...1152 not ok.. ...960 not ok.. ...864 not ok.. ..816 ok.. .840 ok.. .852 ok.. will use 852-2=850
Setting downstream fragment size to max 850...
Connection setup complete, transmitting data.
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 1. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 2. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 3. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Hmm, that's 4. Your data should still go through...
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: I think 5 is too many. Setting interval to 1 to hopefully reduce SERVFAILs. But just ignore them if data still comes through. (Use -I1 next time on this network.)
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
^C%

Trying -I1:

$ sudo iodine -f -r 1.1.1.1 freumh.org -I1
Enter password:
Opened dns0
Opened IPv4 UDP socket
Sending DNS queries for freumh.org to 1.1.1.1
Autodetecting DNS query type (use -T to override).
Using DNS type NULL queries
Version ok, both using protocol v 0x00000502. You are user #0
Setting IP of dns0 to 172.16.0.1
Setting MTU of dns0 to 1130
Server tunnel IP is 172.16.0.0
Skipping raw mode
Using EDNS0 extension
Switching upstream to codec Base128
Server switched upstream to codec Base128
No alternative downstream codec available, using default (Raw)
Switching to lazy mode for low-latency
Server switched to lazy mode
Autoprobing max downstream fragment size... (skip with -m fragsize)
...768 not ok.. ..384 ok.. ...576 not ok.. 480 ok.. 528 ok.. ...552 not ok.. ...540 not ok.. will use 528-2=526
Setting downstream fragment size to max 526...
Connection setup complete, transmitting data.
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
iodine: Got SERVFAIL as reply: server failed or recursion timeout
^C%

Some pings but through, but had up to 10 seconds of delay:

ping 172.16.0.0
PING 172.16.0.0 (172.16.0.0) 56(84) bytes of data.
64 bytes from 172.16.0.0: icmp_seq=6 ttl=64 time=10158 ms
64 bytes from 172.16.0.0: icmp_seq=12 ttl=64 time=7088 ms
64 bytes from 172.16.0.0: icmp_seq=16 ttl=64 time=3065 ms
64 bytes from 172.16.0.0: icmp_seq=25 ttl=64 time=74.3 ms
64 bytes from 172.16.0.0: icmp_seq=29 ttl=64 time=5059 ms
64 bytes from 172.16.0.0: icmp_seq=34 ttl=64 time=7180 ms
64 bytes from 172.16.0.0: icmp_seq=41 ttl=64 time=74.5 ms

I think Cloudflare's timeouts are too aggressive.

Question about project

Hi,
If anyone sees this, I am curious if the connection password is sent encrypted or hashed in any way. I realize the actual data inside the tunnel is not, but I am worried that if the connection password is viewable, my Iodine server will get connections from other people.
Thank you!

Big Sur "No tun devices found, trying utun. segmentation fault"

I'm trying to run iodine as follows:

sudo ./iodine -f -P password t1.mydomain.com

However, I get:

No tun devices found, trying utun
[1]    4469 segmentation fault sudo ./iodine -f -P password t1.mydomain.com

This happens regardless of specifying -d=utun0 (all the way through utun7, only utun0 through utun6 are shown on my ifconfig). There aren't any /dev/tunX or /dev/utunX devices showing in /dev, though I am not sure whether they should be or not.

This is using the latest master commit as of May 12th 2021 on Mac OS X Big Sur 11.3.

Tunnelblick seems to be able to create a new utun7 no problem when it creates an OVPN connection.

NS response invalid

Hello!

I launched iodined like this:

# ./iodined -f -c -P pass 10.46.34.1 ovca.ml -p 2053 -n MYIPADDRESS
ALERT! Other dns servers expect you to run on port 53.
You must manually forward port 53 to port 2053 for things to work.
Opened dns0
Setting IP of dns0 to 10.46.34.1
Setting MTU of dns0 to 1130
Opened IPv4 UDP socket
Opened IPv6 UDP socket
Listening to dns for domain ovca.ml

and then issued a dig command like this:

$ dig ovca.ml -t NS @127.0.0.1 -p 2053

; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> ovca.ml -t NS @127.0.0.1 -p 2053
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48883
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;ovca.ml.			IN	NS

;; ANSWER SECTION:
ovca.ml.		3600	IN	NS	ns.ovca.ml.

;; ADDITIONAL SECTION:
ns.ovca.ml.		3600	IN	A	2.0.0.0

;; Query time: 0 msec
;; SERVER: 127.0.0.1#2053(127.0.0.1)
;; WHEN: Wed Jul 22 23:48:56 CEST 2020
;; MSG SIZE  rcvd: 58

As far as I understand, instead of 2.0.0.0, the iodined dns server should respond with MYIPADDRESS. What's wrong and is this a bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.