dog
dog copied to clipboard
`Name or service not known` Error when querying a DoH service at a non-standard port.
- The version of dog being used (
dog --version
)
dog ● command-line DNS client
v0.1.0
https://dns.lookup.dog/
// I actually built dog from the latest source code. https://github.com/ogham/dog/commit/d2d22fd8a4ba79027b5e2013d4ded3743dad5262
- The command-line arguments you are using
DOG_DEBUG=trace dog -q example.com -H --nameserver="https://1.0.0.1:443/dns-query" --time
- Your operating system and hardware platform
Linux x86_64
# DOG_DEBUG=trace dog -q example.com -H --nameserver="https://1.0.0.1:443/dns-query" --time
[INFO dog] Running with options -> Options {
requests: RequestGenerator {
inputs: Inputs {
domains: [
Labels {
segments: [
(
7,
"example",
),
(
3,
"com",
),
],
},
],
types: [
1,
],
classes: [
IN,
],
resolvers: [
Specified(
"https://1.0.0.1:443/dns-query",
),
],
transport_types: [
HTTPS,
],
},
txid_generator: Random,
edns: SendAndHide,
protocol_tweaks: ProtocolTweaks {
set_authoritative_flag: false,
set_authentic_flag: false,
set_checking_disabled_flag: false,
udp_payload_size: None,
},
},
measure_time: true,
format: Text(
Automatic,
TextFormat {
format_durations: true,
},
),
}
[INFO dns_transport::https] Opening TLS socket to "1.0.0.1:443"
Error [network]: failed to lookup address information: Name or service not known
Ran in 5ms
Only works if we do not specific port here:
# dog -q example.com -H --nameserver="https://1.0.0.1/dns-query" --time
A example.com. 19h16m23s 93.184.216.34
Ran in 717ms
Seems this issue is related to https://github.com/ogham/dog/issues/15
Sadly the DoH service I would like to test does not serve on 443 port. I have to specify the port someway.
I see you found issue #15 :) Like I said there, eschewing --port
was done on purpose but turned out to be a bad idea. Thanks for the detailed report.
Hi @ogham , I think that "port in doh" is different from the "--port in query" of #15 .
For the doh situation, if i want to test my self-hosted doh server that deployed on a non-stand port other than 443
For example
both dog -T @8.8.8.8 google.com
and dog -T @8.8.8.8:53 google.com
and even dog -T @8.8.8.8:666 google.com
is fine.
But dog -H @https://8.8.8.8/dns-query google.com
will work, while dog -H @https://8.8.8.8:443/dns-query google.com
wont