Setting up a temporary 2nd instance of pihole - port conflicts?

Following on from this topic i am finally getting round to flashing a clean install of Pi-Hole.

My plan is to keep my OG pihole running whilst I flash and setup the new instance.
Reason being my ISP provided router is very lockdown and is a total ball ache to change settings.
So i was planning on using an old spare Pi have to setup pihole, unbound and wiregaurd, whilst keeping the OG pihole running, and then swapping out the sd card.
But, it dawned on me i may have conflicts with ports etc. as i will be, albeit briefly, running 2 instances at the same time.

So is it possible to set pihole running on port other than 53, and then change it once i am back to running only 1 pihole?

I know this seems very convoluted and unnecessary, but my ISP router is lock down to buggary, and takes some effort to enable / disable settings, and requires multiple reboots, which takes anywhere up to 8-10 minutes each.This, plus me not remembering exactly what i had to modify to get it to plat nice with Android (IPV6) and DHCP means i really want to avoid it.

Multiple Pi-holes running on different devices will not result in port conflicts.

Ports are unique to each device. Port 53 on device 1 can be in use at the same time as port 53 on device 2.

Problems arise when you try to run multiple services on device 1 that both require port 53.

Well don't I feel silly :man_facepalming:

Every day's a school day I guess.

So I should have no problems with my plan?

I believe you will have no problems.

@Valiceemo FWIW, I run two RPi3B+ Pi-holes on my network and do not have any port confict issues. I have been doing so for over a year now. However, to be successful doing so, you must have the ability to identify both on your network router/gateway so network clients know where to send their DNS requests to ... which means you would need to have administrator access to that router/gateway.

Thanks for sharing your experience.
I do have admin access to the router, but it's very limited as to what one can actually administer.
It's more the pain of the sloppy web GUI, and having to constantly reboot to change settings that's the issue.

The router doesn't allow setting of DNS servers, so I use pihole as DHCP server

I wont be running 2 piholes side by side, I have no real need too.

This is a nice redundancy boost with two in parallel. If either fails, you have the other online to immediate pick up the DNS load.

Yes, I agree, it would be nice. But not necessary in my case. My network is pretty small (approx. 20 devices) and pihole has never failed up until now. And even after the failure shown in the linked thread, I still managed to get it booted and running.
If I can find a spare as card I may well have one running as a redundant instance.
The one thing that has out me off really, is the fact that the stats will be split. I'm a statistics nerd, and almost OCD when it comes to having things like that, and the thought of data split between 2 servers is terrifying lol

@Valiceemo As far as "data being split" I do not find this to be true in my case. My pair of Pi-holes do not work in a "fail-over" scenario. Instead, with the way DNS requests actually work, clients randomly use one or the other Pi-hole to send their requests to ... and, regardless, it is easy to average the data between them if desired.

I will comment on the "etc.":

This sounds like you want to configure your replacement Pi-hole with the same IP address than the old one, right? So you don't have to go to the router settings and change the address.

This may very well result in a (serious) conflict as no address is allowed to exist twice. So, when changing the IP address of the replacement, make sure to disconnect the first one before the two-devices-using-one-address issue arises. I'd likely take your entire network down, otherwise.

No, the address of the new Pi is not important.
I think I mentioned in a previous post, the router does not allow manual configuration of DNS servers, so I don't need to worry about this. I use pihole for DHCP.

I'll outline my plan for prosperity

  1. Flash new SD card with raspberry pi os (it's what I'm most familiar with)
  2. Use the new card in a separate (temporary) Pi with a new, unique IP
  3. Install and set up pihole only on temporary Pi
  4. Power off both Pi's
  5. Swap sd card from temporary Pi into OG Pi
  6. Switch on OG Pi only with fresh install and then set up unbound and wireguard
  7. Bask in my glory of success.... hopefully

That sounds perfectly fine. We're waiting for your success story :slight_smile:

status update!

Pihole is now up and running on a clean SD card.
Unbound installed, confugfured and running great

However, i am not seeing all my device hostnames in the stats. Many are showing as UNKNOWN
And everything 'feels' a bit slower, webpage load times, pihole admin gui for example, all seem to hang a little.
All devices have been reset etc. and ads do seem to be getting blocked, so im not overly concerned...might be the SD card is not as fast?

Finally, i cannot get wiregaurd working.
Setup the server, and configured clients as per the very well written guide, but i cannot get a connection from my client (OnePlus device)
I followed the guide to the letter, changing any parts relevant to me, but no joy. Again, not a major problem, but id very mucg like to get it running and connecting

The slow card may be an issue. Do you also see slow DNS resolution (like long response times in the Query Log)?

Concerning Wireguard: I assume you tested this in your home network so we can rule out router firewall and port forwarding issues for the moment. Do you get no connection at all (check with sudo wg on the server and what the app says concerning bytes transmitted and received) or does this connection come up but no traffic is flowing?

Not particularly no.
Approx 40-50 ms when doing a dig
Looking though the query log however, I do see quite a lot taking over 100ms. And a few jump out at me...a query to YouTube from my mobile - 13492.3ms.
And a few more in the thousands of ms.

Another short update.

So with regards to the SD card, it seems, that for some reason i will never know, i used an older, random, no branded card. Which will probably explain the 'poor' performance of the web admin, and the slow respsonse times.
I do have a better san disc card lieing about....i guess i can just image the current card using etcher, and flash that to the better card?

In regards to wiregaurd. Again, it was my fault...I did not update the forwarding rule on the router to the new pihole IP :man_facepalming: