It is not illegal to block the view of a security camera. However, you should keep in mind that doing so may violate your neighbor's privacy rights.