Can't reach NC through UPnP (prob. a router issue, but still)

Hey guys,
My installation is up and running fine. Now I’m trying to reach it from outside. I am aware that this is probably a router related issue, but I’m still trying to get some help here as there might be users having similar issues:


  • Ran nc-forward-ports and confirmed a change on my routers configuration page
  • Router is a TP-Link Wireless N 300M TL-WR840N (I’m in Brazil, not easy to get better hardware)
  • Created a freedns account
  • Ran freeDNS, seems ok!


  • Reach NC through freeDNS created subdomain
  • or at least through my current IP (v4)

Can’t reach it, neither through freeDNS subdomain nor directly through IP, tried different computers, appended :80 and :443, tried http:// and https://

Any tricks you know of? Do I have to get a different router?

Thanks in advance!!!

nc-forward-ports output:

List of UPNP devices found on the network :
 st: uuid:00000000-0000-1000-0000-8416f98cf3b6

 st: upnp:rootdevice

 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD :
Local LAN ip address :
ExternalIPAddress =
InternalIP:Port =
external TCP is redirected to internal (duration=0)

Ok, now I see that my actual external IP adress is different from (I guess that’s the modem)…I’m kind of hapless…

When you are not sure what you WAN IP is look at service websides like:

tks! well it’s confirmed then… is my external IP What can I do now? The (automatic “wizard”) tools in my router and in NC don’t take that situation into account!

I don´t know exact your local setup and what you have done. But I think there is something wrong with your setted port forwarding. I think the system you want to run nextcloud is a linux machine.
Type there in shell ifconfig to see the internal LAN IP. When you´ll find it (I guess it´s from your previous posting) you need to enter that IP in your router under portforwarding, that the router knows which port it needs to forward to which ip.
Best regards.

My local NC IP is

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    inet6 fe80::2506:20db:6868:1cd2  prefixlen 64  scopeid 0x20<link>
    ether b8:27:eb:82:46:54  txqueuelen 1000  (Ethernet)
    RX packets 79576  bytes 96324861 (91.8 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 55626  bytes 7580221 (7.2 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

My router IP is

My router has the external IP and now I found out that I can reach NC through that IP when on my local network.

I guess that means the router got its IP from the modem. It’s a Motorola SBV5121
I’m not quite sure which IP it has, my router tells me that its default gateway is

It’s all quite messed up, but I’m using predefined settings, and my router gets its IP “dinamycally” (I guess it means DHCP) from the modem.

I can’t connect to

Any hints what I could try next?

…which I think confirms that UPnP is actually working starting from the router’s external IP, right?

You are mixing names up.
Please look for definitions of your “UPnP”.

But now you need looking for IP, TCP & UDP. My answer will be longer when I´m back from shopping :wink:

Maybe this helps you:

You need also to do a port forwarding for your modem. Try to login on your gateway :wink:

Yeah, the culprit is the modem. All ports are blocked and I cannot access the necessary configuration tool.

A technician of my ISP will have to come to my house to configure the port forwarding (kinda ridiculous…).

So, thanks again for the help, I always get to solve any problem here, it’s amazing!

just for the record… you do run your nextcloud-instance based on nextcloudpi?

Yes, I do. Sorry for the lack of details.

1 Like