That's actually a good question that has been discussed by players at various points since I began playing at online casinos. Unfortunately, no one can really answer that question easily, because the answer depends upon what kind of firewall you have, what security settings you have it on, and on the specific attributes of the casino you're attempting to download. A firewall's standard protections generally keep your system from downloading anything from the internet unless you specifically instruct an override to the firewall protection in that situation.
I've stopped using my firewall and am looking at a new one, because the one I WAS using ended up making it difficult for my computer to function on the internet at all - so keep in mind that even a firewall with a good reputation might end up not working properly with your specific ISP. When I was using my firewall, I also experienced some casinos that didn't download properly even when I gave instructions to override the firewall block, but I really think that the reason for those problems are the same as the ones we experience in which some firewalls work better with some ISPs and create havoc with other ISPs.
Your best protection against downloading a dangerous casino is really to check the forum boards, casinomeister, MCO, and other websites where you find opinions & experiences about specific casinos. Don't be afraid to ask questions about a specific casino in the correct part of a forum board you like - you'll usually get answers, and if you remain a part of the community, you'll learn which people's opinions you trust more than others.
Sorry there's no easy answer for the firewall question, but as far as we've come with computers and computer software, there are still a lot of incompatibilities that have nothing to do with a specific piece of software or hardware or website or firewall or ISP being bad, but with them simply using different types of codes that make them incompatible. Good luck on your search, and I strongly advise using the message boards when you have questions like this, since many players will willingly give honest responses about whether they believe a casino is legit or not.