does Pi-hole can affect the devices connected to the dietpi?

again thank you for the really well done networking guide :wink:

OK looking at my dietpi-ddns, looks like I’ve already done this:

    Provider : [No-IP]                                                 │
│           Domains  : [mydomain.ddns.net]                                │
│           Username : [myemail@gmail.com]                                 │
│           Password : [************]                                          │
│           Timespan : [10 minutes]

And reading what you wrote this is fine, but my question is: what happens if the dietpi is down and I’m using just this setting? I guess I can’t reach just mydomain.ddns.net, but all the other devices (such as a security camera) can be reached. Isn’t it?

I understand this, in my case the DNS root name server is No-ip. Is this correct?

Now, back to my pi-hole situation.

I don’t remember why (I’m quite sure there is a why :wink: ) When I was trying to reach the domain from my own network (with the old router), with the community we workaround in this way:
see this post [Solved]How to connect outside of dietpi network - #50 by Joulinar and this one [Solved]How to connect outside of dietpi network - #57 by Joulinar

This situation sounds good because, I think, this speeds up the internal connection. But, what if dietpi is down? does this mean all the devices connected to the router are unreachable?

So the final question now is: How can I check if going back to the easiest situation (i.e. just dietpi-ddns) without using pi-hole as a “DNS Resolver”, will work?

Siome last informations about my actual router that can, maybe, help:
In the configuration, I can see and change if every single device has DHCP or dedicated IP; I have a remote control panel where I can activate “HTTP: 8080 and HTTPS: 8181” to a single device, or range of IP’s addresses or to all the devices; I have a “port triggering” for which I ignore the function; I have a DMZ which is actually active and settled on the Dietpi address; I also have set (as suggested) the DHCP interval with a single IP address, the Dietpi ones.

It should be only a problem when your IP changes while your DietPi is offline, because then the new IP can’t be announced to no-ip.com
Your old public IP is still stored there and your Domain still points to it, no matter if your Dietpi is reachable or not.
And yes, your IP gets transmitted to the name servers of no-ip.com and is requested from there.

If your DietPi acts as your DHPC server then your devices shouldn be reachable, if you establish your network connection when Dietpi is not running. When you establish the connection and then turn off your DietPi you should be fine, because then your devices already got an IP adress assigned.
A walkaround for this would be to assign your devices static IPs, so they don’t need to get one assigned from your DHCP server.

And you could deactive Pihole and let your router do the DNS resolving and everything should be fine.

And for your last question:
I don’t think a DMZ is necessary and could also make problems, but I don’t know much about using DMZ.

I don’t understand the thing with the DHCP interval, because I thought DietPi now handles your DHCP? So DHCP should be deactivated in your router.

If you shut down your DietPi regularly, the easiest solution would be to let your router handle DNS and DHCP, because it’s always online and reachable.

I guess the whole confusion is coming from the fact that the original Vodafone router was not able to handle traffic inside the network correctly. Means ghezzia was not able to reach Owncloud from inside the network using DDNS name. Therefore we created the ugly workaround to use PiHole to exclude the Vodafone router from DNS resolution and traffic routing. This way, PiHole was returning a local IP (custom DNS entry) instead of the global WAN IP. Means no routing on the Vodafone router needed as the access would be local only. Furthermore it was needed to setup DHCP on PiHole to allow all LAN clients to get correct DNS server assignment. Unfortunately again a missing feature on the Vodafone router to allow custom DNS settings. Even more worse, it was not possible to disable DHCP server functionality completely on the Vodafone router. The workaround we found (on internet) was to reduce DHCP range on the Vodafone router down to a singel IP address. The one PiHole server is using.

Now, with the new router, you could try the original setup again. Usually having the router acting as DNS/DHCP server is quite a common scenario and the router should be able to handle the request correctly.

How to deal with your NoIP address update is a different topic and should be excluded for now. Usually modern router support setting DDNS.

I told there was a why :slight_smile:

