OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: pasha-19 on May 12, 2025, 01:49:40 PM

Title: OPNsense 25.1.6_2-amd64 bad IP address at line 139 of /usr/local/etc/dnsmasq.c
Post by: pasha-19 on May 12, 2025, 01:49:40 PM

I converted from ISC DHCPv4 to DNSMASQ DHCPv4 successfully I believe then I tried to add some IPv6 entries.  It appears I messed up something and have disabled dnsmasq completely.  I know I need to fix whatever is in line 139 and other things like it using probably the WEB GUI.  However; it would be nice to see what is in line 139 of /usr/local/etc/dnsmasq.c so I can do something other than deleting all the IPv6 stuff I tried to add (learning nothing) to recover from the problem,  This is not my working router this is a test environment.

Thanks for any suggestions.  I have read through many forum entries indicating manual editing config files will not work and that is not an issue as far as I am concerned.  My desire is only to determine the contents of line 139 of /usr/local/etc/dnsmasq.c to know what to remove or change in the web gui.
Title: Re: OPNsense 25.1.6_2-amd64 bad IP address at line 139 of /usr/local/etc/dnsmasq.c
Post by: meyergru on May 12, 2025, 04:00:19 PM
It is not /usr/local/etc/dnsmasq.c line 139, which would make it neccessary to look at dnsmasq source, which is not easy considering this is drawn in by FreeBSD ports from another source and patched for FreeBSD, potentially changing line numbers. When you look there, there is only a closing bracket, not an error message.

Actually, the error is in /usr/local/etc/dnsmasq.conf, which is the config file that the OpnSense UI creates from your configuration.

And to look at your local files is easy, just open the CLI via SSH or on the console, open a shell via option 8 and "vi /usr/local/etc/dnsmasq.conf", scroll to line 139 and see what's there. It does not help to edit that file, but you sure can look and see what is there.

The problem most probably is one of your static reservations, probably because of a bad IP address, like the error message suggests.
Also, this functionality is quite new and there is 25.1.6_4 out already, which may have better input validations.
Title: Re: OPNsense 25.1.6_2-amd64 bad IP address at line 139 of /usr/local/etc/dnsmasq.c
Post by: pasha-19 on May 17, 2025, 06:55:11 PM
Thanks it worked.   I was wrong about IPv6.  My switch programming has me entering the 5 colon MAC address I believe as the client ID and the 2 period MAC Address as the hardware address.  OPNsense only needs the 5 colon MAC address in the hardware address with a blank client id.  (one should not be working on this at 3 AM, I guess).  I entered both as noted above.  If this can be passed to your development team it may help others.

PS I have updated to  OPNsense 25.1.6_4-amd64 and entering that data is still possible, if that helps with the problem