Funadvice Logo

What to do if a neighbor walks into a apartment without knocking?

Home More advice Home & Garden

I had one of my neighbors try to open my door which thank god it was locked.
I was quite startled and so, I opened it and he was asking for his brother which I told him, "I don't know him" Then luckily, he apologizes for trying to walk in my apartment without knocking.
My question is, what should happen if it happens again? And, how would you all avoid that even if the door is locked?
Tips would be great.