I have edited the title as I assume you are referring to an investment property mortgage?
For home loans...
They are not allowed to charge a penalty on variable rate mortgages.
They can charge a break fee on fixed rate mortgages.
I have not heard of banks charging break fees for Buy to Let properties, although Irish Nationwide used to charge a break fee. The Ombudsman ruled that it must reflect the cost and so reduced it significantly.
Brendan