Help Restore factory settings PROBLEM


Hello i bought a note 2 from a friend and i do restore factory settings after restore my phone was locked no sim was accepted and the imei was fake because i check it on samsung site , i go with the phone to a service and they have unlocked , now the imei is good and a want to restore again te settings . After this the phone will be locked again ? Please y need help.