> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-monitoring-and-management/3/llms.txt).

# Check mongodb localhost bypass

## Description

This advisor returns a warning if the [localhost exception](https://www.mongodb.com/docs/v6.0/core/localhost-exception/) is enabled in MongoDB ( the **enableLocalhostAuthBypass** parameter is set to True).

This represents a security vulnerability and should be disabled.

For more information, see the [MongoDB documentation](https://docs.mongodb.com/manual/reference/parameters/#mongodb-parameter-param.enableLocalhostAuthBypass).

## Resolution

Follow the steps below to disable localhost exception:

1. Edit the `mongod.conf` and set the below parameter.

   ```yaml
   setParameter:
     enableLocalhostAuthBypass: false
   ```

1. Roll-restart your `mongod` nodes to apply the changes.

## Need more support from Percona?

Percona experts bring years of experience in tackling tough database performance issues and design challenges.
