Glam Prestige Journal

Bright entertainment trends with youth appeal.

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!

1

1 Answer

It turned out to be a firewall problem.

Solution as suggested at

  1. iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
  2. Add the following lines to the end of the file /etc/ufw/before.rules
 # The following is needed to enable Samba commands to # work properly for broadcast NetBIOS name resolution # # raw table rules *raw :OUTPUT ACCEPT [0:0] -F OUTPUT -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns COMMIT
  1. Restart UFW!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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