Solution to the problem of machine name becomes "bogon" in Mac

Virtual DNS is the reason caused this problem.

What is the meaning of "bogon"? "bogon" means the type of IP addresses that should not appear in a traceroute, like a reserved IP address. The DNS server can give your machine a host name, this function should be turned off for public DNS servers. Since the machine uses a router, so it has a IP like 192.168.0.x in LAN, this IP will be sent to the DNS server for a reverse lookup, and since it is a reserved IP address, the DNS server returns a hostname as, thus, changes the machine's hostname.

Solution:

1 sudo hostname your-desired-host-name
2 sudo scutil --set LocalHostName $(hostname)
3 sudo scutil --set HostName $(hostname)


阅读更多
文章标签: Mac bogon terminal
个人分类: Linux
下一篇网络限制解决方案
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