I am trying to access a samba share on CentOS7 from other PC in a different subnet.

  • Samba version 4.4.4
  • Server: CentOS7
  • Clients: Windows 10, Ubuntu Mate, Windows 7.
  • Subnet A: (old)
  • Subnet B: (new)

The server is in subnet A (this will change in the future because we will leave subnet A). Access from all PCs in subnet A works fine.

All PCs in subnet B don't work, which means they do not have access to the share. Also I cannot see the share in the Networks Browser from Windows or Mate.

I can ping in both directions, I can access e.g. an Apache server in subnet A from PCs in subnet B. The pc with the share also runs the dhcpd. The PC in subnet B get the right IP-addresses from it.

The subnets are in the same physical network, connected to one router, which is the gateway to the outside (university network, Internet). I do not have direct access to it's configuration (we are part of an university network).

The smb.conf:


workgroup = xyz
interfaces = lo enp3s0
bind interfaces only = yes
hosts allow = 127. 11.22.33. 11.22.66.

security = user
passdb backend = tdbsam

map to guest = Bad User
guest account = nobody

local master = yes
os level = 255
preferred master = yes

domain master = yes

wins support = yes

# Share Definitions

What can I do?


The problem was with the firewall of our router/gateway which blocked the ports used by SMB (135 - 139 and 445). After our IT department opened the ports it worked.

  • I think you need to setup the devices in subnet B to use the Samba server, as a WINS server. You can do this by assigning the value via DHCP, or manually. I'm leaving this as a comment as I'm not 100% sure and can't test currently. Feb 20 '17 at 13:57
  • @djsmiley2k I tried this, but it doesn't help. But I think I found the problem: The router firewall may block the ports used by SMB (135 - 139 and 445). I will give an update when IT opened the ports. Thanks
    – dice
    Feb 21 '17 at 14:41
  • The firewall was the problem.
    – dice
    Jul 21 '17 at 10:15
remote announce=
  • It would be helpful if you explained in detail what setting remote announce to your suggest value does exactly. I am not asking for myself, I already know what it does, so you should edit your answer and improve it. If you don't wish to improve your answer just ignore this comment.
    – Ramhound
    Dec 30 '17 at 5:38

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.