SMB can be used over the internet, but it is not recommended without secure measures due to potential security risks. It's more common to use SMB within a local network (LAN). For internet-based file sharing, it's advised to use SMB over a VPN (Virtual Private Network) to encrypt the data and protect the connection.