Pihole on Ubuntu - pihole as DNS, enabling UFW
by LinusGates from LinuxQuestions.org on (#54T46)
Hi all and good morning,
I need some help to see if I am doing the right thing please.
Background of my setup:
Router is set as gateway at 192.168.1.1
Pihole is on an Ubuntu machine on 192.168.1.10
Router has DHCP enabled and the DNS for the LAN is set to 192.168.1.10 so it goes through pihole to block ads.
I want to make the Ubuntu machine is secure, so I enable UFW with the default profile.
Once I do this it obviously breaks the DNS from Pihole, and clients cannot browse the internet.
So, I ran the following command in UFW:
Code:ufw allow from 192.168.1.0/24 to any port 53 And now it works, and the clients can browse the internet again.
My question is, is that the right rule for the firewall?
Are my clients going through pihole properly to block ads?
Thank you.


I need some help to see if I am doing the right thing please.
Background of my setup:
Router is set as gateway at 192.168.1.1
Pihole is on an Ubuntu machine on 192.168.1.10
Router has DHCP enabled and the DNS for the LAN is set to 192.168.1.10 so it goes through pihole to block ads.
I want to make the Ubuntu machine is secure, so I enable UFW with the default profile.
Once I do this it obviously breaks the DNS from Pihole, and clients cannot browse the internet.
So, I ran the following command in UFW:
Code:ufw allow from 192.168.1.0/24 to any port 53 And now it works, and the clients can browse the internet again.
My question is, is that the right rule for the firewall?
Are my clients going through pihole properly to block ads?
Thank you.