This question already has an answer here:
I had an argument with someone on IRC about Network Address Translation. I was under the impression that NAT provided a layer of security to internal networks. I understand that's not the primary purpose of NAT, nevertheless, I can't really see how I could be wrong about that. Anyway, I got laughed at and mocked over it but never really got a straight answer as to how or why I was wrong. So does NAT really provide security? Or not?