How to use "non Piholed DNS" for Raspberry connection itself when that is used as Pihole DNS

After Pihole configuration all connections and services on Raspberry itself became filtered.

I want to use Raspberry as Pihole DNS server for my navigation (on others devices) but I don't want that all connections on Raspberry itself and related hosted services are filtered by Pihole.

How could I achieve this?

Edit file /etc/dhcpcd.conf and change the nameserver..

In dhcpcd.conf now I have this

hostname

clientid

persistent

option rapid_commit

option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes

option interface_mtu

require dhcp_server_identifier

# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

interface eth0
        static ip_address=192.168.1.2/24
        static routers=192.168.1.1
        static domain_name_servers=1.1.1.1 1.0.0.1

Nameservers are the Cloudflare ones

If you are using the ethernet interface on the Pi, that device should not be using Pi-hole for DNS. It is going directly to Cloudflare.

What is the output of the following from the Pi terminal:

cat /etc/resolv.conf

I'm using the wifi connection, not the ethernet, but I don't see any specific option in *dhcpcd.conf * file.

If I launch
cat /etc/resolv.conf

it returns me the standard DNS of Router Provider

Add one for the WiFi connection. Would look something like this (check that wlan0 is the correct interface on your install):

interface wlan0
        static ip_address=192.168.0.150/24
        static routers=192.168.0.1
        static domain_name_servers=1.1.1.1 1.0.0.1

Then reboot the Pi with sudo reboot now

Done this and the result is the same

What are the complete outputs of the following commands from the Pi terminal:

ip addr

sudo grep -v '#\|^$' /etc/dhcpcd.conf

cat /etc/resolv.conf

nslookup flurry.com

This is the complete output

hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
        static ip_address=192.168.1.2/24
        static routers=192.168.1.1
        static domain_name_servers=1.1.1.1 1.0.0.1
interface wlan0
        static ip_address=192.168.1.150/24
        static routers=192.168.1.1
        static domain_name_servers=1.1.1.1 1.0.0.1

The IP I have configured as static in the pihole setup is 192.168.1.2 after the pihole installation seems It has been assigned to eth0 interface in dhcpcd.conf (I have selected wlan also during pihole setup, since I don't use any ethernet at all, not sure this is normal)

Adding this

interface wlan0
        static ip_address=192.168.0.150/24
        static routers=192.168.0.1
        static domain_name_servers=1.1.1.1 1.0.0.1

as you previously suggested now makes the output of
cat /etc/resolv.conf
showing the Cloudflare DNS rather than router defaults
but all connections on Raspberry continue to remain filtered

These are not the complete outputs of the four commands. Please provide what was requested, so we can see your configuration details.

ops you are right

This is the complete output

ip addr

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether myethmac brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether mywifimac brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.150/24 brd 192.168.1.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever

sudo grep -v '#\|^$' /etc/dhcpcd.conf

hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
        static ip_address=192.168.1.2/24
        static routers=192.168.1.1
        static domain_name_servers=1.1.1.1 1.0.0.1
interface wlan0
        static ip_address=192.168.1.150/24
        static routers=192.168.1.1
        static domain_name_servers=1.1.1.1 1.0.0.1

cat /etc/resolv.conf

# Generated by resolvconf
nameserver 1.1.1.1
nameserver 1.0.0.1
nslookup flurry.com
Server:		1.1.1.1
Address:	1.1.1.1#53

nslookup flurry.com

Non-authoritative answer:
Name:	flurry.com
Address: 74.6.136.150
Name:	flurry.com
Address: 212.82.100.150
Name:	flurry.com
Address: 98.136.103.23

The Pi is using Cloudflare for DNS. The last command for nslookup shows that Cloudflare responded, and the query was not blocked (if the nameserver were Pi-hole the query would be blocked).

To change this, run pihole -r and select the reconfigure option

reconfigure hasn't fixed the problem,

however I have noticed another DNS config file in addition to dhcpcd.conf and resolv.conf this file is named resolvconf.conf
setting dhcpcd.conf as above but with static ip chosen in setup script manually set on wlan0 interface rather than eth0 (not sure why setup script hasn't done this considering my choice on the desired interface step selection) and commenting out resolvconf.conf nameserver line seems has addressed the problems.

The setup script should be refined to address these issues (and it should also ask for the lighttpd port rather than setup the webserver automatically on port 80 causing conflicts with existing configuration)

Thanks for the support.

Please upload a debug log and post just the token generated by

pihole -d

allowing to upload when prompted, or do it through the Web interface:

Tools > Generate Debug Log

This will show us your Pi-hole configuration and system OS details.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.