1

I've built a Linux container (basic kalilinux/kali-rolling) on top of my macOS and I'm trying to access my device's Bluetooth within this container with Bluez' hcitool scan method. However the method returns:

Device is not available: Address family not supported by protocol

The container is ran using :

docker run --rm --net=host --privileged -it kalilinux/kali-rolling:latest

# Once in root I run : 
apt-get update && apt-get install -y bluez bluetooth

Am I passing the right parameters when launching my container? I thought that by adding the --privileged flag it would allow access to all of the system's resources and hence my Bluetooth. Otherwise, I've read that this might be a kernel issue where Bluetooth is not built in. Any hints as how to debug this would be appreciated.

Fredaroo
  • 223
  • 2
  • 10
  • 2
    Does this answer your question? [Accessing Bluetooth dongle from inside Docker?](https://stackoverflow.com/questions/28868393/accessing-bluetooth-dongle-from-inside-docker) – Turing85 Jan 01 '22 at 21:24
  • Hi @Turing85, I've stumbled upon this but sadly it does not answer my question. I have tried the options which has pushed me to use similar flags but the error I'm getting is `Device is not available: Address family not supported by protocol` and and not just that it finds zero devices – Fredaroo Jan 01 '22 at 21:29
  • Have you read the [2nd answer](https://stackoverflow.com/a/57453220/4216641), in particular this part: "*Make sure `bluez` is not running on your host.*"? – Turing85 Jan 01 '22 at 21:30
  • Yes I've had a look at that but since my main operating system was OSX, I thought I wasn't concerned by `bluez` running on my main OS since I think `bluez`is Linux bound. I might be wrong though – Fredaroo Jan 01 '22 at 21:34
  • 2
    Since Docker Desktop runs a hidden Linux VM, I'm pretty sure you can't access the host devices at all on MacOS (as opposed to on native Linux, where it's just something Docker is designed to prevent but you can circumvent it). – David Maze Jan 01 '22 at 21:59
  • I see. So there would be no way of getting such access with MacOS as my main OS? – Fredaroo Jan 01 '22 at 22:08

0 Answers0