Run Multiple instances of pihole-FTL/Support dnsmasq -C switch?

I've recently updated my pihole to the new version which has integrated dnsmasq into pihole-FTL.

Previously to this update I have run two IP addresses on my pihole and two separate instances of dnsmasq bound to each interface:

192.168.1.1 on eth0 is configured to handle DHCP, force safesearch and has an kid friendly upstream DNS server from openDNS. dnsmasq dhcp-host tags are used to tag devices which are allowed full access, these devices have the dhcp option set to direct DNS requests to the second interface - 192.168.1.2 on eth0:1

A second instance of dnsmasq then runs DNS services exclusively on 192.168.1.2 to provide unfiltered responses to these devices. Both instances have full pihole blocking and by scheduling a task to merge the separate log files, both were then visible in the web console.

My problem with the new version is that although I am able to run the second copy of dnsmasq as before, the logs are not handled the same way so can never appear in the web console.

I am assuming that the new integrated version of pihole-FTL directly connects to the sqlite database and this capability has not been backported into the original dnsmasq application. I have attempted to start a second copy of the pihole-FTL application however the -C switch I used with dnsmasq to configure the second instance separately is not recognised so there is no obvious way to independently configure a second instance. Is this a feature that could be added or is pihole-FTL handling other functions which would cause problems if duplicated?

I appreciate this is a bit of an edge case however I expect there would be a number of pi-hole users who would like the ability to filter DNS for kids devices whilst retaining the pihole capabilities for all users and although this is still possible with dnsmasq it would be nice to capture all the devices within the logs the web interface presents.

FTL is built to only have one instance running at a time. If two instances were running, they would conflict on a few things (shared memory, database, configs, log files, etc). Your best bet is to run two Pi-hole Docker containers:

1 Like

I tried doing this but the first Pihole container uses port 53 on the docker host. This gives an error when trying to run a second Pihole container. It would seem that Pihole needs the host's port 53 to function and mapping it to something else would break it?

You can map FTL to listen on other ports. You would just need to change the clients using it to use the new port instead of port 53.

I haven't got around to doing this yet however I was planning on configuring docker network mode in a way to avoid port conflicts:

https://docs.docker.com/network/macvlan/

http://tonylawrence.com/posts/unix/synology/free-your-synology-ports/