Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mac domain search/resolv not working

Hello there, i would like to ask about the resolvcong, or domain search in settings. I am connecting to our servers thru vpn.


It's working well, for 1st level domain (ssh server1), but when i'm trying to connect something with subdomain (ssh server1.backup) that has CNAME (alias), it won't find it, and i get just:

ssh: Could not resolve hostname server1.backup: nodename nor servname provided, or not known


How can i make this working? In linux it's working without problem.

MacBook Pro 13″, macOS 12.1

Posted on Jan 17, 2022 3:26 AM

Reply

Similar questions

3 replies

Jan 17, 2022 4:32 AM in response to P.Potoczky

It’s a problem with your VPN and/or nameserver. You can try to hack it by stuffing in custom search domains and/or DNS servers into System Preferences > Advanced. But there are no guarantees it will work.


When you make a VPN connection, the VPN is supposed to setup its own networking. If it doesn’t do that properly, then you get a problem like this. If you try to stuff in the correct parameters, the VPN might delete them in favour of its own, incorrect, parameters. You can still override the VPN after connecting, if necessary, using the system configuration scripting tools.

Jan 18, 2022 9:02 AM in response to P.Potoczky

Your originally said "our servers" so I was thinking you had some kind of corporate VPN/network. TunnelBlick is an open source VPN. I don't know if it has those kinds of capabilities at all.


You can try to manually add a search domain in System Preferences > Network > Advanced > DNS. I don't know if it will work or if TunnelBlick will just delete it when it connects. You can also add all the servers you need to /etc/hosts.


Maybe review the documentation and configuration for TunnelBlick too. I did that very briefly and it suggests that any manually-added search domains might persist after the VPN connects. However, that documentation also mentions MacOS X Leopard. Ah, open source. 😄 There is no guarantee it will work the same way 15 years later.

Mac domain search/resolv not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.