On a Mac, go to System Preferences>>Sharing and make sure all the sharing boxes are unchecked. You'll have to turn on the controls again when you want to file share on your home or work network.
Don't automatically connect to Wi-Fi networks
It's handy when your smartphone, tablet and laptop automatically connect to your home and work networks, but that can lead to trouble when you're out and about.
Hackers often give their rogue hotspots generic names such as Coffee Shop, Linksys or AT&T Wireless. You want to be certain you are connecting to the router of the business.
Tweak your gadgets' settings so you have to manually join networks in public. Then verify with a store employee that you are connecting to the correct network.
You might think that an establishment with password-protected Wi-Fi is safer, but that's not the case. Passwords are good for keeping people out of your home network, but for public networks, anyone can join. Once a hacker is on, your gadgets are accessible.
By the way, your home Wi-Fi is encrypted, right? If not, you're grounded from going out in public until you lock it down! I have detailed instructions here.