Oggyo There is a set of apps.
Simple dialer by Tibor Kaputa.
Settings - Manage blocked numbers - Block calls from not stored numbers
To block SMS, Simple SMS Messenger
Settings - Manage blocked numbers - Block messages from not stored numbers
will do that for you. I don't use it. I simply ignore alerts, for me it's easier that way. I try to keep my OS as clean as possible by using built-in apps. Hope this helps.