As my collegue deHakkelaar pointed out. My firewall was blocking my requests. I though I added the ruls on iptables but it wasant, I just checked them out I were missing.
I would like to appreciate the time and effort to build, mantain and support for such a nice tool.
Expected Behaviour:
Run pihole as my dnserver.
Actual Behaviour:
Device raspberry pi 4 running ubuntu server raspberry distro.
Installed natively pihole and openvpn.
The first time when I setted the client with pihole as my primary dnsserver and other as a second. I saw how the pihole blocked some domains. But for some reason the pihole can resolve rest.
When I setup my pihole (192.168.1.4) as my unique dnserver the client can't resolve any domain giving me error of internet connection.
Currently I have my company router that does as the DHCP server (192.168.1.1). A second router (192.168.1.2) wired to the company router that extends the wifi network of my house. Is configured in the same range of ip.
I noticed that in the debug log the pihole can't discovery any dhcp server. I can't figure out why either how to fix it.
nmap info
$ sudo nmap --script broadcast-dhcp-discover -e eth0
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-31 19:56 CET
Pre-scan script results:
| broadcast-dhcp-discover:
| Response 1 of 1:
| IP Offered: 192.168.1.71
| DHCP Message Type: DHCPOFFER
| Server Identifier: 192.168.1.1
| IP Address Lease Time: 2m00s
| Renewal Time Value: 1m00s
| Rebinding Time Value: 1m45s
| Subnet Mask: 255.255.254.0
| Broadcast Address: 192.168.1.255
| Domain Name: home
| Domain Name Server: 192.168.1.1
| Router: 192.168.1.1
|_ WPAD:
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 3.97 second
I would like to clarify that I have setted up two dns servers because pihole is not working so I remove and put back the second dnsserver to have acces to internet meanwhile.
I will deffinetly check that DNS rebind protection.
I will update with more info with wathever I find.