Get a Pentest and security assessment of your IT network.

Cyber Security

Raspberry Pi Bluetooth Security

TL;DR

This guide shows you how to improve the security of Bluetooth on your Raspberry Pi running Raspian. We’ll cover disabling unused services, reducing visibility, and keeping your system updated.

Steps

  1. Update Your System
  2. First, make sure your Raspberry Pi is up-to-date. This includes the operating system and Bluetooth packages.

    sudo apt update
    sudo apt upgrade
  3. Check Bluetooth Service Status
  4. See what Bluetooth services are running:

    systemctl status bluetooth

    If it’s not running and you don’t need Bluetooth, consider leaving it off. If it is running, proceed to the next steps.

  5. Disable Unnecessary Services
  6. Raspbian often starts several Bluetooth services. Disable those you don’t use. Common ones include:

    • bluetooth-audio: For audio streaming (if not used).
    • bluetooth-serial: For serial port connections (if not used).

    To disable a service, use the following command (replace service_name with the actual service name):

    sudo systemctl stop bluetooth-audio
    sudo systemctl disable bluetooth-audio
  7. Reduce Bluetooth Visibility
  8. Make your Raspberry Pi less discoverable by setting the visibility timeout to a short period or disabling it completely.

    Edit the /etc/bluetooth/main.conf file:

    sudo nano /etc/bluetooth/main.conf

    Find the line #VisibilityTimeout = 60 and change it to (for example, 10 seconds):

    VisibilityTimeout = 10

    Or, to disable visibility completely, set it to 0:

    VisibilityTimeout = 0

    Save the file (Ctrl+X, Y, Enter).

  9. Restart Bluetooth Service
  10. Apply the changes by restarting the Bluetooth service:

    sudo systemctl restart bluetooth
  11. Configure RFCOMM Filtering
  12. RFCOMM is a cable replacement protocol. Limit which devices can connect using RFCOMM.

    Edit /etc/bluetooth/rfcomm.conf:

    sudo nano /etc/bluetooth/rfcomm.conf

    Add device MAC addresses to the devices = line, allowing only trusted devices to connect. For example:

    devices = 00:11:22:33:44:55 66:77:88:99:AA:BB

    Save the file (Ctrl+X, Y, Enter).

  13. Firewall Configuration
  14. If you're using a firewall (like ufw), ensure it blocks incoming Bluetooth connections unless specifically allowed.

    Example rules:

    sudo ufw deny from any to any port 1925 proto tcp
    sudo ufw deny from any to any port 1926 proto tcp
  15. Regular Security Updates
  16. Keep your system updated regularly. This is the most important step for ongoing cyber security.

    sudo apt update && sudo apt upgrade -y
Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation