NRPE Plugin doesn't allow for DNS in allowed hosts
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [Yes] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [ Yes ] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
A clear and concise description of what the bug is, including last known working version (if any).
I have noticed that when using NRPE in opnsense I am unable to add an allowed host that is a DNS entry and provides the error "Please specify a valid network segment or IP address." the current workaround I have is to manually update the nrpe file and add the DNS in the config file. the plugin will then work as expected but will break should anyone make changes to the NRPE config in the opnsense UI.
I have done this with existing servers in production and with newly deployed systems along with lab systems, I can confirm this is applicable to anything on version OPNsense 25.7.0 and above
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce
Steps to reproduce the behavior:
- Go to 'services'
- Click on 'nrpe'
- Click on 'configuration'
- Enter DNS name in Allowed hosts
- See errorPlease specify a valid network segment or IP address.
Input validation dialog box will come up with the following output: { "result": "failed", "validations": { "general.allowed_hosts": "Please specify a valid network segment or IP address." } }
A clear and concise description of what you expected to happen. UI would be able to accept DNS entries along with IP addresses
Describe alternatives you considered I updated nrpe_
A clear and concise description of any alternative solutions or workaround you considered.
- ssh into opnsense router
- vi /usr/local/etc/nrpe.cfg
- update allowed_hosts= with DNS entry
- restart nrpe
If applicable, add screenshots to help explain your problem.
Software version used and hardware type if relevant, e.g.:
OPNsense 25.7.3-amd64 FreeBSD 14.3-RELEASE-p2 OpenSSL 3.0.17