Cybersecurity tip for Mac users: If you enable screen sharing, remote login (ssh), or file sharing on macOS and you have a network filter installed like LittleSnitch or Lulu you should create a conditional profile to block the ports 22, 445, 548, and 5900 on the local network that activates whenever you connect to untrusted networks
Unfortunately the built in macOS firewall seems to be very limited in its capabilities so there seems to be no way to create conditional rules based on what network you're on
@alicela1n I think you can do it with the network locations features still but there's no ui for that anymore afaik