External Access of two instances

Please forgive if this is in the wrong section…

I’m in a bit of confused fog here… I understand how port forwarding works, I have it set up all all is well

My set up is as follows:
Broadband connection. ISP provides the public address of 172.134.x.x
QNAP NAS using standard ports. 80, 8080, 8081, 443 on an internal address 192.168.x.x
Various apps on the NAS using port forwarding to allow external access. All good.

I have build one of those Nextcloud Box things. Its up and running and I can access it locally on its internal LAN address, 192.168.0.x

What I would like to do is to get access to the Nextcloud Box outside. It uses 443 (SSL) and 80 (NON SSL) but these are used by the NAS.

I understand that its not possible to use the same ports, say 443 and 80 pointing to two different internal ip addresses.

Does anyone have any ideas to clear the fog of how I can contact my Nextcloud Box from the outside…

Many thanks

Del

Not the beginner stage, but can be solved :wink:

How does it work in general:

  • Forward all traffic (80,8080,8081,443) to one device
  • Decide based on ACL-rules (ex. IF domain-name starts with “cloud.example.com” THEN forward traffic to srv1) what’s the final destination for the traffic
  • Forward specific traffic from the device to the final destination

As you can see this can be done by a router, if smart enough. I used pfsense OS to achieve this. (In my installation it runs on a firewall separating LAN from DMZ. But this is optional and beyond the answer of your question)

Hmmm

Thanks very much for your answer and yes you are right as a beginner I’m lost… :slight_smile:

One basic work around is that the QNAP NAS has a VPN server, so to get external access to my NC instance I go that way in… No the most elegant way for other users of course :frowning:

Regards

Del

Hi,

Check the Port Forwarding settings of your router. If there are:
80 - forward to NAS-IP:80
8080 - forward to NAS-IP:8080
8081 - forward to NAS-IP:8081
443 - forward to NAS-IP:443

You could then add another Port- Forward for example:
8443 - forward to NextCloud-IP:443

From the Internet you can then reach your NAS with:
https://your.dns.com:443

and your Nextcloud server with:
https://your.dns.com:8443

And of course you can switch that and forward port 443 from outside to your NC server and use 8443 for your NAS if this is more applicable for you.

Schmu

Now that what I’m talking about… Of course I never thought of that… Doh! Yes thanks very much I will give that a try later on and see what happens…

Many thanks for helping a noob!

Del

Hi Schmu

Yes that did the trick… Many thanks indeed

Del

1 Like

Hi @deljones,

I’m glad I could help :slight_smile:
Could you mark my answer as solution then? This thread appears in the overall list as solved then.

Have a nice weekend!