Server Message Block file and printer sharing over TCP, used by Windows shares, Samba, and Active Directory (SYSVOL, Group Policy).
Server Message Block file and printer sharing over TCP, used by Windows shares, Samba, and Active Directory (SYSVOL, Group Policy).
Do not expose to the internet. Never expose SMB to the internet. WannaCry and NotPetya spread through SMBv1 (EternalBlue, MS17-010), and exposed shares invite brute-force and NTLM relay. Disable SMBv1, block 445 at the perimeter, and use a VPN for remote file access. Many ISPs block it outright.
sudo ss -tlnp 'sport = :445'sudo lsof -nP -i :445sudo netstat -tlnp | grep ':445 'netstat -ano | findstr :445Get-NetTCPConnection -LocalPort 445 -State Listen | Select LocalAddress,OwningProcessnc -vz -w 5 HOST 445Test-NetConnection HOST -Port 445sudo ufw deny 445/tcpsudo iptables -A INPUT -p tcp --dport 445 -j DROPsudo nft add rule inet filter input tcp dport 445 dropNew-NetFirewallRule -DisplayName 'Block TCP 445' -Direction Inbound -Protocol TCP -LocalPort 445 -Action BlockAll port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.