static IP configured on host and entry in Unbound DNS

Started by zyghom, January 06, 2026, 03:21:21 PM

Previous topic - Next topic
hi,

I have many hosts (actually probably all) that are either VMs or CTs on Proxmox.
When I set manually IP address for them, they are not being resolved by nslookup or so.
It is not the case when I either:
1- assign their IP by DHCP (dnsmasq on Opnsense) in Proxmox or
2- add them to hosts (static) on dnsmasq on Opnsense

So imagine VM with hostname signal, its IP is set on Proxmox as 192.168.10.3/24, DNS search on Proxmox is "localdomain"
Opnsense general settings domain: "localdomain"
When container starts it is not being registered by either Unbound or Dnsmasq (it does not ask for IP, right?)
I can ping it using IP but cannot ping as signal or signal.localdomain

No issue if I set DHCP on Proxmox for this container or if I set it as static host on Dnsmasq

What am I doing wrong?
Where is the problem?

thank you

You are not doing anything wrong. Add a host override entry to Unbound. If the container/VM/whatever does not get its IP address from DHCP, OPNsense simply does not know about it.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Be careful with "new" Unbound host overrides, though: https://github.com/opnsense/core/issues/9587
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

thank you
but
do I need to specify every host in overrides?
on top of localdomain, I have also some hosts, that I call with domain: "myhome" (i.e. books.myhome, movies.myhome)
I have an override:

all from *.myhome -> nginix.localdomain

and on that nginix proxy I have proper redirects i.e. books.myhome -> http://192.168.10.31:8081
etc

but now you say I shall put as many lines in overrides as many hosts with static IP set by host?
that will be double work, right?
If I get it correctly, then it might be easier to set static IPs on the opnsense instead...
please guide me

and thank you both for the answer ;-)

Quote from: Patrick M. Hausen on January 06, 2026, 03:25:47 PMIf the container/VM/whatever does not get its IP address from DHCP, OPNsense simply does not know about it.

that was actually my thinking as well - how the heck would DNS know what my name/domain is, if I never asked network for IP... ;)

Quote from: zyghom on January 06, 2026, 05:50:16 PMdo I need to specify every host in overrides?
on top of localdomain, I have also some hosts, that I call with domain: "myhome" (i.e. books.myhome, movies.myhome)
I have an override:

all from *.myhome -> nginix.localdomain

and on that nginix proxy I have proper redirects i.e. books.myhome -> http://192.168.10.31:8081
etc

but now you say I shall put as many lines in overrides as many hosts with static IP set by host?
that will be double work, right?
If I get it correctly, then it might be easier to set static IPs on the opnsense instead...
I think you figured it our yourself already :)

And IMHO there is nothing wrong with such a setup : I do something similar for all the hosts/clients on my network so I can reach them by both IP address and domain address.

Quote from: zyghom on January 06, 2026, 05:52:44 PM
Quote from: Patrick M. Hausen on January 06, 2026, 03:25:47 PMIf the container/VM/whatever does not get its IP address from DHCP, OPNsense simply does not know about it.
that was actually my thinking as well - how the heck would DNS know what my name/domain is, if I never asked network for IP... ;)
In case you are using Pi-Hole and know how to script/dev stuff you could build something based on the data shown @ https://<ip_address>/admin/network where basically each Client of your DNS Server (FTLDNS) is shown with both it's MAC and IP address and when the first and last activitiy of that Client was ;)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Quote from: zyghom on January 06, 2026, 05:50:16 PMbut now you say I shall put as many lines in overrides as many hosts with static IP set by host?
that will be double work, right?

Then use DHCP with reservations/static assignments ...
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)