问题原文
原帖链接 · asdsadasdmes.1qwrnewkbjrkwj · CC BY-SA 3.0
I have set up my /etc/bind to set up the following:
dig @127.0.0.1 +noall +answer SRV _my-sub._tcp.example.com
_my-sub._tcp.example.com. 300 IN SRV 0 0 12379 a0.example.com.
_my-sub._tcp.example.com. 300 IN SRV 0 0 22379 a1.example.com.
_my-sub._tcp.example.com. 300 IN SRV 0 0 32379 a2.example.com.
dig @127.0.0.1 +noall +answer a0.example.com a1.example.com a2.example.com
a0.example.com. 300 IN A 127.0.0.1
a1.example.com. 300 IN A 127.0.0.1
a2.example.com. 300 IN A 127.0.0.1
And now I want to edit my /etc/resolv.conf to get the same results without @127.0.0.1. How do I overwrite resolv.conf to achieve this?
Thanks!
dig +noall +answer a0.example.com a1.example.com a2.example.com
Should return:
a0.example.com. 300 IN A 127.0.0.1
a1.example.com. 300 IN A 127.0.0.1
a2.example.com. 300 IN A 127.0.0.1
已采纳解答
原帖链接 · user9517 · CC BY-SA 3.0
You can either remove all nameserver references from your resolv.conf or you can add a specific
nameserver 127.0.0.1
to your file. Note that if you add multiple nameserver entries they are tried in the order they are defined. Note also that the maximum is currently three.
You should probably read the documentation, resolv.conf(5).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
