1

I am using the service OpenNIC for my DNS. This works fine. However, when using OpenNIC I am unable to connect to local domains.

Example:

$ ssh example.com

Works!

$ ssh my-computer.local

No longer works!

I can confirm that when I reset my DNS to the defaults my local domains resolve.

How do I setup my DNS to resolve internal domains correctly while still using OpenNIC for all external connections? What would be the correct way to do this to prevent leaking DNS requests?

1
  • Do not use .local to name your machines. It will clash with mDNS. Use any registered domain name as suffix. Jan 4, 2019 at 20:38

3 Answers 3

1

The order of the nameservers you have configured in the resolv.conf file should dictate your resolution process. Also check the /etc/nsswitch.conf file where you can alter the behavior of the lookup process.

1
  • "The order of the nameservers you have configured in the resolv.conf file should dictate your resolution process. " That is not true. They are used as fallbacks, only if no reply is obtained, not as second query if first query result was NXDOMAIN. Jan 4, 2019 at 20:40
0

The router provides DNS at 192.168.0.1.

I have changed my DNS to include this and made it number one in order. I then added a search domain.

# Generated by NetworkManager
search domain
nameserver 192.168.0.1
nameserver xx.xx.xx.xxx
nameserver xx.xx.xx.xxx

This resolves my issue.

The search domain adds .domain to the end of any domain on my local network that does not end in a tld.

Example -

http://example -> http://example.domain

0

Your first problem is that you're using an alternate root - so you're effectively limiting your ability to use these names only amongst the tiny Internet population that also use the alternate root you've chosen.

1
  • OpenNIC provides the full internet at large but also INCLUDES access to their own TLD group. The local domains were not available because I was not checking with my own router first. Sep 26, 2018 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .