[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ufw e samba



sab 2 dicembre 2023, alle 16:29 (GMT+0100), io ho scritto:
> [...]
> * la configurazuine che uso (e funziona) l'ho fatta 2 anni fa e non
>   ricordo perchè l'ho fatta così (mi sembra di ricordare che Anywhere sia
>   dovuto alla ricerca da parte dei TV su udp non su l'IP 192.168.1.8 del
>   PC ma su un multicast tipo 224.qualcosa).
> 
> sul PC con samba ho:
> # /usr/sbin/ufw status
> To                         Action      From
> --                         ------      ----
> [...]
> 192.168.1.8 139/tcp        ALLOW IN    192.168.1.0/24              # smbd
> 192.168.1.8 445/tcp        ALLOW IN    192.168.1.0/24              # smbd
> Anywhere                   ALLOW IN    192.168.1.0/24 137/udp      # nmbd
> Anywhere                   ALLOW IN    192.168.1.0/24 138/udp      # nmbd
> [...]

Quel anywhere mi suonava strano , controllato con
ufw show listening e sullo script le porte udp (tutte) sono aperte solo a
137 e 138 dalla rete locale, questi i comandi:

  MY_NET_IP="192.168.1.0/24"
  HERE_IP="192.168.1.8"

  /usr/sbin/ufw allow from "${MY_NET_IP}" to "${HERE_IP}" port 139 proto tcp comment "smbd"
  /usr/sbin/ufw allow from "${MY_NET_IP}" to "${HERE_IP}" port 445 proto tcp comment "smbd"
  /usr/sbin/ufw allow from "${MY_NET_IP}" port 137 proto udp comment "nmbd"
  /usr/sbin/ufw allow from "${MY_NET_IP}" port 138 proto udp comment "nmbd"


Rileggo inoltre il tou log e vedo che il problema dovrebbe proprio essere
quello:
> 2023-11-29T14:47:05.935411+01:00 psala-lx kernel: [197355.101935] [UFW
> BLOCK] IN=enp5s0 OUT= MAC=c8:60:00:5a:05:2d:38:ca:84:38:6e:b1:08:00
> SRC=192.168.70.78 DST=192.168.64.90 LEN=90 TOS=0x00 PREC=0x00 TTL=64
> ID=30123 DF PROTO=UDP SPT=137 DPT=56517 LEN=70

rifiuto proto udp da 192.168.70.78 porta 137  (il tuo client samba??)
                   a 192.168.64.90 porta 56517 (il tuo server samba??)
-- 
Cura ut valeas
Johan Haggi
postridie Kalendas Decembres MMDCCLXXVI ab Urbe condita
OpenPGP key: https://keys.openpgp.org/search?q=orsogrigio%40disr.it
Fingerprint: 60B3 42CB E145 F8E9 8132  6CDD 194E 4326 B645 F109

Attachment: signature.asc
Description: PGP signature


Reply to: