DHCP Server issue on Opnsense
Hi, got DNS now running on my VM, but if i try to start DHCP i get following error message in log file :
'[2025-07-20 14:51:30 UTC] [192.168.103.1:67] DHCP Server successfully activated scope: iot [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope: iot [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope file: /opt/technitium/dns/config/scopes/iot.scope [2025-07-20 14:51:30 UTC] [0.0.0.0:68] System.NullReferenceException: Object reference not set to an instance of an object. at DnsServerCore.Dhcp.DhcpServer.ProcessDhcpMessageAsync(DhcpMessage request, IPEndPoint remoteEP, IPPacketInformation ipPacketInformation) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dhcp\DhcpServer.cs:line 314 at DnsServerCore.Dhcp.DhcpServer.ProcessDhcpRequestAsync(DhcpMessage request, IPEndPoint remoteEP, IPPacketInformation ipPacketInformation, Socket udpListener) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dhcp\DhcpServer.cs:line 240 [2025-07-20 14:51:30 UTC] [192.168.101.254:67] DHCP Server successfully activated scope: LAN [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope: LAN [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope file: /opt/technitium/dns/config/scopes/LAN.scope [2025-07-20 14:51:30 UTC] [192.168.102.1:67] DHCP Server successfully activated scope: guest [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope: guest [2025-07-20 14:51:30 UTC] DHCP Server successfully loaded scope file: /opt/technitium/dns/config/scopes/guest.scope ' maybe an idea what i have to change?
many thanks
Chris
Thanks for the feedback. I am not sure what could be the cause of this since it requires more info. Please share screenshot of your DHCP scope here or via email to [email protected].
It could also be an issue with running .NET on Opnsense which is FreeBSD based and .NET does not have official support for it. It may cause the IP Packet Info to be missing causing this issue. But, that's just a guess since the other things have already been null checked.
I know this probably doesn't help much, I run OPNSense in a VM and TechnitiumDNS in another VM. I have OPNSense use TDNS for it's DNS server. I have multiple DHCP scopes (multiple interfaces with different subnets and such) all working fine. The TDNS is running in a debian based VM and OPNsense of course is FreeBSD.