Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yarrick opened this issue Aug 16, 2021 · 2 comments
Open

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

yarrick opened this issue Aug 16, 2021 · 2 comments

Comments

@yarrick
Copy link
Owner

yarrick commented Aug 16, 2021

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
@yarrick
Copy link
Owner Author

yarrick commented Aug 16, 2021

As shown in the log, adding -4 to the client does not help, because that only switches the communication to the first DNS server to IPv4. That server then continues with IPv6 to the iodine server.

@yarrick yarrick changed the title Improve raw login from v4 network against v6-capable server Improve raw login from v4-only network against v6-capable server Aug 16, 2021
@yarrick
Copy link
Owner Author

yarrick commented Aug 5, 2022

The server could look up its own address (just like how relaying nameservers find it). But due to wildcard support for domain names (since 95fde8b) it needs to be done on the fly instead of once at start-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant