Why is he so jealous/protective lately!

Lately my boyfriend has been extremely jealous/protective and this isn't like him. We've been together about 6 months now and ever since my ex I was with for 2 years texted me and messaged me on Facebook he has been VERY jealous. I told him both times that my ex tried talking to me and he seemed fine. But lately he's just been protective and jealous to the point it's kinda making me mad. The other day he asked me what the numbers in my WiFi password meant and I told him it was my date with my ex and he freaked and told me to change it but it very tried before and idk how to. Then he asked what my Facebook password was and I said it's the same. He then got even more made and asked me to change it. It's been about a week and I hadn't changed it yet but then he brought it up tonight and asked me if I missed my ex and said I lied to him because I told him I'd change it. So I just did so it wouldn't cause a fight but why is he getting so mad over these little things? I told him he doesn't have to worry about me going back to my ex cause it won't but him getting so jealous isn't fun.