Ok looking at this post [Solved]How to connect outside of dietpi network - #50 by Joulinar to test it, is it enough I disable the DHCP in pi-hole and re-open the range from .2 to .254 in my router?
I asked just because I’m wondering if this can disable something in the network

It depends on the IP of your router, it shouldn’t be in the DHCP range. So your routers IP has to be .1, when your DHCP range is .2 to .254.

And all of the IPs of your devices may change, so don’t wonder if you can’t connect via the “old” IPs, e.g. when you use SSH or similiar stuff.
If you assigned some static IPs to some devices, they also shouldn’t be in the DHCP range.

I confirm my router is 192.168.1.1 so the range .2 to .254 is the right one

This is not clear to me. My dietpi is 192.168.1.15. should I move it out of the .2 . 254 range?

Of course it makes sense to apply the previous reserved or static IPs on the router again for the same devices (if it can set reserved IPs via DHCP).

It btw depends on the router whether it has issues with static IPs in the DHCP range. In my case, I use mostly static IPs, but additionally apply them as reserved IPs in the router. This works very well so that the router does not assign those IPs to any other device but would assign it to the intended device, if I switch it from static IP back to DHCP, also e.g. when setting up a fresh OS on it or so.

easiest would be

  1. give STATIC IP .15 to PiHole device
  2. disable DHCP within PiHole interface
  3. set DHCP range on router .20-.200
  4. ensure port forwarding 80/443 is still pointing to your DietPi device
  5. restart a compute inside your network that you like to use for testing to assign new DHCP/DNS settings
  6. check if your can access your private cloud from inside the network using DDNS name

I followed the steps indicated but a strange thing (do you remember I’m the strange things man :slight_smile: ) happens.
From inside my network, I can reach the Dietpi through SSH (using mydomain.ddns.net) but, through the browser, I can’t reach either owncloud or pi-hole because it says it’s taking too long to connect to the site… If I’m outside my network looks like it works.

can you try to reach owncloud by using your external IP like

https://<external.ip>/owncloud

So it’s reachable on port 22 (SSH) but not on 80/443 for HTTP/HTTPS… which sounds like a problem with your webserver.
Is lighttpd running?
What happens if you try to reach owncloud from inside your network via the local IP of DietPi?

if he could reach it from external, Webserver seems to be running fine.

Oh yes, I didn’t read right, again :roll_eyes:

I’m sorry but I don’t understand how to try this. If you mean to reach the owncloud using mydomain.ddns.net/owncloud, it works if I’m outside my network but it doesn’t if I’m in.
What is the external IP?

It’s your public IP, where your domain points to.
You can look it up in your router, normally, or use some service like https://ifconfig.me/ to see it.

Yes ok I found it. And I confirm the behavior is still the same. Outside the network, it reaches owncloud, even if it asks to insert the IP in the trusted domain, and inside the network, it takes too long and shows me the error page.

ok looks like the new router has the same stupid behaviour as the first one. Theoretically you could give it a try to contact your customer support who provide the router and ask for a solution on how to access a your domain from inside your network. Or you are getting yourself clear that you probably need to run PiHole 24/7 :wink:

Another strange thing… Until some minutes ago from inside my network I was able to enter the dietpi with the terminal using mydomain.ddns.net.
Now I can’t do it anymore. I can access it just using the dietpi local IP…
Before this happens I disable the DMZ in my router (just to understand if this was the problem) and, when I realized I wasn’t able to access it with mydomain.ddns.net anymore, I enable again the DMZ. Despite this, I can enter it only with the local IP.
Now, using mydomain it shows me this error:

ssh: connect to host mydomain.ddns.net port 22: Operation timed out

[Processo completato]

Does this make sense?

ahmm your DietPi device is located Inside a DMZ? Why?

no, is not located there.
I don’t know why but when I change the router I activated also the DMZ in the new one. Maybe because this was the only method to point the ddns to the dietpi.

Anyway now I’ve disabled the DMZ.

The problem is still the same… :cry: