OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: BSAfH42 on March 26, 2023, 04:10:47 pm

Title: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 26, 2023, 04:10:47 pm
Hi,

it looks like OPNsense ignores the nameserver list.
Versions   
Code: [Select]
OPNsense 23.1.3-amd64
FreeBSD 13.1-RELEASE-p7
OpenSSL 1.1.1t 7 Feb 2023

Code: [Select]
System --> Settings --> Generalsee attachment 1 (some servers set)
(https://forum.opnsense.org/index.php?action=dlattach;topic=33234.0;attach=26713)

Services --> Unbound --> Query Forwarding:
Code: [Select]
Use System Nameservers

 There are no system nameservers configured. Please do so in System: General setup


???

see attachment 2 + 3
(https://forum.opnsense.org/index.php?action=dlattach;topic=33234.0;attach=26715)

(https://forum.opnsense.org/index.php?action=dlattach;topic=33234.0;attach=26717)
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: franco on March 27, 2023, 09:08:27 pm
What does this return on your end?

# /usr/local/opnsense/scripts/system/nameservers.php debug


Cheers,
Franco
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 28, 2023, 09:01:11 am
this gives all configured nameservers

the error message
Code: [Select]
Use System Nameservers

 There are no system nameservers configured. Please do so in System: General setup

is still there

Code: [Select]
root@OPNsense:~ #  /usr/local/opnsense/scripts/system/nameservers.php debug
[
    {
        "host": "fd00::9a9b:cbff:fe08:3ca0",
        "gateway": "fe80::9a9b:cbff:fe08:3ca0%igb1",
        "interface": "wan",
        "source": "interface"
    },
    {
        "host": "192.168.178.1",
        "gateway": "192.168.178.1",
        "interface": "wan",
        "source": "interface"
    },
    {
        "host": "2620:fe::fe",
        "gateway": null,
        "interface": null,
        "source": "config"
    },
    {
        "host": "9.9.9.9",
        "gateway": null,
        "interface": null,
        "source": "config"
    },
    {
        "host": "80.241.218.68",
        "gateway": null,
        "interface": null,
        "source": "config"
    },
    {
        "host": "192.168.178.1",
        "gateway": null,
        "interface": null,
        "source": "config"
    },
    {
        "host": "194.25.2.132",
        "gateway": null,
        "interface": null,
        "source": "config"
    },
    {
        "host": "192.168.225.142",
        "gateway": "10.8.0.1",
        "interface": "opt2",
        "source": "config"
    },
    {
        "host": "2a01:4f8:161:83d1::10ce",
        "gateway": "2a01:4f8:161:83d1:cccc::1",
        "interface": "opt2",
        "source": "config"
    },
    {
        "host": "fd00::9a9b:cbff:fe08:3ca0",
        "gateway": null,
        "interface": null,
        "source": "config"
    }
]
root@OPNsense:~ #
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: franco on March 28, 2023, 10:16:28 am
On the surface this looks like a permission issue.

Can you open this in your browser?

https://x.x.x.x/api/unbound/settings/getNameservers


Cheers,
Franco
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 28, 2023, 10:49:23 am
On the surface this looks like a permission issue.

Can you open this in your browser?

https://x.x.x.x/api/unbound/settings/getNameservers


Cheers,
Franco

this returns a white blank page, but no error

chrome devtools say:

Code: [Select]
Failed to get subsystem status for purpose Object
getNameservers:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: franco on March 28, 2023, 11:06:51 am
I there anything in /tmp/PHP_errors.log file?


Cheers,
Franco
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 28, 2023, 12:51:08 pm
I there anything in /tmp/PHP_errors.log file?


Cheers,
Franco

actually, yes:

Code: [Select]
[27-Mar-2023 16:25:44 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function openvpn_get_active_servers() in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code:37
Stack trace:
#0 /usr/local/etc/inc/xmlrpc/hass.inc(12): eval()
#1 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): exec_php_xmlrpc('\nini_set('displ...')
#2 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.exec_p...', '\nini_set('displ...')
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('<?xml version='...')
#4 /usr/local/etc/inc/xmlrpc.inc(67): IXR_Server->__construct(Array)
#5 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#6 {main}
  thrown in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code on line 37
[27-Mar-2023 16:26:15 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to undefined function openvpn_get_active_servers() in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code:37
Stack trace:
#0 /usr/local/etc/inc/xmlrpc/hass.inc(12): eval()
#1 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): exec_php_xmlrpc('\nini_set('displ...')
#2 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.exec_p...', '\nini_set('displ...')
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('<?xml version='...')
#4 /usr/local/etc/inc/xmlrpc.inc(67): IXR_Server->__construct(Array)
#5 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#6 {main}
  thrown in /usr/local/etc/inc/xmlrpc/hass.inc(12) : eval()'d code on line 37

all in all around 24.000 lines, repeating the same message
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: franco on March 28, 2023, 01:23:27 pm
Hmm, that's Home Assistant plugin not having been fixed yet. Can you remove it for now, delete the log file and try again?


Thanks,
Franco
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 28, 2023, 01:32:26 pm
Hmm, that's Home Assistant plugin not having been fixed yet. Can you remove it for now, delete the log file and try again?


Thanks,
Franco

hass.inc removed
PHP log deleted

called https://x.x.x.x/api/unbound/settings/getNameservers again:

Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: franco on March 28, 2023, 01:48:06 pm
Can you look in developer tools if it emits a HTTP error in the response? This is totally weird. Also try clearing browser cache or try a different browser (the api/ page needs a login from the GUI first via that other browser).


Thanks,
Franco
Title: Re: OPNsense 23.1.3: local nameservers ignored ?
Post by: BSAfH42 on March 28, 2023, 03:06:23 pm
Can you look in developer tools if it emits a HTTP error in the response? This is totally weird. Also try clearing browser cache or try a different browser (the api/ page needs a login from the GUI first via that other browser).


Thanks,
Franco

Code: [Select]
getNameservers:1
       
       Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.