How to hide Forums from anonymous users?
You can change the permission associated with a route doing what Altering existing routes and adding new routes based on dynamic ones / Altering existing routes says to do.


Create a service that is tagged with name: event_subscriber
The class implementing the service extends RouteSubscriberBase
The service class defines its alterRoutes() method that in RouteSubscriberBase is an abstract method


In your case, the alterRoutes() method would be similar to the following one.

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    if ($route = $collection-&gt;get('forum.index')) {
      $route-&gt;setRequirement('_permission', 'access forum pages');
    }
    if ($route = $collection-&gt;get('forum.page')) {
      $route-&gt;setRequirement('_permission', 'access forum pages');
    }
  }


Instead of access forum pages, you can use a different permission, including an existing one that you think it suits more.