Problem configuration DDNS (solved)

nc13
ncp
network
#1

Hello,

I just installed Nextcloud on a Raspberry Pi, trying to setup a cloud server.
My knowledge is quite limited to this.

I created an account and sub-domain on FreeDNS.
Then I was following the instructions here https://github.com/nextcloud/nextcloudpi/wiki/How-to-access-from-outside-your-network in order to setup the DDNS:

“1. Navigate to freeDNS in the TUI or the WebUI.
2. Change ACTIVE to yes
3. Change the UPDATEHASH with yours (delete the example and paste with ctrl+shift+V )
4. Change DOMAIN with your Domain Name you have registered.
5. (Optional) Change the UPDATEINTERVAL to the interval time you want the client to update your IP (Dynamic IPs do not change that often so you can leave the default (5mins)).
6. Click Run or Start.”

Once done, I tried to visit my sub-domain name in my browser.
It should lead me to the Nextcloud instance, but nothing loads.

I don’t understand what I could have missed.
Can someone help me please?

Thanks a lot!


System Info

‣ You should run Lets Encrypt for trusted encrypted access

NextCloudPlus version v0.54.7
NextCloudPlus image NextCloudPlus_04-21-18
distribution Raspbian GNU/Linux 9 \n \l
automount no
USB devices none
datadir /var/www/nextcloud/data
data in SD yes
data filesystem ext2/ext3
data disk usage 1.9G/30G
rootfs usage 1.9G/30G
swapfile /var/swap
Nextcloud check ok
Nextcloud version 13.0.1.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check no }
port check 80 open
port check 443 open
IP 192.168.0.59
gateway 192.168.0.1
interface eth0
certificates none
NAT loopback no
uptime 1:03
0 Likes

#2

Hello Thibautm,

  1. Try to disable and reanable the freeDNS.
    In case there are no errors in the output, most likely it shouldn’t have to do with the client. You also can check the file for errors with the command cat /var/log/messages, by first connecting to the board with ssh.

  2. Make sure you have configured port-forwarding correctly. Recheck your router’s configuration related to port-forwarding.

(Written in mobile.)

3 Likes

#3

Hello Pantelis,

Thanks a lot for your response.

I disable and reanabled the freeDNS.
I also checked cat /var/log/messages and didn’t find any error message related to that.

Regarding nc-forward-ports, I runned it after having unable UPnP on my router.
Looks fine (but I let 443 or HTTPSPORT and 80 for HTTPSPORT, not sure if this has to be changed).

0 Likes

#4

I disable and reanabled the freeDNS.
I also checked cat /var/log/messages and didn’t find any error message related to that.

Then it is not related to the freeDNS client.

Regarding nc-forward-ports…

I see you are trying to configure port-forwarding with the option nc-forward-ports. This option requires to have enabled UPnP in your router, where you have it. But, in addition to that there are different implementations of the UPnP protocol that router’s manufactures use, and they are not all compatible with NCP’s UPnP “client”. Because of that nc-forward-ports don’t always work.

What you have to do is to manually configure port-forwarding in your routers settings. You may follow your router’s manual, or search how to do it on a search engine. For the sake of an example, you can look here: https://www.wikihow.com/Set-Up-Port-Forwarding-on-a-Router , but remember that each router has a different Web User Interface so what says there may be slightly different…

I an sorry but I can not give you detailed info about the steps you need to follow on your router. This is out of our scope.

Your goal is to forward public port 80/tcp to internal port 80/tcp and 443/tcp to internal port 443/tcp, to the IP address of your board.

Public Port Internal Port Internal IP Address
80/tcp 80/tcp Local IP address of board
443/tcp 433/tcp Local IP address of board

Keep in mind that you will need two different rules for this, one for each pubic - internal pair.

It is a good practice to configure nc-static-IP first, to have a static internal IP address. Also, for the record, some routers offer the option to forward these ports to a device in the network based on it’s MAC address instead of the IP address, but if that complicates you, ignore it…

If you have more questions on this or anything else, in regard to NCP or Nextcloud, don’t hesitate to ask.

0 Likes

#5

I already do have 2 existing rules on my router page for the port forwarding with the correct IP address.
They are configured as you advise (one 80 local/external, one 443 local/external), both in TCP.

0 Likes

#6

Please do the following just to make sure that it is not a port forwarding problem.

Try visiting your public IP address from a browser by typing your public IP address in the URL field of your browser. You are supposed to get prompted with a security error about “Insecure Connection”. After you add an exception, you will see a nextcloud page with a small window titled as “Access through untrusted domain”.

All these will mean that port forwarding is working correctly. If you get prompted about a failed connection, it will mean that the server (the board) can’t be accessed from the outside of your house and this is related to port-forwarding. If so, we will have to investigate the freeDNS client deeper.

UPDATE:
There is also the possibility that your ISP has a firewall enabled after your router, that blocks ports 1-1024 (It has happen in me). So if the previous didn’t work, you will have to call your ISP support and ask them if they have enabled such a thing. In order for NCP to work you will have to tell the ISP to disable this firewall, or use NCP in different ports (not 80/443), but that is challenging especially with letsencrypt.

0 Likes

#7

I can access to th Nextcloud page from the IP address from my PC, but also from my phone with the Nextcloud app.
I can as long as the devices share the same router.
The problem comes when I want to access from outside.
That’s why I created a sub-domain.

From my understanding, once all setup, I can access the Nextcloud page via the URL of this sub-domain.
For the moment, the page doesn’t load.
I guess the problem comes from an error in the configuration of the DDNS.

In this case, do you think the ISP firewall can be a relevant reason for this?

Thanks again for your time!

0 Likes

#8

hi,

It is possible that your ISP is blocking some ports like 443. Some ISPs do this sadly. You should be able to see this by looking at the status page in ncp-web, or running sudo ncp-report where it will check if your ports are open.

Another way is to try to access your public IP from your phone’s browser without wifi, so you are accessing from the internet effectively, not from your LAN.

0 Likes

#9

Hi,

Do you get an IPv4 and/ or an IPv6 address assigned by your ISP?
Which ISP do you have, which router?
And how and from where outside your LAN are you trying to access your server?
If you only have an IPv6 address only for your router, things are a little different, So that is why I’m asking.
A problem I had was, that my mobile phone wasn’t able to access IPv6 sites at all, when using LTE and I had to change a setting first. Furthermore more the company I’m working for doesn’t support IPv6 and I couldn’t connect to my server from work.

0 Likes

#10

Hi guys,

I was trying what nachoparker was advising, to access the website from my phone without wifi and I was able to access the website.
Then I tried with wifi and… it works.
I tried then with my PC and I can access it without any problem.

I have no idea why it couldn’t load these last days as I haven’t changed any setup since las time…
I’m glad that it works but also frustrated to not understand what happened.

Anyway, thanks a lot the three of you for your help and your time and sorry to not be able to give more explanations.

0 Likes

#11

So you tried with the external IP address only or does the access also work via DNS name?
With DNS it takes some time until all DNS servers receive the information about your domain and the associated IP address. Maybe it was this delay which made it fail in the beginning.

0 Likes

#12

The access does work with the DNS name.
Maybe it was just a question of delay but I’m suprised it would have taken more than 2 days.

0 Likes

#13

I have the same issue. With both no-ip and FreeDNS.

Is there any way to speed this up?

Btw my firewall of the router is set to this:

And this port forwarding:

0 Likes