How to set up name resolution on a home network with both windows and linux hosts?

I have a home network that includes both windows 10 and ubuntu linux 20.04 and I do not know how to set up name resolution so that windows and linux hosts are able to resolve each other by name. My router (eero mesh) does not seem to offer a DNS service.

To be clear, windows machines can resolve other windows machines fine but I cannot ssh from windows to a linux machine without directly using the linux host IP. I also cannot seem to ssh from linux to linux except by IP. I would like for all of my hosts to successfully resolve each other by name since the IPs are dynamic.

What do I need to add or configure on a linux host so that name resolution from other hosts (both windows and linux) works well?

Hey @mark.d.harris,

Thanks for posting this separately. I hope you’re ready for a new project! For what you want to do, it sounds like you need a DNS server and from reading your post, it sounds like you’ve identified this as well:

There’s a couple of ways you can approach this. If you’re doing this for a homelab, I would recommend implementing a DHCP server alongside your DNS server. That way you can assign IP addresses alongside resolving those IP addresses. I think I would recommend dnsmasq for this.

Alternatively, if you just want to be able to resolve hostnames locally, and not have to remember IP addresses, the easiest solution is to simply add them to your /etc/hosts file (Windows also has its own hosts file equivalent). The downside to this is that it’s only a local file and you have to maintain it locally on each machine.

By the way, if you’re wondering why Windows hosts can resolve other Windows hosts, here’s the reason:

Let me know which option you want to go with and if you need any help.

I have 2 raspberry Pi 4’s and my goal is to have PI01 be my primary home network’s DNS + DHCP service + WireGuard VPN server and to modify my eero home router to simply bridge my home network to this PI01 so that all network services are managed by the PI01 and all the eero does is propagate the network via the better mesh signal it can do. As a secondary but separate goal, I wanted PI02 to be my traveling companion that I can use as a WireGuard client of my home VPN server, plus a DNS + DHCP server. I want it to be sort of like a portable WiFi device that ensures every client that connects to it is routed through the VPN tunnel to my home network so that the clients are completely ignorant of the routing.

I currently have PI01 working as a VPN server but I don’t have DNS or DHCP working yet and everything is still managed by my eero router.

Because I had a working PI01 VPN server I decided to try my PI02 (wireguard + wireless access point + DNS + DHCP) first. Several days and SD flashes later I can confirm that I think my PI02 wireless access point is now working like I want but I was not able to get dnsmasq to work at all so I’m now maybe to afraid to tear apart my primary home network :blush:.

There are a number of online articles that make various assumptions that are not valid in my case. For example, it seems that ubuntu 20.04 uses network-manager and not whatever everything else I found assumed. (I spent days and numerous SD reflashes trying various things but in the end, https://raspberrypi.stackexchange.com/questions/109425/ubuntu-server-18-wifi-hotspot-setup + https://engineerworkshop.com/blog/how-to-set-up-a-wireguard-vpn-server-on-ubuntu-linux/ + https://engineerworkshop.com/blog/how-to-set-up-a-wireguard-client-on-linux-with-conf-file/ was all I needed to make it work on my ubuntu 20.04 PI02. It feels like I ran around the world only to end up realized I had just crossed the street. LOL)

But now, when PI02 boots, clients can connect to it and so far in my limited testing seem to be able to access resources on my home network through the tunnel.

That still leaves my PI01 needing to be updated to host DNS + DHCP and my eero being reconfigured. I definitely want to do that but I think it might be prudent for me to wait until you write an article explaining it :blush:.

Any chance you’ll try setting up a PI4 (and write about it) to run ubuntu 20.04 server so that it can host DNS and DHCP and WireGuard VPN server and anything else relevant to properly manage a home network so that I can put the eero in bridge mode and manage all services on the PI?

1 Like