0

Scenario: small home/workshop network (behind NAT), one Linux server running Samba 3.6.6 + DHCP-server + pdns-client (caching dns), some 2-3 workstations (Linux + Windows) and some 2-5 units (Android phones, Linux, Windows, etc) connecting every now and then by WiFi or ethernet.

For the fixed workstations and a laptop, I have taken their MAC-address and put it into the DHCP-server so they get a fixed IP everytime, so I can login to them with ssh or whatever. Recently, I added these fixed IP-addresses to /etc/hosts on the Linux-server, so I can do ssh some-machine and it works fine.

Now, what I would like to do is to skip this fixed IP-address and manually editing /etc/hosts. I'd like to let the Windows-machines names (netbios names or whatever it's called in that world) automatically be registered somewhere where pdns-client can get the name and IP.

From within Windows, I can do \\SOME-MACHINE and resolves it in some way (I don't know how, but I surmise it's internally via the Windows network). If I use a Linux workstation, I can not do ping SOME-MACHINE without first having the address added to /etc/hosts on the server, plus making sure the DHCP IP-lease is fixed, else it won't work.

Question: Is there some tool, some addon to Samba, something at all that I can run on the Linux server that fetches all the clients' names and makes them resolvable?

  • Not sure if this will help but -- askubuntu.com/questions/126467/… – Anaksunaman Nov 10 '15 at 18:54
  • And just as a simple, curious aside, I get the impression you want to do this dynamically, but is there some reason you are against fixed IPs with local DNS? – Anaksunaman Nov 10 '15 at 18:56
0

There's two options. You can try using mDNS using the Avahi stack. That usually just involves installing Avahi and sometimes enabling it. Steps will vary by your Linux distro. The other option is setting up DHCP-based dynamic DNS so the hostnames are automatically registered. This requires a Linux box to be running isc-dhcp-server and named. Here's a tutorial on that: http://www.brennan.id.au/08-Domain_Name_System_BIND.html#dynamic_dns

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.