What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Need help configuring NextDNS

I deleted my previous post because after looking at the source code it's more nuanced than I wrote. But at the end of the day the end result is probably the same.

Heh. I was just about to point out the same, after looking at the source..

In wanduck.c, do_dns_detect function:

Code:
/* Return values:

    -1: error or disable

     0: dns probe has failed

     1: dns probe ok

*/

...

    /* Check for valid domain to avoid shell escaping */

    if (!is_valid_domainname(host) || *content == '\0')

        return -1;


So invalid hostname should return false, not "probe ok". However digging further, is_valid_domainname:

Code:
int is_valid_domainname(const char *name)
{
    const char *p;
    int c;

    if (!name)
        return 0;

    for (p = name; (c = *p); p++) {
        if (((c | 0x20) < 'a' || (c | 0x20) > 'z') &&
            ((c < '0' || c > '9')) &&
            (c != '.' && c != '-' && c != '_'))
            return 0;
    }

    return p - name;
}

This just checks that domainname has only alphanumeric characters or dot, hyphen or underscore.. 8.8.8.8 will pass the test.

Then it looks like the code just carries on asking DNS about 8.8.8.8. Querying DNS about IP address might be stupid but it is not an error, and it will test that connection to DNS server works.

Code:
admin@gw:/tmp/home/root# nslookup 8.8.8.8
Server:    45.90.28.153
Address 1: 45.90.28.153 dns1.nextdns.io

Name:      8.8.8.8
Address 1: 8.8.8.8 dns.google
 
Guys, I'd like to thank everyone for the tips, even if late. Now with the end of the merlin stand, I am no longer using the merlin firmware, I have the fresh tomato installed. Using the nextdns in it is a bit more annoying to configure, but it is easy, here's the link how to configure for those who are interested.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top