How to disable accessing the custom post types from frontend via a link?

I think setting 'publicly_queryable' => false should solve your problem!