Nextcloud can't access web services (network issue)

This is a cry for help. I’m frustrated out of my mind, trying to figure this issue out for two days straight.

Running TrueNAS:

OS Version:TrueNAS-SCALE-24.04.2.2
Product:B650 Pro RS
Model:AMD Ryzen 7 7700X 8-Core Processor
Memory:62 GiB

I am using AD for user logins, everything works. Both DNS and NTP are working correctly. WireGuard runs just fine. Proxy manager works. Nextcloud mostly works too, but I can’t manage to connect it to the AD. Nor does sending emails work. Apt also doesn’t load repos.

For starters my LDAP and SMTP config in Nextcloud is correct - I have verified them with ldapsearch on the host machine and by copiing the SMTP config to my mail client. Both work.

It feels like some firewall throwing out traffic headed back to the container.

I have tried pinging the AD server from inside the container and I get nothing back. I have even set up Wireshark on the AD host and I sees the incoming pings, and its sending back responses! …those never get back to the NC container that has sent them.

When I try the LDAP connection in NC, it always fails. I do see the incoming TCP traffic on the AD host (in Wireshark). I get a TCP SYN packet from Nextcloud, the AD server sends back TCP SYN ACK, than I get a TCP RESet from NC.

When I try to curl (for example) google.com inside the NC container, I get a weird “Not found on Accelerator” response…which looks like a cache/DNS issue…IDK, I’m exhausted and completely lost. I have lots of experience with Docker, but none with Kubernetes and I have no idea how to troubleshoot them.

Thanks for any suggestions in advance, I’ll provide any and every possible log needed, I just don’t know which are important.