Authorize and block IP addresses for API and SMTP security

Brevo logs every IP address that tries to use your API keys and SMTP keys. To protect your keys, Brevo can automatically block requests from unknown IP addresses. You can also manually authorize trusted IP addresses. The authorized IP list is shared across both API and SMTP keys, so any IP you authorize applies to both.

Gut zu wissen

Warum unbekannte IP-Adressen blockieren?

Blocking unknown IP addresses helps protect your API keys and SMTP keys by:

  • Vermeidung von unbefugtem Zugriff von unbekannten oder verdächtigen IPs.
  • Allowing requests only from trusted IP addresses you have used or approved.
  • Detecting unusual behavior early, such as calls from unexpected sources.

Dies bietet eine zusätzliche Sicherheitsebene und hilft dir, schnell auf potenzielle Bedrohungen zu reagieren.

So funktioniert das Blockieren unbekannter IP-Adressen

The blocking process works differently depending on whether you are using API keys or SMTP keys.

API keys: two-phase process

For API keys, blocking happens in two phases:

🟢 Phase 1: IPs werden automatisch autorisiert

Wenn du zum ersten Mal einen API-Schlüssel verwendest, autorisiert Brevo automatisch die IP-Adressen, die API-Aufrufe tätigen. In dieser „Lernphase“ ist die IP-Sperre nicht aktiv, sodass du deine Integration ohne Einschränkungen einrichten und testen kannst.

🔐 Phase 2: Die Sperrung ist aktiviert

Wenn 30 Tage lang keine neuen IPs erkannt werden, schaltet sich Brevo automatisch ein:

  • Aktiviert die Sperrung von unbekannten IP-Adressen.
  • Blocks all API calls from unknown IP addresses.
  • Versendet an dich eine E-Mail-Benachrichtigung mit der blockierten IP-Adresse und dem verwendeten API-Schlüssel.

Von der Benachrichtigung aus kannst du Folgendes tun:

  • Authorize the IP address and add it to the Authorized IP addresses list.
  • Autorisierung verweigern und den API-Schlüssel rotieren, falls erforderlich.
  • Deaktiviere die automatische IP-Sperre, um alle IP-Adressen wieder zuzulassen.
💡 Gut zu wissen
IPs automatically authorized by Brevo for API keys use a /24 subnet. For example, if the IP address is 192.168.1.25, Brevo will authorize the entire range from 192.168.1.0 to 192.168.1.255 (256 IP addresses). We also recommend reviewing your Authorized IP addresses list before blocking becomes active, to make sure no legitimate IPs are missing.

SMTP keys: manual authorization required

For SMTP keys, there is no automatic learning phase. If you already have IP blocking active for API keys, you can extend it to your SMTP keys — but you need to manually authorize all IP addresses your SMTP clients use first. Enabling blocking before doing so will immediately block your SMTP traffic.

Sperrung unbekannter IP-Adressen aktivieren

You can activate blocking independently for API keys and SMTP keys. Select the key type you want to configure:

API keys SMTP keys
❗️ Wichtig
Before activating IP blocking for API keys, make sure all your calling IP addresses are already listed on the Authorized IPs page. Activating the feature before doing so may block legitimate API traffic. To learn more, check our dedicated section in this article.
  1. Authorize all IP addresses that make API calls on your account.
  2. Klicke auf das Dropdown-Menü für das Konto und wähle Settings > Security > Authorized IPs (Einstellungen > Sicherheit > Autorisierte IPs) aus.
  3. Under Blocking unauthorized IP addresses, find the API keys row.
  4. If the status is Deactivated, click Activate for API.
    security_authorized-IPs_api_activate_en-us.png
  5. Click Activate blocking to confirm.

Once activated, calls from unknown IP addresses using your API keys are blocked. Each time an IP address is blocked, you receive an email notification and the blocked IP address is added to the Unauthorized IP addresses list. If you recognize and trust it, you can authorize the blocked IP address.

Deactivate blocking of unknown IP addresses

You can deactivate blocking independently for API keys and SMTP keys. Select the key type you want to configure:

API keys SMTP keys
❗️ Wichtig
Deactivating this feature reduces the security of your API keys. Only deactivate it if your API environment is fully controlled.
  1. Gehe zum Dropdown-Menü für das Konto und wähle Settings > Security > Authorized IPs (Einstellungen > Sicherheit > Autorisierte IPs) aus.
  2. Under Blocking unauthorized IP addresses, find the API keys row.
  3. If the status is Activated, click Deactivate for API.
    security_authorized-IPs_api_deactivate_en-us.png
  4. Click Deactivate blocking to confirm.

Nach der Deaktivierung können alle IP-Adressen API-Aufrufe mit deinen API-Schlüsseln tätigen.

Manuelles Autorisieren einer IP-Adresse

You can manually authorize an IP address to ensure it is always allowed. Authorized IP addresses apply to both API keys and SMTP keys. This includes:

Manuelle Autorisierung einer vertrauenswürdigen IP-Adresse

Du kannst IP-Adressen manuell autorisieren, um sicherzustellen, dass vertrauenswürdige Quellen immer zugelassen sind.

  1. Go to the account dropdown and select Settings > Security > Authorized IPs.
  2. Click Authorize IP address.
    security_authorized-IPs_manually_en-us.png
  3. From the IP address format dropdown, select the format of the IP address you want to authorize:
    • IPv4
    • IPv4-Bereich (CIDR-Format)
    • IPv6
    • IPv6-Bereich (CIDR-Format)
  4. Gib die IP-Adresse oder den IP-Adressbereich ein, den du autorisieren möchtest.
  5. Click Authorize IP address.
    security_authorized-IPs_manually_add-IP_en-us.png

The IP address appears in your Authorized IP addresses list and will not be blocked for either API or SMTP calls.

Manuelle Autorisierung einer gesperrten IP-Adresse

❗️ Wichtig
If you do not recognize or trust the IP address, leave it in the Unauthorized IP addresses list to keep it blocked.

Du kannst eine gesperrte IP-Adresse folgendermaßen autorisieren, wenn du sie erkennst und ihr vertraust:

  • Direkt aus der E-Mail-Benachrichtigung, oder
  • From the Unauthorized IP addresses list
    security_authorized-IPs_unauthorized_en-us.png

Once authorized, the IP address can make API and SMTP calls again.

Manuelles Entfernen einer autorisierten IP-Adresse

Wenn eine IP-Adresse nicht mehr verwendet wird oder keinen Zugriff mehr haben soll, kannst du sie manuell aus deiner Liste der autorisierten IPs entfernen.

  1. Gehe zum Dropdown-Menü für das Konto und wähle Settings > Security > Authorized IPs (Einstellungen > Sicherheit > Autorisierte IPs) aus.
  2. From the Authorized IP addresses list, click the bin icon next to the IP address you want to remove.
    security_authorized-IPs_delete_en-us.png
  3. Klicke zur Bestätigung auf Delete IP address (IP-Adresse löschen).

The IP address will be removed from your list and will no longer be able to make API or SMTP calls if the automatic IP blocking feature is active.

Best practices for API and SMTP security

  • Manually authorize all trusted IP addresses in advance, especially all SMTP client IPs before activating SMTP blocking.
  • Keep API keys and SMTP keys secure and rotate them regularly.
  • Monitor API and SMTP usage for unusual patterns or errors.

🤔 Sie haben eine Frage?

Wenden Sie sich bei Fragen an unser Support-Team: Erstellen Sie einfach ein Ticket über Ihr Konto. Wenn Sie noch kein Konto haben, können Sie uns hier kontaktieren.

Wenn Sie Unterstützung bei einem Projekt mit Brevo suchen, können wir Sie mit der richtigen zertifizierten Brevo-Partneragentur verbinden.

💬 War dieser Beitrag hilfreich?

22 von 49 fanden dies hilfreich