Resolving Domain Names, configure /etc/host.conf

,

NethServer Version: 7.3.1611

Hi,

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
Martin

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 http://docs.nethserver.org/en/v7/mail.html 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)

2 Likes

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

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

It’s interesting that ping pop answers correct to 10.10.10.10…

Dear Saito,

thanks a lot - disabling MXRecordStatus is the solution, now ping pop.domain.com works correct!

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

2 Likes