nethesis / dev

Nethesis issue tracker
http://www.nethesis.it
4 stars 1 forks source link

Unbound configuration broken if hotspot interface has alias IPs #6119

Closed cotosso closed 2 years ago

cotosso commented 2 years ago

Steps to reproduce

Expected behavior Unbound service (transparent dns proxy) starts flawlessy

Actual behavior

Unbound service cannot start

Components

NethServer release 7.9.2009 (final) nethserver-unbound-1.1.1-1.ns7.noarch

cotosso commented 2 years ago

The unbound configuration (/etc/unbound/conf.d/flashstart.conf) seems to have duplicated values which make the configuration invalid.

# Allow queries from hotspot
      interface: 192.168.182.1
      access-control: 192.168.182.0/24 allow

      # Allow queries from alias
      interface: 192.168.182.1
      access-control: 192.168.182.0/24 allow
nethbot commented 2 years ago

in 7.9.2009/nethesis-testing:

gsanchietti commented 2 years ago

Test case Check the bug is not reproducible

francio87 commented 2 years ago

Confirm, fixed:

image

[root@kvm ~]# rpm -q nethserver-flashstart
nethserver-flashstart-2.7.2-1.2.g82dee15.ns7.noarch
[root@kvm ~]# unbound-checkconf /etc/unbound/unbound.conf
unbound-checkconf: no errors in /etc/unbound/unbound.conf

/etc/unbound/conf.d/flashstart.conf

      # Allow queries from hotspot
      interface: 192.168.182.1
      access-control: 192.168.182.0/24 allow

      # Allow queries from alias
      interface: 10.123.123.254
      access-control: 10.123.123.0/24 allow
[root@kvm ~]# systemctl status unbound
● unbound.service - Unbound recursive Domain Name Server
   Loaded: loaded (/usr/lib/systemd/system/unbound.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/unbound.service.d
           └─dedalo.conf
   Active: active (running) since Tue 2022-03-08 11:46:54 CET; 40s ago
 Main PID: 16729 (unbound)
   CGroup: /system.slice/unbound.service
           └─16729 /usr/sbin/unbound -d
nethbot commented 2 years ago

in 7.9.2009/nethesis-updates: