Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I create a bunch of Linux and Windows VMs from time to time on my network, and assign them unique names. To access these boxes by name, I have to do this:

  • On The Linux box to be discovered, install samba.
  • On The Windows box to be discovered, do nothing. They know WINS.
  • On Other Linux boxes that need to discover it, install winbind and add wins to /etc/nsswitch.conf.
  • On Other Windows boxes that need to discover it, do nothing. They know WINS.

My problem is when Mac OS is thrown into the mix. I have a bunch of Mac OS Lion boxes that need to discover those Windows and Linux boxes.

What should I be doing on Mac OS Lion to make it locate those linux and windows boxes by name? I want to ssh into them and also use the browser to access them over http and https.

share|improve this question
add comment

2 Answers

It would probably be easier to install avahi-daemon, make sure it's running (e.g. service avahi-daemon start) and not firewalled:

$IPT -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

where $IPT is iptables or your favorite Linux firewall program.

After this, the Mac and everything else on the network should be able to access it as hostname.local.

share|improve this answer
add comment

Macs can browse Windows workgroups/domains (that is, see a list of available server names), and use NetBIOS Name Service and WINS for name resolution (that is, take the names from the list above and convert them to IP addresses so it can actually connect). Note that these can be two separate operations; it's not uncommon to have network situation where browsing works but name resolution doesn't (so you see a list of servers but can't connect) or vice-versa (you can't see a list, but you can connect to servers by name).

If your DHCP server is set up to tell clients what WINS server to use, your Macs should automatically use that. If you want to manually configure it on each Mac, it's in

System Preferences > Network > [Interface] > Advanced > WINS

If setting it up there is not enough, see if it helps to enable Windows-style file sharing in

System Preferences > Sharing > File Sharing > Options… > Share files and folders using SMB (Windows).
share|improve this answer
    
I never had to configure a WINS server, and I don't think I have one, other than the DHCP server. However this does not work. The second option helps to make the Mac visible to others; But not to make others visible to it. –  rahul Jul 17 '12 at 16:52
    
@rahul Then why did you say twice that you're using WINS? WINS is by definition server-based name resolution on Microsoft-based networks. It complements/supersedes NetBIOS Name Service, which is the peer to peer name resolution protocol Windows used before Microsoft created WINS. –  Spiff Jul 17 '12 at 17:12
    
I'm not sure. I might be doing things wrong, but enabling WINS on linux was the only way I could make the linux box see other boxes not in the DNS. –  rahul Jul 18 '12 at 23:47
1  
@rahul In the [global] section of your Samba server's smb.conf, do you have "wins support = yes", or do you haven "wins server = [some IP address]"? If it's the former, then your Samba server is your WINS server. If it's the latter, then you can use IP address to determine which machine on your network is your WINS server. The mystery is how your Windows and Linux client machines knew which machine to use as their WINS server if you never configured it on the clients, and never configured your DHCP server to hand out that information either (I'm assuming you'd remember if you'd set that up). –  Spiff Jul 19 '12 at 0:54
    
'wins support = no' but it's preceeded by a semicolon. So it's commented. It's the default that came with ubuntu. –  rahul Jul 19 '12 at 18:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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