Wireguard stops working randomly DNS issue?

Started by RSE, October 25, 2024, 10:42:57 AM

Previous topic - Next topic
October 25, 2024, 10:42:57 AM Last Edit: October 25, 2024, 11:00:10 AM by RSE
Hi,

Since the last two days i am experiencing issues with a Wireguard instance.
The issue appeared very randomly with out any change to my OPNsense settings.
I have two Wireguard instances with almost the same configuration, both use Unbound as their DNS. This has worked for months without a issue. All of a sudden one of the instances DNS stops working at random? Clients can still use messaging apps like Whatsapp but going to any website will timeout DNS. In the firewall i cant see anything being blocked, and the weird thing is the other instance which also uses the same DNS server "unbound" still works fine. After rebooting OPNsense it works again for a while until the same issue appears in a couple of hours. Restarting only Unbound doesn't work. The issue appeared first at 24.7.6 so i updated to 24.7.7 but it still remains. Any suggestions? I also see some error logs in unbound which i will paste below.
It is weird to me that this issue came out of nowhere as i haven't changed anything in weeks.

EDIT: Using another dns server like 1.1.1.1 doesn't work
Restarting the specific Wireguard instance from the gui does fix the issue also but only for a limited time.


2024-10-25T10:05:58 Error unbound RuntimeError: Query interrupted
2024-10-25T10:05:58 Error unbound db.connection.execute("DELETE FROM query WHERE to_timestamp(time) < to_timestamp(?)", [epoch])
2024-10-25T10:05:58 Error unbound File "/usr/local/opnsense/scripts/unbound/logger.py", line 166, in _read
2024-10-25T10:05:58 Error unbound ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-25T10:05:58 Error unbound if not callback(key.fileobj, mask):
2024-10-25T10:05:58 Error unbound File "/usr/local/opnsense/scripts/unbound/logger.py", line 237, in run_logger
2024-10-25T10:05:58 Error unbound r.run_logger()
2024-10-25T10:05:58 Error unbound File "/usr/local/opnsense/scripts/unbound/logger.py", line 244, in run
2024-10-25T10:05:58 Error unbound run(inputargs.pipe, inputargs.targetdb, inputargs.flush_interval, inputargs.backup_dir)
2024-10-25T10:05:58 Error unbound File "/usr/local/opnsense/scripts/unbound/logger.py", line 283, in <module>
2024-10-25T10:05:58 Error unbound Traceback (most recent call last):
2024-10-25T10:05:58 Error unbound
2024-10-25T10:05:58 Error unbound The above exception was the direct cause of the following exception:
2024-10-25T10:05:58 Error unbound
2024-10-25T10:05:58 Error unbound InterruptedError
2024-10-25T10:05:58 Error unbound raise InterruptedError()
2024-10-25T10:05:58 Error unbound File "/usr/local/opnsense/scripts/unbound/logger.py", line 126, in _sig
2024-10-25T10:05:58 Error unbound Traceback (most recent call last):
2024-10-24T22:38:09 Error unbound RuntimeError: Query interrupted
2024-10-24T22:38:09 Error unbound db.connection.execute("DELETE FROM query WHERE to_timestamp(time) < to_timestamp(?)", [epoch])

Experiencing same issue here with Wireguard randomly stops working. A restart of the Wireguard service temporarily resolves the issue. It is affecting all my Wireguard clients.

November 04, 2024, 01:11:07 AM #2 Last Edit: November 04, 2024, 05:06:27 AM by hakuna
Same here but my logs have zero errors.

I have it to send all the traffic going via my home network ( Pi-Hole + Unbound ) and out of the sudden I had no internet service.
After restarting the service, it is working again but something is off and my logs aren't helping.

EDIT: OPNSense has Cron so I did set it to restart WireGuard service everyday at 0:00AM until I find out what is happening, my logs are clean so I cannot use them to help.

Anyone else also experiencing this and do you know the root cause yet?
Currently I'm trying the cron job to restart wireguard service daily at 6am, but I believe the issue resurfaces more than once within 24 hours...