Nowe posty

xx Problem z koszem po odpięciu dysku od Win 10 (2)
Dzisiaj o 13:56:45
xx Wirtualki - podział usług (0)
Wczoraj o 12:23:37
xx Dostęp do serwera DNS w innej podsieci (4)
Wczoraj o 11:06:11
xx Samba za NAT nie działa (5)
2017-05-24, 17:20:31
xx Skrypt- wyszukiwanie nazwy w tresci plikow (2)
2017-05-24, 16:46:33
xx Instalacja linux na pendriva (2)
2017-05-23, 11:04:27
xx Sprzedam książkę (1)
2017-05-19, 21:35:45
xx Bash, Unix - ściągawka (2)
2017-05-18, 08:54:50
xx Po aktualizacji Xubuntu nie działa wifi. (0)
2017-05-18, 01:43:56
sad Zlecę wykonanie skryptu (0)
2017-05-18, 00:22:32

Autor Wątek: Samba za NAT nie działa  (Przeczytany 249 razy)

Offline pld

  • Users
  • Nowy na forum
  • *
  • Wiadomości: 20
    • Zobacz profil
Samba za NAT nie działa
« dnia: 2017-05-19, 11:16:37 »
Witam,
nie mam połączenia z sambą, oczywiscie próbuje się połączyć w tej samej podsieci
Proszę o pomoc

Serwer smb jest za NAT'em , IP przypisywany statycznie przez DHCP (czy to ma znaczenie)

smb:~ # systemctl status smb -l
smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled)
   Active: active (running) since Fri 2017-05-19 10:56:25 CEST; 2s ago
  Process: 1780 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
 Main PID: 1784 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smb.service
           ├─1784 /usr/sbin/smbd -D
           └─1786 /usr/sbin/smbd -D

May 19 10:56:25 smb systemd[1]: smb.service: Supervising process 1784 which is not our child. We'll most likely not notice when it exits.
May 19 10:56:25 smb systemd[1]: Started Samba SMB Daemon.
May 19 10:56:25 smb smbd[1784]: [2017/05/19 10:56:25.714549,  0] ../lib/util/become_daemon.c:124(daemon_ready)
May 19 10:56:25 smb smbd[1784]: STATUS=daemon 'smbd' finished starting up and ready to serve connections

Offline marcin'82

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 144
    • Zobacz profil
Odp: Samba za NAT nie działa
« Odpowiedź #1 dnia: 2017-05-19, 19:19:40 »
Jaki system?

W systemie, który serwuje sambę trzeba otworzyć ruch na portach 137:139 tcp + udp oraz 445 tcp + udp.

Klient musi mieć dozwolony ruch na portach 137 udp oraz 139+445 tcp.
« Ostatnia zmiana: 2017-05-19, 19:22:42 wysłana przez marcin'82 »
marcin82

Offline pld

  • Users
  • Nowy na forum
  • *
  • Wiadomości: 20
    • Zobacz profil
Odp: Samba za NAT nie działa
« Odpowiedź #2 dnia: 2017-05-22, 08:26:35 »
Jaki system?

W systemie, który serwuje sambę trzeba otworzyć ruch na portach 137:139 tcp + udp oraz 445 tcp + udp.

Klient musi mieć dozwolony ruch na portach 137 udp oraz 139+445 tcp.
Opensuse

w sumie to nie pomogło

Offline marcin'82

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 144
    • Zobacz profil
Odp: Samba za NAT nie działa
« Odpowiedź #3 dnia: 2017-05-22, 17:31:33 »
No to musisz dotrzeć do logów usług:
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.samba.html#sec.samba.serv.start

Co pokazuje?
systemctl status {s,n}mb

