Can't access server in local network using my dns domain (although i can from From external internet i can access the dns domain


I have had a nextcloupi instance working in last 3 years on a RPi 3b+, but it stopped working after changing my router.
Just to clear out, I’m no expert in IT.

I’ve installed a new instance of NCP but the problem persists.
Tried fresh installations using docker and ncp image given in, but neither worked as expected.

After installation:
I CAN access Nextcloud instance

  • using in any device connected to my router
  • from any device that is not connected to my router

however I CAN’T access Nextcloud instance

I’ve Checked that ports TCP 80 and TCP 443 are open for nextcloudpi device ( in my router

I’ve tried to use DNSmasq app from the ncp webui, but that didn’t work as well.
Do I need to do something in the client machine (laptop and android).?

I’ve scratched my head so hard with this, but I’m not getting it myself and I need help.


we have a lot of threads regarding this subject.

if your router can’t handle requests to his external ip from inside, your new router is the problem.

what did you do? split dns?

Thank you @Reiner_Nippes for your interest.

i’ve used dnsmasq as DNS cache server for NextCloudPi and Raspbian – Own your bits

the only part i din’t do in that recipe was the following (because i don’t understand what is needed). Do i need to do something in the client machine?

"On some modem-routers, you can set your RPi local address as the primary DNS provider. Keep your ISP DNS provider as secondary. If you can do this, no further configuration is needed.

Otherwise, you will need to configure your devices to use your Raspberry Pi’s address for DNS lookups.

For your PC, configure it in Network Manager if that is what you use, or set it up in /etc/resolv.conf like this

nameserver # point this to your RPi local IP
nameserver # this one should be your ISP DNS

on your client machine connected to your LAN/router “” resolve to what address? or your router’s internet address?

“ping / nslookup / dig” will tell you.

However, a better option than replacing your router is to install OpenWRT on it, if its a supported model. The next thing that follows logically, is that you should NEVER buy a router unless you KNOW that its supported by OpenWRT, even if you don’t initially intend to use OpenWRT, because at some point the crap factory firmware will let you down and its way cheaper (free) to install OpenWRT than buy new hardware.

@Larry_Boyd that is not an option. I can’t replace the router, because it is assigned by my home internet supplier.
It has to be a way to deal with this problem

That never stopped me.
Most of those criminal ISP boxes can be bypassed in one way or another. USUALLY you can completely replace them EVEN IF they have some kind of behind the scenes magic going on that makes it difficult. In EVERY case, you can reconfigure the router in “bridge” mode, which will result in the public IP address being assigned to YOUR router plugged into it.

I’ll give you an example of the worst kind of nonsense pulled by ISP’s; In Canada, an ISP called “bell” provides wifi routers with the objective of stealing resources belonging to the customer in order to expand their network coverage (i.e., cell phones of people walking past your house on the street will connect through YOUR router!!!). They try to pretend that there is something special about these routers by having them tag ip packets with vlan id 35. Most consumer hardware can’t replicate that, but with openwrt, its trivial. Network → Switch, find the vlan where the WAN port is connected, switch the ID to 35 and switch tagging to on.

But like I said, even if you can’t find those details, you can DEFINITELY set it to bridge mode.

@Reiner_Nippes Below is the ping and nslookup results

Screenshot 2021-04-20 152009
Screenshot 2021-04-20 152807

It is pointing to the External IP assigned to the router.
Is not supposed to?

@Larry_Boyd that is beyond my capabilities, and i’m not interested in buying another equipment to add to the existing one. There must be a way via software.

that’s the situation described in the dnsmasq tutorial. your router won’t allow you to route a packet from inside to it’s external ip and back to your nextcloud.

that’s why - while your are at home - the fqdn should resolve to

if you setup dnsasq on your nextcloudpi that will happen.

but it seems that you didn’t configure your router to use nextcloudpi as a dns server in the dhcp reply to your pc at home.

1 Like

How do i do this? i don’t know how.

well. does your router have a frontend aka web gui?

search for “network settings” or something like that. normally you be able to set your own dns server there.

Unlikely. He’s using ISP crap.

than you have to set it manually in your windows network settings.

(what is a "pain-in-the-… if your roaming around with your laptop.)

i have a webui for setting my router but i don’t think i can change the DNS server IP

It’s in Portuguese


that has to be changed.

if dmz/firewall/port forwarding/dynamic dns are all options. that’s bad.

you may call the hotline of your isp.

(btw: within the eu you should be able to choose your router freely.)

it’s not easy to get a router with coaxial cable input. I can’t find one

btw: another possibility: turn of the routers dhcp and use your nextcloud instead?

can’t find that here in Portugal :smile: