This is why it's important to use good passwords and not plug things like your camera directly into the internet without a router or other hardware firewall in line.
VPN servers are an easy and secure device that takes minutes to set up and would solve a lot of these problems. Many routers even have one built in.
If you have a device that you need to access from the public internet there are secure ways to do so.