Results 1 to 10 of 10

Thread: Samba not working when the roouter is not connected to internet(WAN) or the internet is down

  1. #1

    Default Samba not working when the roouter is not connected to internet(WAN) or the internet is down

    Hello!
    I have this problem:
    1.SAMBA does not work when i have not internet connection to my router. Windows machines talk to each other perfect, but none of them can access my OpenSuse Linux server if the router is not conneccted to the internet. Not even my Android device can not connect to OpenSuse.. As soon as i plug the WAN cable (from my internet modem to my router), samba works perfect and the windows clients can connect to OpenSuse server, and also the Android device...
    2. If from any reason, my internet connection drops, due to my Internet Provider problems or anything, so in this scenario the router is connected to the modem, but the bodem have no internet signal from my Internet Provider, samba on my OpenSuse server is down again... When the internet comes back, the samba is running fain again..

    Any ideas why such a strange behavior?
    Why Samba is not working when the router is not connected to WAN/internet?

    Thank YOU very MUCH!

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    On 2014-05-22 12:56, tryit wrote:

    > 2. If from any reason, my internet connection drops, due to my Internet
    > Provider problems or anything, so in this scenario the router is
    > connected to the modem, but the bodem have no internet signal from my
    > Internet Provider, samba on my OpenSuse server is down again... When the
    > internet comes back, the samba is running fain again..


    What's the name of the local domain?
    Maybe the Linux machine tries to solve a DNS query that does not work
    for some reason.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  3. #3

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    >What's the name of the local domain?
    >Maybe the Linux machine tries to solve a DNS query that does not work
    >for some reason.
    --
    Carlos E. R.

    The name of the local domain is a custom one, choosed randomly by me...
    Any sugestions? I am not quite a computer profesional, so any sugestions would be greatly apreciated.. Thank You!
    Here is the smb.conf file I use:

    Code:
    ############################
    # smb.conf is the main Samba configuration file. You find a full commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    [global]
        workgroup = myCustomWorkgroup
        passdb backend = tdbsam
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = No
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
        domain logons = Yes
        domain master = No
        netbios name = myServerName
        server string = myServerName
        security = user
        wins support = Yes
        name resolve order = bcast hosts lmhosts wins
    
    ## Share disabled by YaST
    # [homes]
    #    comment = Home Directories
    #    valid users = %S, %D%w%S
    #    browseable = No
    #    read only = No
    #    inherit acls = Yes
    
    ## Share disabled by YaST
    # [profiles]
    #    comment = Network Profiles Service
    #    path = %H
    #    read only = No
    #    store dos attributes = Yes
    #    create mask = 0600
    #    directory mask = 0700
    
    ## Share disabled by YaST
    # [users]
    #    comment = All users
    #    path = /home
    #    read only = No
    #    inherit acls = Yes
    #    veto files = /aquota.user/groups/shares/
    
    ## Share disabled by YaST
    # [groups]
    #    comment = All groups
    #    path = /home/groups
    #    read only = No
    #    inherit acls = Yes
    [printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No
    [print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775
    
    ## Share disabled by YaST
    # [netlogon]
    #    comment = Network Logon Service
    #    path = /var/lib/samba/netlogon
    #    write list = root
    
    [SharedDirectory1]
        comment = SharedDirectory1
        inherit acls = Yes
        path = /data/SharedDirectory1
        read only = No
    
    [SharedDirectory2]
        comment = SharedDirectory2
        inherit acls = Yes
        path = /data/SharedDirectory2
        read only = Yes
    
    [SharedDirectory3]
        comment = SharedDirectory3
        inherit acls = Yes
        path = /data/SharedDirectory3
        read only = No
    ############################

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    On 2014-05-22 15:46, tryit wrote:

    >
    > The name of the local domain is a custom one, choosed randomly by me...
    > Any sugestions? I am not quite a computer profesional, so any sugestions
    > would be greatly apreciated.. Thank You!


    Some people invent a random one, as you say, but name it
    "myownrandomdomaininnowhere.com". It is is the last part, the ".com", or
    org, or whatever that does exist, which causes problems, because a query
    has to be made on Internet whenever you refer to it by name. And
    sometimes it happens that the random domain you invented does in fact exist.

    Another problem is selecting one like "myhouse.local". Perfectly
    reasonable... but it happens that avahi services break (and they run by
    default) when combined with some samba services, specially when it is a
    windows domain (you have a workgroup, not a windows domain, so perhaps
    it does not matter).

    So now I typically use "myhouse.lnet" or something like that. And, I
    have a local domain server that solves that domain locally, no external
    queries.


    I don't know if this is your problem, but my guess is that something is
    trying to solve a name in Internet.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  5. #5
    Join Date
    Sep 2013
    Location
    New York
    Posts
    198

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    Quote Originally Posted by robin_listas View Post
    On 2014-05-22 15:46, tryit wrote:

    >
    > The name of the local domain is a custom one, choosed randomly by me...
    > Any sugestions? I am not quite a computer profesional, so any sugestions
    > would be greatly apreciated.. Thank You!


    Some people invent a random one, as you say, but name it
    "myownrandomdomaininnowhere.com". It is is the last part, the ".com", or
    org, or whatever that does exist, which causes problems, because a query
    has to be made on Internet whenever you refer to it by name. And
    sometimes it happens that the random domain you invented does in fact exist.

    Another problem is selecting one like "myhouse.local". Perfectly
    reasonable... but it happens that avahi services break (and they run by
    default) when combined with some samba services, specially when it is a
    windows domain (you have a workgroup, not a windows domain, so perhaps
    it does not matter).

    So now I typically use "myhouse.lnet" or something like that. And, I
    have a local domain server that solves that domain locally, no external
    queries.


    I don't know if this is your problem, but my guess is that something is
    trying to solve a name in Internet.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))
    do you think I am safe with "myhouse.lan" domain?
    it seams to work but just want to ask just in case...

  6. #6

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    Hello, Thank You!

    1.
    Quote Originally Posted by robin_listas View Post
    On 2014-05-22 15:46, tryit wrote:
    So now I typically use "myhouse.lnet" or something like that. And, I
    have a local domain server that solves that domain locally, no external
    queries.
    ---
    Carlos E. R.
    I simply use "myworkgroup" for theWorkGroup name
    just like this, no dots or Uppercase or nothing.
    Is this ok, or shood I use a . (dot) somewhere in the WorkGroup name, like "my.workgroup"?

    2.
    Quote Originally Posted by robin_listas View Post
    On 2014-05-22 15:46, tryit wrote:
    So now I typically use "myhouse.lnet" or something like that. And, I
    have a local domain server that solves that domain locally, no external
    queries.
    To what IP do You solve "myhouse.lnet"?
    To Your Router IP or to Your server PC that runs SAMBA shared directories?
    By Router I understand my wireless router..

    Thank You!

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    On 2014-05-22 17:36, vl1969 wrote:

    > do you think I am safe with "myhouse.lan" domain?
    > it seams to work but just want to ask just in case...


    I think it is safe.

    Your question prompts another one, how to find if a top level domain
    does not exist...? :-?

    There is a list here, but it is not canonical:

    http://en.wikipedia.org/wiki/List_of...-level_domains


    Maybe there is a command to test the existence of a top level domain? I
    fail to concoct one.


    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    On 2014-05-22 22:36, tryit wrote:

    > I simply use "myworkgroup" for theWorkGroup name
    > just like this, no dots or Uppercase or nothing.
    > Is this ok, or shood I use a . (dot) somewhere in the WorkGroup name,
    > like "my.workgroup"?


    No, that's ok.



    > 2.
    > robin_listas;2644768 Wrote:
    >> On 2014-05-22 15:46, tryit wrote:
    >> So now I typically use "myhouse.lnet" or something like that. And, I
    >> have a local domain server that solves that domain locally, no external
    >> queries.
    >>

    > To what IP do You solve "myhouse.lnet"?


    192.168.1.15, or any one I want.

    > To Your Router IP or to Your server PC that runs SAMBA shared
    > directories?
    > By Router I understand my wireless router..


    The house router.

    I may have, following the example:

    router.lnet 192.168.1.1
    machineone.lnet 192.168.1.2
    machinetwo.lnet 192.168.1.3
    machinethree.lnet 192.168.1.4


    It is not important.
    But if you use names, something will have to try to convert the names to
    IPs. If you have a name such as "myhouse.com", mandatorily that name has
    to be asked on internet. And in fact, the name does exist!


    Code:
    cer@minas-tirith:~> host myhose.com
    myhose.com has address 208.73.211.199
    myhose.com has address 208.73.211.172
    myhose.com has address 208.73.211.152
    myhose.com has address 208.73.211.196
    myhose.com has address 208.73.211.235
    cer@minas-tirith:~>


    Notice that I'm not saying that this is your problem. What I say is that
    if you choose names for your computers in such a way, it might cause
    that kind of problem.


    Possibly, your network is configured to ask names to the DNS cache
    server that is typically on the router. However, the router is itself
    configured to ask a DNS in Internet... and this will fail if there is no
    internet.

    Thus, maybe you have to change your shares to use the IP of the server
    instead of its name.

    On the other hand, maybe setting up WINS in the Linux machine helps. I
    don't remember how this is done, though, it should be deprecated.


    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: Samba not working when the roouter is not connected to internet(WAN)or the internet is down

    On 5/22/2014 8:46 AM, tryit wrote:
    >
    >> What's the name of the local domain?
    >> Maybe the Linux machine tries to solve a DNS query that does not work
    >> for some reason.

    > --
    > Carlos E. R.
    >
    > The name of the local domain is a custom one, choosed randomly by me...
    > Any sugestions? I am not quite a computer profesional, so any sugestions
    > would be greatly apreciated.. Thank You!
    > Here is the smb.conf file I use:
    >
    >
    > Code:
    > --------------------
    > ############################
    > # smb.conf is the main Samba configuration file. You find a full commented
    > # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    > # samba-doc package is installed.
    > [global]
    > workgroup = myCustomWorkgroup
    > passdb backend = tdbsam
    > printing = cups
    > printcap name = cups
    > printcap cache time = 750
    > cups options = raw
    > map to guest = Bad User
    > logon path = \\%L\profiles\.msprofile
    > logon home = \\%L\%U\.9xprofile
    > logon drive = P:
    > usershare allow guests = No
    > add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
    > domain logons = Yes
    > domain master = No
    > netbios name = myServerName
    > server string = myServerName
    > security = user
    > wins support = Yes
    > name resolve order = bcast hosts lmhosts wins

    <snip>
    > ############################
    > --------------------
    >


    tryit;

    I notice that you have the parameter "wins support = Yes". This means that Samba will act as a wins server for your
    workgroup. There can be only one wins server and each client (not the wins server itself) must be pointed to the IP of
    that wins server. Either this is set by dhcp or set statically. At the same time you have the name resolve order set to
    try broadcasts first, then the hosts file, thirdly the lmhosts file and lastly the wins server. Almost certainly name
    resolution will time out before wins is checked. This probably does not explain why name resolution fails when the
    router is disconnected from the modem, but may lead to some strange behavior.

    Make sure that nmb(d) (netbios server) is started and allowed as a service through your firewall:
    Code:
    systemctl status nmb.service
    I assume your router serves as your dhcp server. But can you check, both when you are connected to the modem and not
    connected to the modem, what IP is assigned to both the openSUSE machine and a Windows client.
    On Linux:
    Code:
    /sbin/ifconfig -a
    On Windows:
    Code:
    ipconfig
    I wonder if you are winding up on different subnets when connected to the modem and not connected to the modem. Sort of
    a shot in the dark.
    --
    P.V.
    "We're all in this together, I'm pulling for you" Red Green

  10. #10

    Default Re: Samba not working when the roouter is not connected to internet(WAN) or the internet is down

    Quote Originally Posted by tryit View Post
    Hello!
    I have this problem:
    1.SAMBA does not work when i have not internet connection to my router. Windows machines talk to each other perfect, but none of them can access my OpenSuse Linux server if the router is not conneccted to the internet. Not even my Android device can not connect to OpenSuse.. As soon as i plug the WAN cable (from my internet modem to my router), samba works perfect and the windows clients can connect to OpenSuse server, and also the Android device...
    2. If from any reason, my internet connection drops, due to my Internet Provider problems or anything, so in this scenario the router is connected to the modem, but the bodem have no internet signal from my Internet Provider, samba on my OpenSuse server is down again... When the internet comes back, the samba is running fain again..

    Any ideas why such a strange behavior?
    Why Samba is not working when the router is not connected to WAN/internet?

    Thank YOU very MUCH!
    SOLVED!!!!!


    Looks like in
    /etc/resolv.conf
    I had no ip set for the local DNS nameserver, wich in my case is the rooter itself.
    I had a few ips of internet DNS nameservers, that point out of my network, but not to my router, so ai just added:

    nameserver 192.168.1.2
    where 192.168.1.2 is my router ip. and SAMBA works just great even when my internet conexion is down!!

Posting Permissions

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