Can't. You can block individual numbers, but there is no tool in the base Android to block all unknowns. Fortunately there are plenty of apps which will do exactly that - but I'm confused as to why I need to install an app to do something so simple.
The solution someone suggested elsewhere in this thread is to use make the default ringtone silence, then assign audible ringtones to all your contacts.