I have a DNS server configured but the hostname is failing to resolve. I keep getting these error when running host:

[root@ns1 ~]# host hostname
Host hostname not found: 5(REFUSED)

And I also get bad command output after I run hostname -f:

[root@ns1 ~]# hostname -f
/etc/host.conf: line 1: bad command ` ns1.suretelcom.co.ug hostname'

What could be my error?


It looks like you're putting content that should be in /etc/hosts into /etc/host.conf.

Your syntax looks ok, so if you get the right content into the right files, I think you'll get the results you expect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.