Sprawdź /var/log/samba/* , syslog lub journalctl (nie wiem czy w OpenSUSE jest ustawione przekierowanie do syslog czy nie).
marcin82

Offline pld

  • Users
  • Nowy na forum
  • *
  • Wiadomości: 20
    • Zobacz profil
Odp: Samba za NAT nie działa
« Odpowiedź #4 dnia: 2017-05-23, 08:28:34 »
No to musisz dotrzeć do logów usług:
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.samba.html#sec.samba.serv.start

Co pokazuje?
systemctl status {s,n}mb

Sprawdź /var/log/samba/* , syslog lub journalctl (nie wiem czy w OpenSUSE jest ustawione przekierowanie do syslog czy nie).


 systemctl status smb -l
smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled)
   Active: active (running) since Tue 2017-05-23 08:19:32 CEST; 5min ago
  Process: 947 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
 Main PID: 951 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smb.service
           ├─951 /usr/sbin/smbd -D
           └─953 /usr/sbin/smbd -D

May 23 08:19:31 linux-bcbt systemd[1]: smb.service: Supervising process 951 which is not our child. We'll most likely not notice when it exits.
May 23 08:19:32 linux-bcbt systemd[1]: Started Samba SMB Daemon.
May 23 08:19:32 linux-bcbt smbd[951]: [2017/05/23 08:19:32.250592,  0] ../lib/util/become_daemon.c:124(daemon_ready)
May 23 08:19:32 linux-bcbt smbd[951]: STATUS=daemon 'smbd' finished starting up and ready to serve connections

systemctl status nmb -l
nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
   Active: active (running) since Tue 2017-05-23 08:19:41 CEST; 6min ago
 Main PID: 946 (nmbd)
   Status: "nmbd: ready to serve connections..."
   CGroup: /system.slice/nmb.service
           └─946 /usr/sbin/nmbd -D

May 23 08:24:38 linux-bcbt nmbd[946]:
May 23 08:24:38 linux-bcbt nmbd[946]: Samba name server LINUX-BCBT has stopped being a local master browser for workgroup WORKGROUP on subnet 10.0.2.88
May 23 08:24:38 linux-bcbt nmbd[946]:
May 23 08:24:38 linux-bcbt nmbd[946]: *****
May 23 08:24:56 linux-bcbt nmbd[946]: [2017/05/23 08:24:56.521563,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
May 23 08:24:56 linux-bcbt nmbd[946]: *****
May 23 08:24:56 linux-bcbt nmbd[946]:
May 23 08:24:56 linux-bcbt nmbd[946]: Samba name server LINUX-BCBT is now a local master browser for workgroup WORKGROUP on subnet 10.0.2.88
May 23 08:24:56 linux-bcbt nmbd[946]:
May 23 08:24:56 linux-bcbt nmbd[946]: *****

cat /var/log/samba/log.smbd
[2017/05/23 08:10:22,  0] ../source3/smbd/server.c:1244(main)
  smbd version 4.2.4-40.1-3678-SUSE-oS13.2-i386 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/05/23 08:10:23.002902,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'smbd' finished starting up and ready to serve connections
[2017/05/23 08:10:23.143369,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2017/05/23 08:10:23.152432,  0] ../source3/printing/print_cups.c:529(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2017/05/23 08:11:23.153448,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2017/05/23 08:11:23.160335,  0] ../source3/printing/print_cups.c:529(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2017/05/23 08:16:43.440301,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
  Failed to delete pidfile /run/samba/smbd.pid. Error was No such file or directory
[2017/05/23 08:19:31,  0] ../source3/smbd/server.c:1244(main)
  smbd version 4.2.4-40.1-3678-SUSE-oS13.2-i386 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/05/23 08:19:32.250592,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'smbd' finished starting up and ready to serve connections

cat /var/log/samba/log.nmbd
[2017/05/23 08:10:26,  0] ../source3/nmbd/nmbd.c:908(main)
  nmbd version 4.2.4-40.1-3678-SUSE-oS13.2-i386 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/05/23 08:10:26.750496,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2017/05/23 08:14:08.823457,  0] ../source3/nmbd/nmbd.c:58(terminate)
  Got SIGTERM: going down...
[2017/05/23 08:16:03,  0] ../source3/nmbd/nmbd.c:908(main)
  nmbd version 4.2.4-40.1-3678-SUSE-oS13.2-i386 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/05/23 08:16:03.209094,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2017/05/23 08:16:25.696351,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  *****

  Samba name server LINUX-BCBT is now a local master browser for workgroup WORKGROUP on subnet 10.0.2.88

  *****
[2017/05/23 08:16:44.612659,  0] ../source3/nmbd/nmbd.c:58(terminate)
  Got SIGTERM: going down...
[2017/05/23 08:19:41,  0] ../source3/nmbd/nmbd.c:908(main)
  nmbd version 4.2.4-40.1-3678-SUSE-oS13.2-i386 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2014
[2017/05/23 08:19:41.493634,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2017/05/23 08:20:03.971245,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  *****

  Samba name server LINUX-BCBT is now a local master browser for workgroup WORKGROUP on subnet 10.0.2.88

  *****
[2017/05/23 08:24:38.141658,  0] ../source3/nmbd/nmbd_incomingdgrams.c:313(process_local_master_announce)
  process_local_master_announce: Server SEKOGMS at IP 10.0.0.52 is announcing itself as a local master browser for workgroup WORKGROUP and we think we are master. Forcing election.
[2017/05/23 08:24:38.151327,  0] ../source3/nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
  *****

  Samba name server LINUX-BCBT has stopped being a local master browser for workgroup WORKGROUP on subnet 10.0.2.88

  *****
[2017/05/23 08:24:56.521563,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  *****

  Samba name server LINUX-BCBT is now a local master browser for workgroup WORKGROUP on subnet 10.0.2.88

  *****

Offline marcin'82

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 144
    • Zobacz profil
Odp: Samba za NAT nie działa
« Odpowiedź #5 dnia: 2017-05-24, 17:20:31 »
Pokaż jeszcze wynik polecenia - plik konfiguracji samby bez komentarzy:
grep -v "#" /etc/samba/smb.conf | sed '/^\s*$/d'
marcin82