Thanks jlethone!
Some very valid comments and thoughts indeed! As the IP on my new (test)server is provided by DHCP, it would just take whatever the DHCP server supplies. Very likely.
So I changed the settings of the IP into manual settings with same IP number (102.168.1.221) and the address of the router as gateway. I did not gave an DNS address, but to search the domain “hartings.se”
FYI:
[root@server named]# more /etc/resolv.conf
# Generated by NetworkManager
search hartings.se
[root@server named]#
which is good, but is perhaps not used as you say?
So with the manual IP settings on the new “server” I now get:
[root@server named]# nslookup hartings.se
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: hartings.se
Address: 192.168.1.221
[root@server named]#
which is correct! So named is working as it should on the new server!
The old active DNS server still provides the same output: it points to the outside world, when named is not running in this machine:
[root@server1 data]# nslookup hartings.se
Server: 213.80.98.2
Address: 213.80.98.2#53
Non-authoritative answer:
Name: hartings.se
Address: 158.174.119.71
[root@server1 data]#
Why is this server not pointing to the new local DNS server?. I checked /etc/resolv.conf:
[root@server1 data]# more /etc/resolv.conf
# Generated by NetworkManager
search hartings.se
nameserver 192.168.1.94
nameserver 213.80.98.2
nameserver 213.80.101.3
[root@server1 data]#
so this is pointing to the outside world, as 192.168.1.94 is not active (named not running on this machine just now).
If I would change the network settings, to get the lines with nameserver in the file /etc/resolv.conf removed and leave search in hartings.se there, it should find the new local DNS server? Is that correct?
I should probably use the settings from the old DNS server (as shown in /etc/resolv.conf) in the new one (and change 192.168.1.94 to 192.168.1.221), for instance using nmcli ? Correct?
Need to go now, but will test tomorrow!
Any other comments/thoughts?
Many thanks for putting me on the right track!