I have a question I was hoping the community could help me with.
I am trying to find a solution to my issue with traffic routing.
The issue
I want to use FQDN’s for my various homelab services without the requests leaving my network. For example, my Nextcloud is running at https://cloud.example.com and I want to continue to use that so that I can leave the FQDN in my client configurations so it will work when I am not on my LAN, but when I am on the LAN I want that to locally be resolved by the network to be able to leverage local network speeds (gigabit).
Is running my own DNS server the solution, or is there some easy way to do this in pfSense?
Have you run a traceroute to verify your traffic is leaving the local network? The DNS query probably does leave the local network though, but maybe not often depending on how long the local cache lasts.
Would that be on Gravity’s laptop, so they switch between “home” mode and “away” mode?
Or is the hosts file on the PFsense box, so it routes the FQDN address locally first?
Saying that, I wonder how those Nas boxes do it, where they one just enters “synology.com” or “dlink.com” and it routes to the local machine.
But then again, it would help if I could remember some of the actual companies that do this…
Yeah, and make sure pfsense is configured to be the first DNS server in its list, then you should be all set. That’s the kind of thing I would forget and then be confused about why it’s not working.
Run a local domain under the same name as the external domain.
So your domain would be example.com in your dhcp server or set up on the host itself.
All you have to do then is change the hostname of the server to cloud or something else you want it to resolve to.