I have a small business network with several servers on it. To simplify things, I added a BIND9 DNS server on one of them, with entries for each of the local machines, i.e. vpn.example.com, web.example.com, storage.example.com, and so on. These entries are only served to the local network. When I do an nslookup on, say, vpn.example.com, I always get the expected, valid response. However, more often than not, an attempt to SSH to that server fails, as so:
# nslookup vpn.example.com Server: 192.168.1.13 Address: 192.168.1.13#53 Non-authoritative answer: Name: vpn.example.com Address: 192.168.1.14 # ssh email@example.com (after a ~10 second pause) ssh: Could not resolve hostname vpn.example.com: Name or service not known # ssh firstname.lastname@example.org [Connects immediately]
Web requests to vpn.example.com succeed, as do connections from other applications.
This happens intermittently and seems to be tied to network or server restarts. After everything has been up for a day or two, the problem seems to go away, presumably as the client cache finally figures things out(?). I'm seeing it on my Mac and Windows machines. Any suggestions?