With our chat discussion (http://chat.stackexchange.com/rooms/23910/discussion-between-zakir-hc-and-alexey-grachev) I understand that you want to restrict certain set of AD groups access to entire farm. Example, users from ADGroup1 should be restricted to all site collections in the farm.
I do not know a way to restrict an AD group directly at farm level settings but yes this could be possibly done with creating
User Policy for each web applications listed in Central Administration of a farm.
User Policy is the place where the magic happens in a web application level. User policy is basically a AD user or AD group mapping to certain Web Application Level Permission policy. You can even define a Zone in which the policy is applied.
You can read more about managing permission policies for a web application in SharePoint here: Manage permission policies for a web application in SharePoint
Open Central Admin > Manage Web Applications > Select 'Web
Application' > On the ribbon click - User Policy > Add Users > Select
a zone or All Zones > Click Next.
Among the listed Permissions if you find
Deny All then select it and search your AD group in
Choose Users people picker control. If you do not find Deny All permission level then create one using
For your reference. Here 'IT Service Desk' is one of our AD Group