Results 1 to 10 of 29

Thread: Firewall blocked for samba

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Firewall blocked for samba

    Hi I have Ubuntu 9.04 installed and a healthy Samba installation.

    If I have the firewall, UFW, activated I cannot see my network and get this error message in Nautilus when I click "Windows Network"
    failed to retrieve share list from server
    .

    I have enabled samba by running this UFW command:
    Code:
    sudo ufw allow samba
    . In the GUI GUFW I then see that these rules have been added:
    137,138/udp (samba) ALLOW anywhere
    139,445/tcp (samba) ALLOW anywhere
    I have edited the file /etc/default/ufw, in particular I added nf_conntrack_netbios_ns so the relevant line becomes like so:
    Code:
    IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns"
    Despite all that, Samba only works if I turn UFW off.

    What have I missed?

    Thanks
    swerdna

  2. #2
    Join Date
    Feb 2007
    Location
    California
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Firewall blocked for samba

    did you set workgroup to "WORKGROUP" ?

    install this for setting up samba options.

    http://gadmintools.flippedweb.com/in...d=16&Itemid=30

    if you dont know how to compile from source or dont want to, you can install 'alien' and use the rpm package for install.
    Interested in Dropbox? Click here to join and we both get an extra 250mb FREE!

  3. #3
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Firewall blocked for samba

    Quote Originally Posted by ericab View Post
    did you set workgroup to "WORKGROUP" ?
    I set workgroup = SWERDNA to match the other four workstations on the LAN
    install this for setting up samba options.

    http://gadmintools.flippedweb.com/in...d=16&Itemid=30
    But I don't need to adjust samba, it works great when UFW is disabled. I configure Samba from the CLI and am an expert at it. The problem is with UFW which I have enabled for samba by using
    Code:
    sudo ufw allow  samba
    as recommended variously elsewhere. But that advice seems to be erroneous. Can you give me the correct method for configuring for Samba the UFW firewall? (The problem is that UFW is effectively the default recommended firewall and the advice out there isn't working)


    if you dont know how to compile from source or dont want to, you can install 'alien' and use the rpm package for install.
    No thanks, I'm good for configuring samba.

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Firewall blocked for samba

    I doubt it's as simple as restarting "something"...
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad] [Sub-forum]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  5. #5
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Firewall blocked for samba

    OK here's the answer:

    Remove the much vaunted service-based rule for Samba with this command:
    Code:
    sudo ufw delete samba
    Replace it with port-based rules for the trusted network:
    Code:
    sudo ufw allow proto udp to any port 137 from 192.168.29.0/24
    sudo ufw allow proto udp to any port 138 from 192.168.29.0/24
    sudo ufw allow proto tcp to any port 139 from 192.168.29.0/24
    sudo ufw allow proto tcp to any port 445 from 192.168.29.0/24
    Adjusting the IP mask for individual LANs.

    Sadly, the UFW fails on a service-based rule, which is probably a bug. I suppose that UFW is fairly new and is mostly left turned off, so this problem will take some time to be noticed by the bug-fixers. All will come good in time

  6. #6
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Firewall blocked for samba

    Well, at least there is now a workaround... Thanks for posting (hope I can remember it if/when another thread mentions a similar problem.)
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad] [Sub-forum]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  7. #7
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Firewall blocked for samba

    Quote Originally Posted by swerdna View Post
    Sadly, the UFW fails on a service-based rule, which is probably a bug. I suppose that UFW is fairly new and is mostly left turned off, so this problem will take some time to be noticed by the bug-fixers. All will come good in time
    Please file a bug report

    I've added your findings to my Fix Windows share browsing howto (6th link in my sig).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •