Resolving Domain Names, configure /etc/host.conf


NethServer Version: 7.3.1611


I’m using for my NethServer same domain as my external web server.
So I defined host names with external IP-adresses, f.e. for external pop-server.
file /etc/hosts seems to be created correctly.

But if I ping to one of these servers, local host answered… - obviously the order of etc/hosts and DNS is not correct. Insertion of “order hosts,bind” in /etc/host.conf solves the problem…

My question is: is the file /etc/host.conf also modified by templates or is this the solution?

Kind regards

1 Like

Could you make some examples? I’m not sure I understand what’s happening…

It is not a template. Its manpage says it is superseded by /etc/nsswitch.conf , so I wouldn’t touch it.

Maybe it’s the fact that Nethserver thinks to be the unique mailserver of the domain and automatically create alias entries that point to itself.

Read here at the “Client Configuration” paragraph.
There are the instructions to disable the alias entries too:

config setprop postfix MxRecordStatus disabled
signal-event nethserver-hosts-update

If you have to create entires in DNS it’s prefer to use the dashboard (“DNS” voice in the left panel)


I am using f.e. as my domain.
So my server is named
I have to fetch my mails from my external pop-server with the same domain,
So I created the hosts in the dashboard - I see them also in the file /etc/hosts

But a ping answers to (local server) and not to (external).
Command host shows AND in the second row

It’s interesting that ping pop answers correct to…

Dear Saito,

thanks a lot - disabling MXRecordStatus is the solution, now ping works correct!

I’ve studied “Client Configuration”-paragraph days before, but I’ve skipped MX record as my solution - that was my fault :wink: