# Securing OpenLDAP

```
# Allow HTTP Traffic
sudo ufw allow 80
# Allow HTTPS Traffic
sudo ufw allow 443
# Allow LDAP Traffic
sudo ufw allow 389
```

The following ports are required to access keeping all other access closed to secure the OpenLDAP server&#x20;

```
$> sudo ufw enable
$> sudo ufw allow 80
$> sudo ufw allow 443
$> sudo ufw allow 389
$> sudo ufw status
```

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2FAud2a4HgWXY6hk43Xo0E%2Fimage.png?alt=media&#x26;token=8662d653-d98d-4cee-a552-a663ee3cc5d8" alt=""><figcaption></figcaption></figure>
