Restrict the node local tabs access to specific content types I have a module_name.links.tasks.yml file for Drupal 8, whose content is the following one.

entity.node.module_admin:
  route_name: module_name.admin
  base_route: entity.node.canonical
  title: Admin Page
  weight: 99

entity.node.check_backend:
  route_name: module_name.check-backend
  base_route: entity.node.canonical
  title: Check Backend
  weight: 100

entity.node.download_webagent:
  route_name: module_name.download_webagent
  base_route: entity.node.canonical
  title: Download Webagent.conf
  weight: 101

entity.node.download_httpdconf:
  route_name: module_name.download_httpdconf
  base_route: entity.node.canonical
  title: Download httpd.conf
  weight: 102


These tabs appear in all the content type nodes. How can I restrict them to  specific content types?
Yes, routing is correct. Routes specify access rules, if you want your route to only be accessible for a certain node type, implement custom access callback and check for that.

The local task will then automatically respect that.

Example from core:

comment.reply:
  path: '/comment/reply/{entity_type}/{entity}/{field_name}/{pid}'
  defaults:
    _controller: '\Drupal\comment\Controller\CommentController::getReplyForm'
    _title: 'Add new comment'
    pid: ~
  requirements:
    _custom_access: '\Drupal\comment\Controller\CommentController::replyFormAccess'


That method then can receive the same arguments as the controller/form, in your case the node (just add NodeInterface $node) and you can check the type there and everything else you want (like permissions)