you have to build a rule that all DNS requests from your LAN are forwarded to your pihole IP.then that should work, I think.
Why you invert the address?DHCP -> DNS -> IP PiholeLAN Rule:Pihole Ip -> any tcp/udp:53thats all.
It will work if you put a NAT loopback on the outbound NAT. Need to come back later with screenshots (not in the opportunity right now). You could also google on hairpin nat to see if you can come up with the solution yourself.
Quote from: Northguy on January 24, 2020, 12:29:19 pmIt will work if you put a NAT loopback on the outbound NAT. Need to come back later with screenshots (not in the opportunity right now). You could also google on hairpin nat to see if you can come up with the solution yourself.Hi,Create a port forward like this (NAT Port forward):Interface: LANProtocol: TCP/UDPSource: invert -> 192.168.1.22Source Port: AnyDestination: invert -> LAN ADDRESSDestination Port: DNSRedirect Target: 192.168.1.22Redirect Port: DNSNat Reflection: DisabledCreate an outbound NAT translation like this (NAT Outbound):Interface: LANProtocol: anySource: invert -> 192.168.1.22Source Port: AnyDestination: 192.168.1.22Destination Port: DNSTranslation/Target: interface addressThis should do the trick. One drawback is that in pihole you will see all redirected traffic coming from OPNsense instead of your client. When configuring a hard coded DNS like 1.1.1.1 and using nslookup, it still shows that 1.1.1.1 is resolving the DNS, but actually you will find an entry in pihole.Maybe it can be done in an easier way. Open to suggestions.
Thanks Northguy!One more question, is there a package/plugin similar to "pi hole" for opnsense?I saw one called sunnyvalley but not sure if this can take place of phhole or it's an overkill for a basic home usage.