EDIT HOSTS does not work on clients

I have 2 IPFire boxes, 1 on each side of a VPN.

I have a couple of nodes where they need to contact another node via the pc name.
I have resolved this by manually makings changes to the hosts file on each client.
Windows clients…

But now I have a node where this is not an option, so I need to set this elsewhere.
I have read that using IPFire as local dns and making the settings in “Network - Edit hosts” could do the trick.
And it seems to work on the IPFire box, here I can ping the client using “ping test” instead of “ping 192.168.1.3”, but on the clients it does not work.
The clients is set up using static IPs and the IPFire box as the only DNS.

Can anyone tell me what I’m missing?

I have found a comment about a missing line in /etc/unbound.conf to /etc/unbound/hosts.conf, this include line is present and the hosts.conf is updated when I enter info in “edit hosts” in the GUI.

TIA
Danjel

what says
nsloockup <clientname>
if you try it on a client

C:\Users\danjel>nslookup test
Server: ipfire.jungersen.dk
Address: 192.168.1.1

Name: test.

Setting in hosts.conf
local-data: “test.jungersen.dk 60 IN A 192.168.1.3”
local-data: “3.1.168.192.in-addr.arpa 60 IN PTR test.jungersen.dk”

.dk is a stupid idea for local name resolution

rather use something like .own or .local

I have changed it to .local
But same result.
I found out that I have a “real” dns record for test.jungersen.dk maybe this can cause some confusion, therefore I have changed it to test123.jungersen.local
Same result.
I can ping test123.jungersen.local but not test123

how is the name registered with IPFire?
Host: test123 Domain: jungersen.local
or
Host: test123.jungersen Domain: local

why don’t you use
Host: test123 Domain: jungersen

local-data: “test123.jungersen.local 60 IN A 192.168.1.3”
local-data: “3.1.168.192.in-addr.arpa 60 IN PTR test123.jungersen.local”

In GUI:
Hostname: test123
Domain name: jungersen.local

After changing to test123, I have also tried in GUI:
Hostname test123
Domain name:
(empty)

This makes it possible to ping with test123 from IPFire, but not the clients.

So now it seems like the problem is getting the right info to the clients.

Where did you put that:

My IPFire says that:

[root@ipfire ~]# cat /etc/host.conf
order hosts,bind

Daniel, in the openvpn configuration, advanced options, did you provide the domain ?

1 Like

@pavlos I don’t use openvpm but IPSec.
Is Openvpn a better choice?
At the moment I have 2 sites, IPFire in both ends.

@anon79392304 I entered the info in the GUI (Network | Edit hosts).
But I noticed that the file /etc/unbound/hosts.conf is updated and contains the info you mention.

What did you do that for?
I think I’m out from here.

I’m very sorry if I did anything wrong, I’m new here…
Please let me know what I did, so that I don’t do it again.
:slight_smile: