Unbound on Raspberry Pi

Hello,

I developped an application around Unbound on a Rock64 SBC. This application uses a python script inside Unbound.

I tried to port it to the Raspberry Pi 3 (Raspbian Buster), but the loading of the python script fails with this error in syslog :

  notice: init module 0: validator
  notice: init module 1: python
  error: pythonmod: cannot initialize core module: unboundmodule\.py
  error: module init for module python failed
  fatal error: failed to setup modules

The unboundmodule.py is present in /usr/lib/python3/dist-packages

What can I do to debug that ? I found no information of the nature of the problem.

I have verified all the imports, they are OK.

Thanks if you have an idea.

Dysmas

(France)

Hello,

Is it possible to have unbound listen to two ports ? The "port" option supports only one value and cannot be used several times, only the last value is used.

I am using unbound to handle black and white lists with a python script. Incoming queries are redirected to port 5353 by nftables and unbound listens to this port. It works very well. Even if the machine which connects has an IP set for DNS (example 8.8.8.8), this will not prevent the packet to be intercepted by unbound.

But what for the queries from the machine which is running unbound ? To be able to filter them, I have to set resolv.conf to 127.0.0.1. It works very well, provided unbound listens to port 53.

I have not been able to put both things together.

Any idea would be appreciated.

Dysmas

(France)

Yes. Specify the "interface" option multiple times.

interface: 1.2.3.4@53
interface: 1.2.3.4@5000

Regards,
Anand

Hi Dysmas,

Hello,

I developped an application around Unbound on a Rock64 SBC. This
application uses a python script inside Unbound.

I tried to port it to the Raspberry Pi 3 (Raspbian Buster), but the
loading of the python script fails with this error in syslog :

 notice: init module 0: validator
 notice: init module 1: python
 error: pythonmod: cannot initialize core module: unboundmodule\.py
 error: module init for module python failed
 fatal error: failed to setup modules

The unboundmodule.py is present in /usr/lib/python3/dist-packages

What can I do to debug that ? I found no information of the nature of
the problem.

Upgrade unbound, it should print the error (perhaps it you set verbosity
higher), with the python errors. I believe also unbound-checkconf
prints the python parse failures that could be the reason that the
module is not loading.

Best regards, Wouter