Make sure all the IPs are matching and everything is updated.
After that, make sure Pi-hole is set-up to respond to the interface that the request is coming on (I'm assuming this would be eth0 in this case ).
Once set-up like that, your raspberry will retain the IP and it will be easier to use that, as it survives reboots and always stays the same.
Once you are done with those settings, make sure you use the raspberry IP (the one you specified in /etc/dhcpcd.conf), as your DNS server on your clients.
I sat my dhcpcd.conf as my router, but unfortunately nothing has been changed.
I still don't get DNS resolve on my PC when setting it to my raspberry pi.
What I don't understand is how we are bypassing the VPN issue with those configuration, it seems to me the regular configuration as if I didn't have VPN.
dhcpcd.conf needs to be set and edited on the raspberry as it pertains to that device only.
What you are trying to achieve with that is a stable static IP, non DHCP provided by the router.
That way, your DNS server IP will be constant in the network, regardless of reboots, power outages and all.
First, try to enable, configure and test the Pi-hole at LAN level. Once you are done with that, you can start working towards expanding it's reach to the VPN server too.
My pi-hole works fine on my raspberry (is this what you mean by LAN level?), it blocks ads and I can use the internet.
The troubles begin when I try to set my raspberry as DNS for other devices I.e. my PC.
LAN stands for Local Area Network.
What you are describing is LOCAL (as in only on the raspberry).
In order to achieve what you need, set a static IP on the raspberry via dhcpcd.conf.
Then as sated above, reconfigure Pi-hole and make sure to select the correct interface that it will listen to. Once you have that done, troubleshoot it at LAN level (use the IP you set-up as your DNS server on your PC).
Once you have that figured out and fixed, you can focus on VPN.
I believe I miss something.
I'm connected to the internet on my raspberry via my router (WiFi), so I followed the link you added and configured my raspberry dhcpcd.conf as described.
Then, I reconfigured my pihole to point out to my raspberry dhcpcd.conf settings.
After I tried to change my PC's DNS to my raspberry IP and lost DNS resolve.
The problem in my opinion is it doesn't matter how I configure dhcpcd.conf, my pihole's IP is still 10.0.0.2 as it gets it from the router and although in the settings I see 10.0.0.XXX as my pihole's IP, I can access to its admin interface only with 10.0.0.2.
Also, after I changed my dhcpcd.conf settings, the IP of my wlan0 when I'm hovering is 10.0.0.2.
I even tried reserving an IP on my router's dhcpc for my raspberry, but as it turns out my raspberry just ignores it.
The Pi-hole device needs a static (non-changing) IP address. It will not work when the Pi-hole device is given an address via router unless that IP is reserved at the router. This is called a static lease.
/etc/dhcpcd.conf must be set with a static IP address. If the IP address of the Pi-hole device changes in any way then you will break your network. If you tell clients that they need to use the DNS server at 10.0.0.2 and then the Pi-hole moves to 10.0.0.3 everything breaks.
First step is to make sure the Pi-hole is configured with a static IP address in the private range. Do not set it up with the address given by the VPN provider. The address should be in the range of addresses reserved for private networking. Private network - Wikipedia
Once you have that done, run pihole -d and let us know the token that it prints out. Then we can look at the configuration to make sure everything is set properly.
Sorry, I really try to do what you say and follow your instructions, sometimes I might not understand everything due to lack of knowledge. Please accept my sincere apology.
I did again what you guys offered with two minor differences, (but with some achievement):
I reserved an IP for my raspberry on my router 10.0.0.xxx)
I changed my "interface listening behavior" on my pihole from "listen only on interface eth0" to "listen on all interfaces".
Then I changed my PC's DNS and now it's working (with one problem, when I'm testing the adblocker via pihole adblocker website, it says that "only partial blocking detected", why is that?
Also, in my pihole's admin interface it says that I have 3 clients, when I'm only connected to two devices to my pihole, is that OK? Is there any way to see which devices are connected to my pihole?
That is most likely due to a non standard ad loading method that can't be handled at DNS level by Pi-hole. Consider installing a browser extension like ublockOrigin or adblock or something to that nature.
Most likely those requests go via IPV6. You need to either enable IPV6 on the pi + the router and broadcast the raspberry IPV6 IP as the DNS.