I can neither ping nor access Windows 7 Samba shares through the hostname.
As recommended at (inter alia) can not ping by host name for some computers, I have edited
/etc/nsswitch.conf
to include
hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4
I have also restarted services as suggested, yet no go.
When attempting to ping my Windows 7 machine, the output is:
ping: <hostname>: Name or service not known
Advice as to how best to resolve Windows hostnames on Ubuntu will be appreciated. Thanks in advance!
Best Answer
It turned out to be a firewall problem.
Solution as suggested at https://fitzcarraldoblog.wordpress.com/2017/08/11/prevent-linux-firewalls-interfering-with-samba-commands-in-a-home-network-that-uses-broadcast-netbios-name-resolution/
iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
/etc/ufw/before.rules