DNS Local Network

LittleLion

Cadet
Joined
Jun 14, 2021
Messages
2
Hello,

I'm trying to add a DNS to my TrueNas and acess it through the name instead of the IP (only want for local network), is possible to do this configuration through the TrueNas?
Because my older Nas had this feature and all my paths are with a DNS name and not a IP, so all my software are giving some errors because the path are different, so i want to put the same DNS name in the new TrueNAS.

Thank for your help,
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Hello,

I'm trying to add a DNS to my TrueNas and acess it through the name instead of the IP (only want for local network), is possible to do this configuration through the TrueNas?
Because my older Nas had this feature and all my paths are with a DNS name and not a IP, so all my software are giving some errors because the path are different, so i want to put the same DNS name in the new TrueNAS.

Thank for your help,
The easiest solution is to configure your firewall/gateway -- pfSense, for example -- to provide DNS services.

Lacking a DNS server on your LAN, you can add hostnames and their IP addresses in the 'Host Name Database' under Networking->Global Configuration on your TrueNAS system. You would also need to add these to the hosts file on your PC or other servers. On Windows, hosts is located in the C:\Windows\System32\drivers\etc\ folder. On Linux/FreeBSD systems, it's located in the \etc\ folder.
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,829
Besides editing a local hosts file (and that can get old, depending on how many machines need said hosts file) another approach is to use a local DNS server like a pi-hole.

Pi-hole runs on many different platforms (raspberry pi being the origin) and allows you to serve up DNS info, block ads, malware, and reduce tracking. DNS info can be downloaded securely, making DNS poisoning attacks much more difficult.

I suggest running at least two local DNS servers for redundancy. Your local gateway to the internet can specify both and then they’ll work on a failover basis.

on the pi-hole, the GUI enables you to resolve what local DNS address is associated with which local machine name. Your browser may or may not accept a name the first time unless you put http:// in front of it, treating it as a search term instead of a site / non-numerical address.

However, for the above to work, your machines either need fixed IP addresses or static DHCP leases from your gateway. Either approach works.

to go bananas, your next step could be setting up an internal certificate authority as described over at smallstep lab to hand out local SSL certificates. That in turn will allow you to secure all GUI sessions with the NAS, for example.
 
Last edited:

LittleLion

Cadet
Joined
Jun 14, 2021
Messages
2
Thank you both for your help.
First i will implement the host file solution, then i will try to add a pi-hole as a local DNS server.

Best regards,
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,829
Great idea. See the blog over at Derek seaman’s site re: setup, including DNSSEC and auto updating. The actual pi hole software still needs periodic manual updates but it’s pretty easy to do once you set up passwordless SSH logins.

the one tricky thing with pi holes is setting up SSL connections in case that’s important to you.
 
Top