Nextcloud portforward stops working when it is moved to a bridged network
Nextcloud portforward stops working when it is moved to a bridged network
cross-posted to: https://sh.itjust.works/post/12856684
I have the following topology:
The device running Nextcloud (snap) used to be connected to Router A, but I have recently added a bridge (Router B) and I moved Nextcloud's device to that bridged network; however, as soon as Nextcloud was moved to Router B, the portforward on Router A seemed to stop working -- as in I cannot connect to nexcloud from the public IP anymore. Bridges operate at layer 2, so this should make no difference whatsoever (this is reflected in the fact that other services (like SSH) still work perfectly fine portforwarded -- it's only Nextcloud that doesn't work), which leads me to think that it is a Layer 7 (i.e. Nextcloud) issue. What's going on here? How can Nextcloud even tell that it's been placed on a bridged network?
EDIT (2024-01-16T00:19Z):
I performed a network capture on the device running Nextcloud, and it appears that it's receiving the incoming request (SYN
), and responds appropriately (SYN, ACK
), but then Router B responds with Destination unreachable (Network unreachable)
, which is then, of course, followed by many requests for retransmission as the packets are being dropped. But what's causing the packets to be dropped? Why aren't they making it through the network?
EDIT (2024-01-25T08:37Z):
I’m not 100% sure what the previous problem was, but I think that it had to do with the bridge that I was using – not necessarily that it was broken, but perhaps it was jsut incompatible with the setup in some way. What I ended up doing was buying a different router that supported WDS, and then I created a WDS bridge between the two routers. The network seems to be working reliably, and as expected now.
That's... interesting. Router B shouldn't be involved at all with this, it should be blindly forwarding the packets. That's a layer 3 error!
How's the bridge set up? Have you made sure router B doesn't do DHCP and doesn't take the IP of router A by accident?
Indeed! I'm quite stumped.
I set it up using this guide.
Yup, it's disabled.
Yep, it's set to be static.
Hmm, I see, it's not a real L2 bridge, it's a hacky pretend one that relays.
I don't have a solution for this particular situation, but I do have a suggestion on how I would do it:
Now, both routers should be able to exchange traffic while being responsible of their own subnet. The only thing missing would be to handle broadcasts so stuff like Bonjour/Avahi works correctly. But as a whole both layer 2 and 3 would behave a bit more cleanly with less surprises.
I think what's going on is B sorta pretends to be A in some way to do the relaying but something is going wrong.
Yea, B is still acting like a router if it's creating those messages.
I wonder if it's bridging mode is actually bridging, or if it's doing something weird.
OP - how is router B cabled? If it's a typical consumer device it has one uplink port, which you wouldn't use (usually) for a bridge setup. Because really a bridge today is just a switch (they were first called switching bridges, and we got lazy and just say switch). Use of an uplink port implies routing, not sure if the router changes its config for bridge mode. I just don't use that port when I need switching.
For the bridge, it's set up over a wifi connection to Router A. For the Nextcloud server, it's just connected to one of the LAN ports on Router B.