4

In resolver manual, it said:

The address may optionally have a trailing dot followed by a port number.
For example, 10.0.0.17.55 specifies that
the nameserver at 10.0.0.17
uses port 55.

But it doesn't work, in /etc/resolv.conf or files under /etc/resolver/.

208.67.222.222.5353

Can I specify non-default port number for nameserver in osx?

Update:

osx don't use /etc/resolve.conf, but use files under /etc/resolver/. I have wrote a file dev with content '127.0.0.1' to route all dns queries for *.dev domains to a local dns server (127.0.0.). But I cannot specify dns server's port here. (It uses 53 anyway)

Maybe there is no way to specify port number under osx?

3
  • Sounds like OSX doesn't user /etc/resolve.conf, start looking elsewhere. Jul 1, 2013 at 2:38
  • I don't think this is a duplicate because the "duplicate" question doesn't answer this one. This is specifically about setting the DNS port and not just the IP.
    – Allison
    Nov 1, 2017 at 2:31
  • 1
    This is not a duplicate. Please re-open. The linked to answer has nothing to do with specifying a port other than 53 for a nameserver which is clearly documented in the man page unix.com/man-page/opendarwin/5/resolver which the user clearly provided. Oct 1, 2019 at 11:05

1 Answer 1

0

OSX doesn't use /etc/resolv.conf -- the information in that file is generated for your information only: it's meant to be read, not written.

See this answer here for how to modify your resolver configuration under OSX:

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