Help accesing nextcloud from outside the local network

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Gass
Posts: 17
Joined: Mon Feb 08, 2021 4:34 pm

Help accesing nextcloud from outside the local network

Post by Gass »

I'm trying to setup Nextcloud so I can access it from anywhere and I'm having issues.

On local IPs everything works fine, great I should say, but when I try a no-ip address or even the router's own IP address it works randomly, sometimes it loads, but most of the time I get a time out message.

My internet provider says the router port redirection is setup OK and that there are no firewalls built into it.

I haven't set up any kind of firewall or filtering (yet). My webserver of choice is nginx, for no other reason than I've used it before.

What should I check next?
Gass
Posts: 17
Joined: Mon Feb 08, 2021 4:34 pm

Re: Help accesing nextcloud from outside the local network

Post by Gass »

Just tried from actually outside the network, from a mobile network and works properly, so i believe it could be related to how pi-hole or unbound are setup, which I think it's just the defaults.

I can see somethings in the pi-hole access log like this:

Code: Select all

2021-02-15 13:26:39 	A	*******.no-ip.com	pc	OK (forwarded to localhost#5335)	N/A (0.0ms)	
2021-02-15 13:26:39 	A	*******.no-ip.com	pc	OK (already forwarded)	N/A (0.0ms)	
2021-02-15 13:26:39 	AAAA	*******.no-ip.com	pc	Retried	N/A (0.0ms)	
2021-02-15 13:26:40 	AAAA	*******.no-ip.com	pc	Retried	N/A (0.0ms)	
2021-02-15 13:26:41 	AAAA	*******.no-ip.com	router	OK (already forwarded)	N/A (0.0ms)	
2021-02-15 13:26:42 	AAAA	*******.no-ip.com	pc	OK (forwarded to localhost#5335)	N/A (0.0ms)	
2021-02-15 13:30:18 	A	*******.no-ip.com	pc	OK (forwarded to localhost#5335)	N/A (0.0ms)	
2021-02-15 13:30:22 	A	*******.no-ip.com	pc	OK (already forwarded)	N/A (0.0ms)	
2021-02-15 13:30:59 	A	*******.no-ip.com	pc	OK (forwarded to localhost#5335)	N/A (0.0ms)	
2021-02-15 13:30:59 	A	*******.no-ip.com	pc	OK (already forwarded)	N/A (0.0ms)	
2021-02-15 13:30:59 	AAAA	*******.no-ip.com	pc	Retried	N/A (0.0ms)	
2021-02-15 13:31:01 	AAAA	*******.no-ip.com	pc	Retried	N/A (0.0ms)
There are plenty more like this, are those retries normal?
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Help accesing nextcloud from outside the local network

Post by Joulinar »

Hi,

just for my understanding, you have issues to connect to your NextCloud from outside your network/internet? correct?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Gass
Posts: 17
Joined: Mon Feb 08, 2021 4:34 pm

Re: Help accesing nextcloud from outside the local network

Post by Gass »

I thought that there was something wrong in the config of the web server, but when I'm actually outside the home network, it works just fine.

So the issues I'm having happen when I try the ***.no-ip.com domain accessing through the home network. The only difference I can think of are DNS servers.
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Help accesing nextcloud from outside the local network

Post by Joulinar »

well you could exclude PiHole if you set a public DNS provider like Quad9 or Cloudflare directly on your client. This way you will bypass PiHole and could check how it behave. Another option is to create a local DNS record in PiHole. This way you can point directly to your web server inside your local network. As well it will avoid the roundtrip to the router as you can connect to the web server directly.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Gass
Posts: 17
Joined: Mon Feb 08, 2021 4:34 pm

Re: Help accesing nextcloud from outside the local network

Post by Gass »

Dumb error on my side, it was a miss configuration on pihole.

Thanks a lot for the help, it was user error all the way :cry:
User avatar
Joulinar
Posts: 4830
Joined: Sat Nov 16, 2019 12:49 am

Re: Help accesing nextcloud from outside the local network

Post by Joulinar »

thx for sharing, sometimes this happen ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply