Accessing nextcloud on a vm on a window 7 from the internet

I have a snap nextcloud installed on windows 7 in virtualbox.
I can access the web interface internally from other home computers

Nextcloud version 24.0.1`
Operating system and version Ubuntu 20.04
Apache or nginx version even though i can access the web server, I can find no evidence that it has apache or nginx installed
PHP version _(eg, 7.4.3
router behind basic spectrum modem

I am using a self signed cert and accessing the web interface through https locally.
I have a linksys EA8100 router with newest fw.
in apps/gaming I forward port 443 externally and internally to the same IP I use to access nextcloud: 192.168.1.100
when i test this externally, sometimes I get Your connection is not private and when i click Proceed to 192.168.1.100 (unsafe) i get page cant be displayed. most other times I test I just get page cant be displayed.
disabled the ubuntu and windows 7 fw and rebooted and rebooted the router and have same symptoms.

I called Linksys tech support to make sure I configured the router properly and they had me update the fw but no go. Because of this, I feel it is a configuration issue,

I don’t know what else to try.

Any suggestions are welcome.

Mike

Is a private IP address, which cannot be used in internet. To Access from internet you will need a valid certificate (Letsencrypt) for your Nextcloud using a registered host- and domain with DynDNS.
see: Accessing nextcloud from anywhere

btw.: Windows 7 is a poor solution to be used as exposed host accessable from internet since it is EOL.

1 Like

Hello,

For easy understanding of the networking, there are basically 3 types of IP addresses.

LAN (Tire-III) → They often look like 192.168.1.1 and used to create local network, like your internal network via your router. You, me and many others can have same exact, this kind of local IP in their LAN network.
WAN (Tire-II) → WAN (Wide Area Network) may look like, 10.0.0.xx or 172.xx.xx.xx and these IP addresses are used by ISP to distribute internet to home users → Your router may receive this WAN IP from your ISP.
Public (Tire-I) → This is the actual Internet accessible IP address, for example, 8.8.8.8. No device in the internet can be having same IP in this range and these IP addresses are accessible from anywhere in the world via Internet.

Your router or your server needs to be having access to one such Public IP address to be able to serve traffic from out side.

Some ISPs do provide Public IP directly to your router, there a simple Port Forward rule (in your router) can make your local server (VM or BareMetal) accessible from the internet.

However in case your ISP is using CG-NAT based WAN IP for your router, in that case you need to follow a more complex method of VPN connection with a VPS (Free Tire AWS or Oracle will work) & use that Public IP to forward traffic to your local server !!

So for your setup, step one is to first find out what kind of IP address is your router having. CG-NAT based WAN IP or direct Public IP?

Thanks.

Understood about Windows 7. We use Win 10 at work and I hate it soo much I’m sticking with win 7 as long as I can.

I am using a self -signed cert which should be accessible from the internet. we use self-signed certs for work servers as well.

Naxal thanks for the tutorial, but I am well versed in network engineering.

When I get to the page that says Your connection is not private. This tells me it reached my nextcloud server, but what I cant understand is why I get page cannot be displayed after hitting Proceed to 192.168.1.100 (unsafe)

Your Connection is not private might lead you to the solution.

Hello,

If you are confident that you have done the networking part properly and out side connection is able to access the VM and its a NextCloud configuration issue, then I suggest turn off the VM, create a fresh Ubuntu 22 LTS VM and follow the snap installation method of NextCloud in that VM

Snap is for people like me, dummies. Dont take it otherwise, just a joke. But the point is, with snap version, everything gets taken care by snap so chance of messing up with configuration is less and it works out of the box with very few commands.

First try an install without SSL → via port 80 to see if things are working and then install the SSL Certificate to move up to 443 SSL

Check if you are able to get snap running or not.

Thanks.

Thanks for the latest. I was thinking about disabling SSL which I just did and nextcloud comes up easily outside my home network without SSL enabled.
Last night I thought that maybe SSL requires more than port 443 forwarded and it does. The only problem is that different sites suggest to forward different ports for SSL to work from the Internet such as:
Internal port 8282 > external port 80
Internal port 8283 > external port 443
1433
8443
8282-8283

Any thoughts as to which ports (internal/external) I would need to forward for nextcloud to work with SSL?

Hello,

Although I am no expert but I don’t think its due to ports.

Since you are using Virtual Box, try to change VM networking adapter to Bridged networking → Refer here → Chapter 6. Virtual Networking (virtualbox.org)

This will allow the VM to bypass Windows 7 network stack and use you physical adapter to directly communicate with your router and if Guest OS NIC is set as to accept IP via DHCP, your Guest OS will receive a separate NAT IP from router.

You can now forward the Port 80/443 to this Guest OS IP, not the Windows 7 Host OS IP.

Check if that helps.

Thanks.