I'm having a server running Ubuntu 14.04. Recently I've set up a Samba-Server to share some files with the Windows computers in the network. It's working but only accessible from the machine where it's running. It has a static IP:

If I connect with: smbclient // -U NAS, it works. But only one the server. All the ports needed are opened with GUFW, using the Samba preset.

On other computers the server is visible, but if I connect to it I get a NT_STATUS_CONNECTION_REFUSED error.

Here's my smb.conf, extracted with testparm:

        server string = %h server (Samba, Ubuntu)
        interfaces =, p5p1
        server role = standalone server
        map to guest = Bad User
        obey pam restrictions = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        username map = /etc/samba/smbusers
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        load printers = No
        printcap name = /dev/null
        disable spoolss = Yes
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
        printing = bsd
        print command = lpr -r -P'%p' %s
        lpq command = lpq -P'%p'
        lprm command = lprm -P'%p' %j

        path = /home/NAS/NAS
        valid users = NAS
        read only = No
        guest ok = Yes

Thank you!


not sure what p5p1 is on your server, but please edit your interfaces-setting according to your subnet:

    server string = %h server (Samba, Ubuntu)
    interfaces =,, p5p1
    server role = standalone server

furthermore, also check your iptables if you have them enabled.

  • Got it! I configured the firewall through GUFW, but it wasn't activated. – Lucas Crijns Mar 22 '15 at 16:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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