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

DNSServer does not Answer request from Ubuntu 17.04 #3357

Closed
littleyoda opened this issue Jun 16, 2017 · 1 comment
Closed

DNSServer does not Answer request from Ubuntu 17.04 #3357

littleyoda opened this issue Jun 16, 2017 · 1 comment

Comments

@littleyoda
Copy link

Basic Infos

Hardware

Hardware: NodeMCU 1.0
Core Version: 2.3.0

Description

DNSServer does not work together with Ubuntu 17.04

	std::unique_ptr<DNSServer> dnsServer;
	dnsServer.reset(new DNSServer());
	dnsServer->start(53, "*", WiFi.softAPIP());

I connected a Ubuntu 17.04 System and a Android Handy to the NodeMCU in AP Mode.

If I'm using the Android System, every thing is fine. I will forwarded to the Webserver running on the ESP8266, as soon as I access a random website.

If I'm using the Ubuntu 17.04 System, I get only a Host not Found error Message.

ping example.com
ping: example.com: Name or service not known

I digged into the DNSServer.cpp and removing the following condition in line 62 helps.

requestIncludesOnlyOneQuestion() &&

But I don't think that this is the right solution. I don't have any experience with DNS so I'm not able to fix this problem in reasonable time.

I used Wireshark to log the DNS-Request from Ubuntu.

Wireshark

Hexdump of the request

0000000 5e cf 7f dc 40 2c 58 fb 84 43 fc 65 08 00 45 00
0000020 00 5b 31 f1 40 00 40 11 7f 4d c0 a8 04 02 c0 a8
0000040 04 01 c1 35 00 35 00 47 a2 f1 da 6a 01 00 00 01
0000060 00 00 00 00 00 01 03 77 77 77 05 68 65 69 73 65
0000100 02 64 65 00 00 01 00 01 00 00 29 10 00 00 00 80
0000120 00 00 16 00 05 00 06 05 07 08 0a 0d 0e 00 06 00
0000140 03 01 02 04 00 07 00 01 01

Wiresharks interpretation:

Frame 3: 105 bytes on wire (840 bits), 105 bytes captured (840 bits) on interface 0
Ethernet II, Src: IntelCor_43:fc:65 (58:fb:84:43:fc:65), Dst: 5e:cf:7f:dc:40:2c (5e:cf:7f:dc:40:2c)
Internet Protocol Version 4, Src: 192.168.4.2, Dst: 192.168.4.1
User Datagram Protocol, Src Port: 49461, Dst Port: 53
Domain Name System (query)
    [Response In: 4]
    Transaction ID: 0xda6a
    Flags: 0x0100 Standard query
        0... .... .... .... = Response: Message is a query
        .000 0... .... .... = Opcode: Standard query (0)
        .... ..0. .... .... = Truncated: Message is not truncated
        .... ...1 .... .... = Recursion desired: Do query recursively
        .... .... .0.. .... = Z: reserved (0)
        .... .... ...0 .... = Non-authenticated data: Unacceptable
    Questions: 1
    Answer RRs: 0
    Authority RRs: 0
    Additional RRs: 1
    Queries
        www.heise.de: type A, class IN
            Name: www.heise.de
            [Name Length: 12]
            [Label Count: 3]
            Type: A (Host Address) (1)
            Class: IN (0x0001)
    Additional records
        <Root>: type OPT
            Name: <Root>
            Type: OPT (41)
            UDP payload size: 4096
            Higher bits in extended RCODE: 0x00
            EDNS0 version: 0
            Z: 0x8000
            Data length: 22
            Option: DAU - DNSSEC Algorithm Understood (RFC6975)
            Option: DHU - DS Hash Understood (RFC6975)
            Option: N3U - NSEC3 Hash Understood (RFC6975)
@earlephilhower
Copy link
Collaborator

Closed via #5573. Ubntu 17.04 is way out of support, but if you do find a current version isn't working please open a new issue to track.

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

2 participants