[solved] dual wan and pi-hole on opnsense

Started by chuliu, January 21, 2023, 01:11:04 PM

Previous topic - Next topic
January 21, 2023, 01:11:04 PM Last Edit: January 22, 2023, 03:48:24 AM by chuliu
Hi, I am new to opnsense and software router as a whole.  I just received the intel celeron N5105 hardware with 4 network ports a few days ago with pfsense installed.  For some reason, pfsense wouldn't work well for my xbox series x giving me a double nat error.  I decided to switch to opnsense. 

Now, here is my setup:  N5105 cpu with 4 netowrk ports, dual ftth from different isps with the same speed, pi-hole with unbound on rasphberry pi, one lan with ip addresses 192.168.86.1/24 

I followed this and set up my opnsense with dual wan and set the dns servers to google and cloudflare respectively.  I didn't set the dns to my pi-hole becuase if I set it up in system->settings->general by filling up my pi-hole ip and specifying the gateways and saved it, it will give me an error saying "You can not assign a gateway to DNS server "192.168.86.150" which is on a directly connected network." 

My goal is to be able to set up pi-hole as dns server for the network for blocking youtube from my kids.  I don't mind if I cannot use unbound for dns resolver.  If I can, that is even better.  How can I set it up with the opnsense limiting me from setting up dns with an ip in the lan subnet.  Thanks. 

pihole address goes in the DHCP settings for your subnet.

Never thought it was as easy as that!
Thanks.