Set specific IP address for a device

Started by rama3124, May 01, 2026, 11:30:40 PM

Previous topic - Next topic
I upgraded to opnsense 26.1.7 yesterday and for some reason the internet just completely stopped working through both wifi and wired. I only had a backup from 25.7 so I did a fresh install of 25.7 and now the internet works but I've lost all my dhcp mappings.

My unraid server IP address has been given to another device. How do I kick this device off the address and give it to my unraid server? Sorry if my question seems silly, I'm still new to opnsense

Quote from: rama3124 on May 01, 2026, 11:30:40 PMI upgraded to opnsense 26.1.7 yesterday and for some reason the internet just completely stopped working through both wifi and wired. I only had a backup from 25.7 so I did a fresh install of 25.7 and now the internet works but I've lost all my dhcp mappings.

My unraid server IP address has been given to another device. How do I kick this device off the address and give it to my unraid server? Sorry if my question seems silly, I'm still new to opnsense

Go to Services / Dnsmasq DNS & DHCP / Hosts and create DHCP static mappings so that IP addresses get tied to MAC addresses.

Quote from: rama3124 on May 01, 2026, 11:30:40 PMI've lost all my dhcp mappings.
Why didn't you export them into a .CSV file ?!

You can do it from the webGUI directly :)

QuoteMy unraid server IP address has been given to another device.
How do I kick this device off the address and give it to my unraid server?
Your UNRAID Server should have a Static IP Address configured in it's OS and only use the Static DHCP Mapping based on the MAC Address as a backup solution in case some OS update/upgrade does something weird to your network's configuration !!

I would put the device that has "stolen" the IP Address offline now and configure your UNRAID Server correctly first.
Then when the "bad device" goes online again it should get a new IP Address :)

And last but not least :
Make sure all your Clients that connect to the UNRAID Server use host.domain.tld to connect to it instead of the IP Address.
So for example unraid.athome.lan or simply use the new .internal domain for private use : unraid.internal

This way you can just change the IP Address of the DNS Record and solve the issue too if something like this happens again in the future...
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Quote from: nero355 on May 02, 2026, 04:19:31 PM
Quote from: rama3124 on May 01, 2026, 11:30:40 PMI've lost all my dhcp mappings.
Why didn't you export them into a .CSV file ?!

You can do it from the webGUI directly :)

QuoteMy unraid server IP address has been given to another device.
How do I kick this device off the address and give it to my unraid server?
Your UNRAID Server should have a Static IP Address configured in it's OS and only use the Static DHCP Mapping based on the MAC Address as a backup solution in case some OS update/upgrade does something weird to your network's configuration !!

I would put the device that has "stolen" the IP Address offline now and configure your UNRAID Server correctly first.
Then when the "bad device" goes online again it should get a new IP Address :)

And last but not least :
Make sure all your Clients that connect to the UNRAID Server use host.domain.tld to connect to it instead of the IP Address.
So for example unraid.athome.lan or simply use the new .internal domain for private use : unraid.internal

This way you can just change the IP Address of the DNS Record and solve the issue too if something like this happens again in the future...

Thanks for the comprehensive reply. I managed to set the static IP as suggested in the opnsense webui. I like the idea for using the internal domain instead of an IP address but am fairly new to networking so not sure how to set this up. How do i set up an internal domain to point to my unraid server IP address? Thanks

Quote from: rama3124 on May 05, 2026, 01:51:28 PMI like the idea for using the internal domain instead of an IP address but am fairly new to networking so not sure how to set this up.

How do i set up an internal domain to point to my unraid server IP address?
Start with reading the documentation : https://docs.opnsense.org/manual/dnsmasq.html#dns-service

And post here again if you have any questions :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Hi, I read the documentatation and did the steps as suggested, filling the domain field as 'internal' in the DHCP default domain, the DHCP ranges domain and also in the unbound Query forwarding domain field. Yet for some reason it only resolves correctly if i do unraid.lan.internal. Also none of my other hostnames resolve (e.g. homeassistant.lan.internal). Just confirming, the hostname is the whatever appears in the 'Host' field of Dnsmasq DNS & DHCP - Hosts?

Thanks


Quote from: rama3124 on May 06, 2026, 09:34:35 AMand also in the unbound Query forwarding domain field.
This : https://docs.opnsense.org/manual/unbound.html#query-forwarding
Needs to be done too indeed.

QuoteYet for some reason it only resolves correctly if i do unraid.lan.internal.

Also none of my other hostnames resolve (e.g. homeassistant.lan.internal).
Then you have got .lan configured somewhere and need to remove it.

QuoteJust confirming, the hostname is the whatever appears in the 'Host' field of Dnsmasq DNS & DHCP - Hosts?
See here : https://docs.opnsense.org/manual/dnsmasq.html#dns-settings

Host should be : homeassistant
Domain should be : internal



/Slightly Offtopic :

Sometimes I wish the default DNS setup since DNSmasqd has replaced ISC by default after a fresh OPNsense install wasn't as it is right now :
Client => Local DNS Query => Unbound => DNSmasqd DNS Server part.
Client => External DNS Query => Unbound => Root DNS Servers and all...

But instead simply :
Client => Local DNS Query => DNSmasqd DNS Server part.
Client => External DNS Query => DNSmasqd DNS Server part => Unbound => Root DNS Servers and all...

I think it would be a lot more user friendly for a lot of people considering the many questions about DNS stuff in OPNsense :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)