File upload issue from WAN to Nextcloud

Hello,

In my main local network (xx.xx.50.0/24), I have added a second network (xx.xx.20.0/24) using OPNSense:

  • WAN network: xx.xx.50.0/24 (client machines).
  • LAN network: xx.xx.20.0/24 (secured servers).

In this LAN network, I have installed and configured a Nextcloud server. Everything is working fine, and the Nextcloud interface is accessible from the WAN via a NAT port forwarding rule (port 443) to the Nextcloud server’s IP in the LAN.

However, I am facing an issue with file uploads:

  • Uploads from the WAN (50.0/24): The operation takes a very long time and eventually fails.
  • Uploads from the LAN (20.0/24): Everything works perfectly, even for large files.

I have tried several tests and adjustments:

  • Modified the nextcloud.conf, php.ini, and config.php files.
  • Allowed direct traffic between the WAN and the LAN without relying on the NAT rule.

Despite these changes, the issue persists, and the problem seems limited to file uploads from the WAN.

I kindly request your assistance in identifying the root cause of this issue and helping me resolve it.

Hi @adcom26

This is a question for the OPNsense forum as it clearly looks like a network issue not a Nextcloud issue.

A few thoughts though…

  1. Why do you call your client network WAN network? Do your clients have public IP addresses?!? If not, this doesn’t make any sense in my eyes, because the default WAN net in OPNsense is the address or network range assigned to you by your ISP, either a single dynamically assigned IP address or a statically routed IP range, usually a /29 for business connections.

  2. From your post it seems that uploads are working fine as long as they are initiated from the same network segment/subnet as the server is located, and uploads from the other subnet are failing. So I’d say you need to set up the appropriate firewall rules to allow traffic from xx.xx.50.0/24 to xx.xx.20.0/24. But again, that’s a question for the OPNsense forum.