From one day to another, my samba share (Debian 8 with current Samba 4.1.17) stopped turning up in the windows network neighborhood (Win 10). For a few days it was still accessible by typing \\servername in the addressline, but this is not possible anymore now.
The shares are, however, still accessible by typing \\192.168.200.10 (the servers ip) in the address line, so the service is up & running, firewall lets the traffic in etc.
Since I didn't change any configs, I guess some update broke something. I tried everything I found to fix this issue, but no luck.
Question is now: How can I make the server show up in the network neighborhood like it did before, and make it accessible by hostname again? It's hard to get the family to always type in the IP.
EDIT: After reinstalling every package remotely connected to samba and copy-pasting the config back, I can access the shares via \\SERVER\share, but the server does still not show up in the network neighborhood.
Here come the smb.conf and iptables config:
smb.conf:
[global]
domain master = yes
preferred master = yes
local master = yes
wins support = yes
os level = 255
workgroup = WORKGROUP
netbios name = SERVER
security = user
guest ok = yes
guest account = nobody
map to guest = bad user
name resolve order = bcast lmhosts host wins
# disable printer stuff
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
[Share]
path = /path/to/share
force user = nobody
read only = No
create mask = 0777
force create mode = 0777
directory mask = 02777
force directory mode = 02777
browseable = yes
public = yes
iptables config:
root@SERVER:/etc/samba# iptables -L -n -v
Chain INPUT (policy ACCEPT 2070 packets, 209K bytes)
pkts bytes target prot opt in out source destination
463 83236 fail2ban-owncloud tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
463 83236 fail2ban-apache-nohome tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
463 83236 fail2ban-apache-modsecurity tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
463 83236 fail2ban-apache-overflows tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
463 83236 fail2ban-apache-noscript tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
1519 117K fail2ban-ssh-ddos tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
1519 117K fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
600 47664 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:137 state NEW,ESTABLISHED
46 10365 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:138 state NEW,ESTABLISHED
18 1983 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:139 state NEW,ESTABLISHED
73360 99M ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:445 state NEW,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1605 packets, 284K bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- * eth0 0.0.0.0/0 0.0.0.0/0 udp spt:137 state ESTABLISHED
11 2310 ACCEPT udp -- * eth0 0.0.0.0/0 0.0.0.0/0 udp spt:138 state ESTABLISHED
17 1964 ACCEPT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp spt:139 state ESTABLISHED
83301 26M ACCEPT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp spt:445 state ESTABLISHED
Chain fail2ban-apache-modsecurity (1 references)
pkts bytes target prot opt in out source destination
463 83236 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-nohome (1 references)
pkts bytes target prot opt in out source destination
463 83236 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-noscript (1 references)
pkts bytes target prot opt in out source destination
463 83236 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-overflows (1 references)
pkts bytes target prot opt in out source destination
463 83236 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-owncloud (1 references)
pkts bytes target prot opt in out source destination
463 83236 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-ssh (1 references)
pkts bytes target prot opt in out source destination
1519 117K RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-ssh-ddos (1 references)
pkts bytes target prot opt in out source destination
1519 117K RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
smbd and nmbd are running:
root@SERVER:/etc/samba# pgrep -l mbd
5999 smbd
6000 smbd
6023 nmbd
6024 nmbd
This
smbclient -L localhost
yields
SERVER Samba 4.1.17-Debian
Workgroup Master
--------- -------
WORKGROUP SERVER
so it looks like the server is correctly elected master.