OPNsense Forum

English Forums => General Discussion => Topic started by: Limete on July 08, 2023, 05:30:22 PM

Title: Wireguard and PiHole
Post by: Limete on July 08, 2023, 05:30:22 PM
My goal is to connect to my home network remotely so I can use my PiHole when accessing from somewhere else. I followed this guide https://homenetworkguy.com/how-to/configure-wireguard-opnsense/ (https://homenetworkguy.com/how-to/configure-wireguard-opnsense/) and can connect to the WireGuard server and access the internet but it doesn't seem that it's using my PiHole as the DNS.

In System: Settings: General, I have the DNS Server set to my PiHole internal IP.

In Services: DHCPv4: [LAN], I have the DNS Servers set also to my PiHole internal IP.

Do I need to have a firewall rule to point VPN requests to my PiHole for DNS? Another puzzling question is which DNS server could the Wireguard server be using if not the PiHole?
Title: Re: Wireguard and PiHole
Post by: RamSense on July 08, 2023, 07:36:03 PM
do you have a firewall rule for your wireguard port 53 pointing to your pihole?
(interface wg, source wg net, destination pi hole, Destination port range DNS)

or

In your guide there is a mention of pi-hole here:
Quote

Note

If you are using alternate DNS server(s) such as Pi-hole, you will need to specify those DNS servers by clicking the "advanced mode" and entering the DNS server IP address in the "DNS Server" box. You will need to have a firewall rule to allow access to the alternate DNS server(s) (unless you have an "allow all" rule for your WireGuard clients, which is not the best security practice).