1
21.7 Legacy Series / Re: New Firewall alias not working / not updating
« on: December 17, 2021, 07:05:52 pm »
did some investigation. When I run the command manually I see the following error
root@firewall:/var/db/aliastables # /usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py
Traceback (most recent call last):
File "/usr/local/opnsense/scripts/filter/update_tables.py", line 131, in <module>
alias_content = alias.resolve()
File "/usr/local/opnsense/scripts/filter/lib/alias.py", line 241, in resolve
self._resolve_content = self._resolve_content.union(self._dnsResolver.collect().addresses())
File "/usr/local/opnsense/scripts/filter/lib/__init__.py", line 134, in collect
asyncio.run(self.request_ittr(loop))
File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/opnsense/scripts/filter/lib/__init__.py", line 97, in request_ittr
dnsResolver = Resolver()
File "/usr/local/lib/python3.8/site-packages/dns/resolver.py", line 734, in __init__
self.read_resolv_conf(filename)
File "/usr/local/lib/python3.8/site-packages/dns/resolver.py", line 826, in read_resolv_conf
raise NoResolverConfiguration
dns.resolver.NoResolverConfiguration: Resolver configuration could not be read or specified no nameservers.
I noticed I didn't have any resolver configured under system > settings > general, after adding the local firewall IP as DNS resolver, it worked!
root@firewall:/var/db/aliastables # /usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py
Traceback (most recent call last):
File "/usr/local/opnsense/scripts/filter/update_tables.py", line 131, in <module>
alias_content = alias.resolve()
File "/usr/local/opnsense/scripts/filter/lib/alias.py", line 241, in resolve
self._resolve_content = self._resolve_content.union(self._dnsResolver.collect().addresses())
File "/usr/local/opnsense/scripts/filter/lib/__init__.py", line 134, in collect
asyncio.run(self.request_ittr(loop))
File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/opnsense/scripts/filter/lib/__init__.py", line 97, in request_ittr
dnsResolver = Resolver()
File "/usr/local/lib/python3.8/site-packages/dns/resolver.py", line 734, in __init__
self.read_resolv_conf(filename)
File "/usr/local/lib/python3.8/site-packages/dns/resolver.py", line 826, in read_resolv_conf
raise NoResolverConfiguration
dns.resolver.NoResolverConfiguration: Resolver configuration could not be read or specified no nameservers.
I noticed I didn't have any resolver configured under system > settings > general, after adding the local firewall IP as DNS resolver, it worked!