11 Enable Firewall & Stealth Mode
Apple computers have a built-in firewall that can help block malicious connections. It certainly isn’t perfect, but you should be using it anyway.
It’s typically enabled by default, but you should navigate to System Preferences > Security & Privacy and make sure it’s on (click on the Firewall tab).
Click on Firewall Options and you can also tweak the individual apps and services which can receive inbound connections.
Additionally, there’s a feature called Stealth Mode here. Essentially, it’ll help to shield your Mac from view when you are connected to public Wi-Fi networks.