Community discussions

MikroTik App
 
mikron00b5000
just joined
Topic Author
Posts: 1
Joined: Tue Jun 18, 2019 5:42 pm

PiHole DNS for any subnet

Tue Jun 18, 2019 6:10 pm

Hello!

I can't figure this out allthough i searched through the whole internet..
So I have a Hap Ac with 7 different subnetworks that are connected to different VPN providers and everything works fine. I want to send DNS requests to a Raspberry Pi running Pihole (https://pi-hole.net/) but it just works in the same subnet the Raspberry is running.
What i tried so far:
First I set firewall rules for any subnet to allow communication on port 53 TCP, UDP to the Raspberry and back.
Then I set DNS in RouterOs to Pihole IP (10.1.100.2) - PiHole gets the requests but can't answer them = no internet access on the subnets
So i set DNS in RouterOs to Cloudflare DNS (1.1.1.1, 1.0.0.1) and for the DHCP Networks i set DNS for all subnets to PiHole - Pihole doesn't get the requests.
Then I tried to set upstream DNS on PiHole to the gateway of the subnet PiHole is in (10.1.100.1) - works on PiHole Subnet but not on the other subnets

I have the feeling I have to set routes for all my subnets to pihole or the gateway.. I just don't know how or if it's the right guess?

Can please someone give me a hint? I think it's just a noob problem..
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: PiHole DNS for any subnet

Wed Jun 19, 2019 11:44 pm

If all those subnets get ip config automatically (through dhcp), then configure in your dhcp network definition the pihole as the dns server.
to simplify config, put the pihole on different net than the targeted subnets.
and make sure that pihole itself can do dns request, either through Tik or directly to internet.
 
ceylan
newbie
Posts: 27
Joined: Sat Feb 10, 2018 3:03 pm
Location: CYPRUS
Contact:

Re: PiHole DNS for any subnet

Wed Jul 24, 2019 11:29 am

Hello to everyone...I use pi-hole linux dns server on my network.the problem is that, i can not see all my Clients (total) in pi-hole(you can see in pic.).The IP address of the DNS SERVER is 10.10.10.2 and ip address of clients 192.168.240.0/22.When I look at client ip addresses from dns server,I see a few ip in the form of 10.10.10.3 and 10.10.10.x(same ip blok with dns server).i know to need to write firewall-nat in my main mikrotik but i am not sure to how can write it.And i am not sure if i need to write this nat to client router too!!??
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: MartainPL and 17 guests